Re: Session errors when uploaded to host
| From: | Jerry Kita | Date: | Sun, 23 Jan 2005 23:49:28 +0000 |
| Subject: | Re: Session errors when uploaded to host | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207100@lists.php.net to get a copy of this message | ||
Burhan Khalid wrote:
Tim Burgan wrote:You also have the option of creating your own session location directory by inserting the following at the beginning of each script. session_save_path('...public/tmp'); I happen to do this because my hosting company uses load balancing which means I can never know what server is processing my PHP script. I place my session location in a tmp folder in my public directory. Otherwise I would lose my session variables periodically. -- Jerry Kita http://www.salkehatchiehuntersville.com email: jskita@attglobal.netHello, I've developed my site, and tested on 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 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 9The problem is that the php installation on this server is not configured correctly. It still holds the default session location (/tmp) which doesn't exist on Windows PCs. You need to ask the server administrator to verify the PHP installation and point the session location directory to a valid location on the server.