Sessions saved as files

Toontje

Perch
Hi all!

My sessions get saved as files on the servers harddrive and not removed. So after a while i have thousands of sess_xxxxxxxxxx.php files on the server.
Why does this happen and what can i do to prevent this?
I'm using Joomla 1.0.4 on WIN7.

Thanks,

Ton.
 
Do you have a php.ini on your site? If so, it's probably specifying to save the files to your web space.

I wish I could tell you what the correct settings would be for it, but I don't know myself. I've found nearly all my sites work fine without the custom php.ini. Then again, I'm running 90% custom PHP scripts and not CMSes or other community developed code.

Tim
 
I tried fiddling around with php.ini files, but they seem to need a restart if IIS to function. And on a shared Windows box that IS a little bit inconvenient.
Do you mean that the standard, server-wide PHP.INI is not correctly configured?
BTW, i'm surprised that nobody from Jodohost is replying...

Ton.
 
Ton.

The custom php.ini does not need an iisreset, if the page doesn't load it means it is throwing an error becasue of a misconfiguration, the php.ini is loaded when you make a call to a php file.
 
Hi Stephen!

I have:

session.save_path = d:/hshome/mydirectory/sessions

in my php.ini and now when i load the page i get:

Security Alert! The PHP CGI cannot be accessed directly.

This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual page for CGI security.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.

Am i doing something wrong?

Ton.
 
Yes, send me your username or domain, I will create a valid php.ini for you, the problem is in the cgi.redirect= section on your php.ini.

And the pathname, you can use windows style d:\hshome\user\sessions as well :D
 
Back
Top