You are here: Re: Session Rewrite Problem « All PHP « IT news, forums, messages
Re: Session Rewrite Problem

Posted by Erwin Moller on 10/11/49 11:54

Hoopster wrote:

> Hello,
>
>
> I have a regular paid host for my webpage running Linux Redhat and ran
> a session_test.php file. I have get errors and it appears that it
> can't rewrite.
>
> Is this a problem with my webhost, PHP.ini setting or what?
>
>
> The script works on a different non-payed linux server that I have.
>
>
>
> Here is the error message (website changed) to hide NOOB identity.

Hi,

You are not the NOOB here.
Look at the first message:

>
>
> Warning: session_start():
> open(/var/lib/php/session/sess_84d54960aaff722503c1a49dbcfe7871,
> O_RDWR) failed: Permission denied (13) in
> /vservers/website/htdocs/session_test.php on line 4

Here the trouble starts, the other messages follow from this.
What is going on is this:
1) PHP wants to write the file mentioned to save the session.
2) Appearantly PHP doesn't have permission to write in that directory!

This is not your fault, but your providers.
In php.ini they can tell WHICH directory is used to store sessionfiles.

Look for session.save_path
Right now it points to /var/lib/php/session/

Of course, the user that runs the PHP script (often apache, or nobody, or
www-data) needs write and read permissions on that directory.

My guess is that your ISP didn't give them.

Contact them, and tell them to fix it. :-)

Regards,
Erwin Moller

>
> Warning: session_start(): Cannot send session cookie - headers already
> sent by (output started at
> /vservers/website/htdocs/session_test.php:4) in
> /vservers/website/htdocs/session_test.php on line 4
>
> Warning: session_start(): Cannot send session cache limiter - headers
> already sent (output started at
> /vservers/website/htdocs/session_test.php:4) in
> /vservers/website/htdocs/session_test.php on line 4
> Session started successfully!
> CLICK HERE FOR PAGE 2
> Warning: Unknown():
> open(/var/lib/php/session/sess_84d54960aaff722503c1a49dbcfe7871,
> O_RDWR) failed: Permission denied (13) in Unknown on line 0
>
> Warning: Unknown(): Failed to write session data (files). Please
> verify that the current setting of session.save_path is correct
> (/var/lib/php/session) in Unknown on line 0
>
>
>
> Any help would be appreciated.
>
>
> -= hoops

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация