Sessions Problem since CGI upgrade
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Sessions Problem since CGI upgrade
Sessions Problem since CGI upgrade
31-03-2010 7:53 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
)My site has started to complain about the session_start(); line.
The response is :-
Warning: session_start() [function.session-start]: open(/tmp/sess_f37d555f6fecc50c7369a84c5b1fc7a4, O_RDWR) failed: File too large (27) in /share/storage/04/st/strus/include/session.inc on line 12
This seems to indicate the session file is too large or the directory is full. What is the best way to overcome this. I have tried to use
ini_set ('session_save_path','/??????? to set the path to one in my directory without any luck.
Re: Sessions Problem since CGI upgrade
01-04-2010 12:42 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The error also appears at the top of the page at http://ccgi.ammonyte.plus.com/blog.
Re: Sessions Problem since CGI upgrade
01-04-2010 7:28 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
There was a similar problem for a day or so a couple of weeks back.
Re: Sessions Problem since CGI upgrade
01-04-2010 12:26 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The answer is to set your own sessions storage area
See my first few lines
ini_set ('session.name','tvmfc');
ini_set ('session.cookie_lifetime','3600');
ini_set ('session.gc_maxlifetime','3600');
ini_set ('session.gc_probability','1');
// ini_set ('session_save_path','/files/home3/strus/SESSIONS/');
session_save_path('/files/home3/strus/SESSIONS/'); *********This is the line to add*********
session_start();
To determine your path use phpinfo() and look towards the bottom of the output for _ENV["SCRIPT_FILENAME"]
make a directory to save the session info in, I used SESSIONS and then include this in the path above. You will now see your session info grow and removed from this directory as time goes by with usage. The probability can be set higher to keep more info etc.
Re: Sessions Problem since CGI upgrade
01-04-2010 1:48 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Is it in your PHP.INI? Or in your application script? (I'm assuming this is PHP!)
Jon
Re: Sessions Problem since CGI upgrade
01-04-2010 3:02 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
All the pages in my site that need this have it included because I include_once the file "sessions.inc" at the tope of the php page. the commands then are in the include file which makes global changes easier.
Re: Sessions Problem since CGI upgrade
01-04-2010 3:50 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
In my case, I've placed this in the main config file that my CMS uses.
Excellent work! Thanks

Jon
Re: Sessions Problem since CGI upgrade
01-04-2010 11:21 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Sessions Problem since CGI upgrade
02-04-2010 11:42 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
http://community.plus.net/forum/index.php/topic,84896.0.html
EDIT: How do I use phpinfo() to determine the path - is it something I run in the webbrowser? Or must I add the command to a php file (like Gabes permissions script)?
Thanks.
Re: Sessions Problem since CGI upgrade
02-04-2010 1:21 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: collinet EDIT: How do I use phpinfo() to determine the path - is it something I run in the webbrowser? Or must I add the command to a php file (like Gabes permissions script)?
Create a PHP file (eg called php_info.php) containing
<?php
phpinfo();
?>
Upload it to your ccgi site using FTP. Make it executable (chmod 0700) and call it in your browser.
David
Re: Sessions Problem since CGI upgrade
02-04-2010 1:26 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Sessions Problem since CGI upgrade
02-04-2010 7:51 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: ammonyte Yes I too have this problem. However it has only arisen within the last 48 hours. I cannot login to my Admin page. I am using Wordpress 2.9.x (well the latest version whatever the .x is up to now).
The error also appears at the top of the page at http://ccgi.ammonyte.plus.com/blog.
OK I fixed my problem. It appears that the Wordpress Automatic Upgrade Plugin is incompatible with the settings that Plusnet are now using. When I renamed the plugin folder, my blog displayed correctly and I was able to login to the Admin page.
Re: Sessions Problem since CGI upgrade
03-04-2010 6:52 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator

I posted a ticket into PN yesterday to ask what has changed now to cause the error that appears to be affecting the site (and various others apparently), but as yet have had no response.
Having read the posts from Tonyr, I have tried to understand and implement the idea of setting up my own sessions directory, but I am guessing I am a wee bit too thick to get it right and could do with some "fuzzy-felt" help from someone!

The remainder of the site is working perfectly (Joomla/Virtuemart) - it is just the PMOS scripts that are falling over...
If anyone has any ideas or could point me in the right direction, it would be greatly appreciated

Re: Sessions Problem since CGI upgrade
03-04-2010 7:48 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
It seems the problem is PN are messing with the /tmp directory or the PHP defaults.
To overcome this you can set up where your own sessions are stored and there a number of steps shown in short then expanded for more explanation.
1, in your web directory on the CGI server set up a new directoty (I called mine SESSIONS). CASE SENSITIVE.
2, Use phpinfo() to find your absolute path to your directory.
3, Add a line to your scripts to make use of the new directory.
First I hope since you have uploaded files etc to your site, that making a new directory is a simple matter. I use Dreamweaver but if you use ftp then open the site and issue the mkdir SESSIONS command to make the new directory.
Second upload a file into that directory, I called mine tonyinfo.php and had three lines.
<?php
phpinfo();
?>
// make sure that the file has min 700 attributes
Second part to the second part is to use a web browser to go to your site /SESSIONS/tonyinfo.php
Look down the return page to near the bottom under sessions for the _ENV["SCRIPT_FILENAME"]. you will see the the path and the file name( /files/home3/strus/SESSIONS/tonyinfo.php).
Third is to add a line in your PHP code before the sessions.start(); line. The line to add is:- session_save_path('/files/home3/strus/SESSIONS/');
now if you monitor the SESSIONS directory you will see files added and disappear. They are the session files that would have gone in the /tmp dir that is playing up on the server for whatever reason.
More importantly your problems should have stopped.
I hope this is enough for you SkySurfer but you may find me on skype from time to time tony_strus
Re: Sessions Problem since CGI upgrade
03-04-2010 9:55 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator

I knew it needed a Fuzzy Felt approach to get through to me...lol
Basically, I had made 2 errors when trying to follow your previous posts:-
1. I didn't realise the sessions directory would be CASE sensitive - I had the directory in lower case and the php mod in uppercase.
2. With the PMOS script, the line mod needed to be one line higher than directly above the "session_start();" line - In my particular case, I had "if( !headers_sent( ) )
" directly above the session_start, and your mod needed to go above that...... why that would be is beyond me I'm afraid !!
Anyway.....got there in the end with a little fiddling and all is well again

Thanks once again for the much needed help, and thanks for the very fast response.... I would have been seriously struggling without you.
Incidentally, the PN ticket has now been open 30 hours and still no response..... might as well close that me thinks !!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Sessions Problem since CGI upgrade