cancel
Showing results for 
Search instead for 
Did you mean: 

PHP Upgrade (and Wordpress problems)

quarkhelix
Newbie
Posts: 5
Registered: ‎04-04-2010

PHP Upgrade (and Wordpress problems)

Hi there,
I have two PHP sites (mainly for educational purposes) created in two different ways...one with Wordpress (standard installation) and the other with a commercial product called PHPMaker. These sites worked fine up to the PHP server upgrade and then both began to show warning messages at the header of the screen.
Wordpress site:  http://ccgi.johnlucas.plus.com/seattle/
Warning: session_start() [function.session-start]: open(/tmp/sess_613569934d61525c3a2ba7ac2d187602, O_RDWR) failed: File too large (27) in /share/storage/02/jo/johnlucas/seattle/wp-content/plugins/easy-contact/econtact.php  on line 112
PHPMaker site: http://ccgi.johnlucas.plus.com/vancouver/
Warning: session_start() [function.session-start]: open(/tmp/sess_517d048818d57f26d01866d1a8fe0322, O_RDWR) failed: File too large (27) in /share/storage/02/jo/johnlucas/vancouver/index.php  on line 2
I raised a ticket for this on 24th March but it wasn't answered by any support staff and after about a day the problem seemed to rectify itself and everything began to work as it always had. Excellent I thought and closed the ticket! Then on 31st March I experienced the same errors again. I raised another ticket and after 3 days or so the support staff responded to inform me I had a problem with my scripts and they couldn't help any further.
So the scripts haven't changed in several months...the only thing that has changed is the server and the scripts have been created by two different methods, one open source and the other commercial. Can anyone point me in the right direction... Thanks
5 REPLIES 5
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: PHP Upgrade (and Wordpress problems)

Hi John,
The /tmp is all choked at the moment. A short history of recent session problems can be found <a href="http://community.plus.net/forum/index.php/topic,84853.msg701395.html#msg701395">here</a>. You'll need to set your own session.save_path to a folder you create in your own filespace. Unless you fancy editing all the scripts using sessions, the easiest way to set this is with a custom php.ini file, as linked from the link here or from the new ccgi faq. Then use either the symlink method or the wrapper method, or just shove a copy of the php.ini in each folder containing scripts. You can work out the absolute path to your new sessions folder from the /share/storage ... path in your error message.
Gabe
quarkhelix
Newbie
Posts: 5
Registered: ‎04-04-2010

Re: PHP Upgrade (and Wordpress problems)

Gabe,
I created a new custom php.ini file and a new /tmp directory in my cgi webspace. Popped a copy of the php.ini file in each of my sub directories containing .php files referencing back to the new tmp directory ie. session.save_path = ../tmp....and Bob's your uncle...Everything works again....Thanks for your input  Cheesy
quarkhelix
Newbie
Posts: 5
Registered: ‎04-04-2010

Re: PHP Upgrade (and Wordpress problems)

Following up this posting that I made a while ago, I thought I'd see if Plusnet had done anything about this problem on their end. So I temporarily removed my customised php.ini files and let everything default back to it's original settings. This seemed to work for about a week then I started getting the old error message back again. So I put my customised php.ini files back in place and everything started working again. Hurrah!
One thing I noticed though is that despite having a setting of  session.save_path set to a directory in my own webspace (as detailed previously)...the sessions are now all defaulting to /var/lib/php5 (when displayed with a phpinfo() script) and my own session directory is lying empty. Bizarrely, when i use the default php.ini file the sessions go to /tmp...so the customised php.ini file is doing something!!!. The upshot of it is that it is working (for the time being anyway) but I just don't know why.
Is there any reason why my (previously working) session directory would stop being recognised by the server and /var/lib/php5 would get used instead as a fallback maybe...permissions perhaps or have Plusnet hardwired this to /var/lib/php5 somehow to try and fix the problem?
Confused.
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: PHP Upgrade (and Wordpress problems)

Hi John,
Sounds like the php.ini you've uploaded is readable but not parsable. Is it still saved as txt and uploaded as ascii?
Your custom ini file will override the default ini file in total, but if PHP sees a custom ini file it can't understand it will run with compile-time defaults, not with the default ini file settings. The compile-time default session.save_path for Debian is /var/lib/php5.
Gabe
quarkhelix
Newbie
Posts: 5
Registered: ‎04-04-2010

Re: PHP Upgrade (and Wordpress problems)

Gabe,
Thanks yet again...you're a star! That's exactly what it was. I remember thinking that I was doing the wrong thing in pasting the php.ini text into a Word document (actually OpenOffice Writer) instead of through Notepad(++)  as I did the first time around. Of course, if it looked and saved correctly then I didn't expect it to cause a problem. I redid it in Notepad and everything worked like a dream.
Cheers.