[thelist] Session problems on host - how to respond to host?
Tim Burgan
email at timburgan.com
Sun Jan 23 17:02:11 CST 2005
Hello,
I've developed my site, and tested on a local web server, and a web host
(Apache, PHP 4.3.9).
Now I've uploaded to a different host (IIS, PHP 4.3.1) where I want to
keep it, and I get session error messages, which I believe are because
sessions are trying to be handled in a directory that doesn't exist on
the (Windows) server. The errors are like:
Warning: session_start() [function.session-start
<http://www.php.net/function.session-start>]:
open(/tmp\sess_30f6794de4b0d80b91035c6c01aae52d, O_RDWR) failed: No such
file or directory (2) in E:\W3Sites\ywamsa\www\timburgan\index.php on
line 9
Warning: session_start() [function.session-start
<http://www.php.net/function.session-start>]: Cannot send session cookie
- headers already sent by (output started at
E:\W3Sites\ywamsa\www\timburgan\index.php:9) in
E:\W3Sites\ywamsa\www\timburgan\index.php on line 9
My code on line 9 is: This is the first line of my code
session_start();
My code on line 12 is: This is the second line of my code
header("Cache-control: private");
I sent this to the host, with a description of what I believe the
problem is and they replied and said its a problem in my code.
I'd already tested on 2 different web servers and everything is fine.
How should I respond to the host?
It's not like I can change where session files are stored on their server.
Tim
PS. Here's the response I got from my client's web host:
[QUOTE]
Dear customer :
We checked the PHP configuration
PHP is installed on the server
all permissions have been setup fine
Pls check your code again
[/QUOTE]
I didn't even ask if PHP is installed on the server, or about permissions!
This is my original message to them:
[QUOTE]
Hello,
I've just uploaded a site for my client on his account with you at
3SHOST.com. The site uses PHP sessions. When the site is viewed in the
browser, I receive a many PHP errors saying:
Warning: session_start() [function.session-start]:
open(/tmp\sess_75001259902ba2d05d55f2db8a9ac252, O_RDWR) failed: No such
file or directory (2) in E:\W3Sites\ywamsa\www\timburgan\index.php on
line 9
His domain is ywamsa.org.au. If you want to see the errors yourself:
www/ywamsa.org.au/timburgan
What the error means is that PHP is using its default installation
configuration regarding sessions, which looks for a "tmp" directory. The
error occurs because this directory doesn't exist on windows.
Is it possible for you to ask the server administrator to verify the PHP
installation and point the session location directory to a valid
location on the server., then let me know?
Thanks
Tim
[/QUOTE]
More information about the thelist
mailing list