Webmin breaks php.ini?

3 posts / 0 new
Last post
#1 Sat, 01/24/2009 - 07:42
rduval

Webmin breaks php.ini?

I'm using Virtualmin GPL, all updates, on Centos. I've been writing a php program that uses session variables, it WAS working.

I used Webmin>others>file manager>edit to modify \etc\php.ini only to double the session time from 1440 to 2880.

Now sessions no longer work at all! I have put it back again to original, rebooted entire machine, still no sessions.

I've tried using the test code: [code:1]<?php if(!isset($_session)) session_start();

if(isset($_session['test'])) { echo $_session['test']; } else { $_session['test'] = "session is set and remembered, no matter the SID"; echo 'session was not set. <a href="test.php">Click here</a> to refresh'; } ?> [/code:1]

It says no session no matter how many times I refresh... Could this be a permissions thing? Could Webmin have screwed it up? The owner is curently root and permissions 644...is this right?

Sat, 01/24/2009 - 07:55
andreychek

You may want to look in the Apache error log to make sure no errors are being generated.

Also, I'd verify the permissions on the PHP sessions dir -- what is session.save_path set to in the php.ini, and when you type &quot;ls -ld /path/to/php/sessiondir&quot;, what perms do you see?
-Eric

Sat, 01/24/2009 - 09:20 (Reply to #2)
rduval

I'm getting errors like:

[code:1] Use of undefined constant failed_logins - assumed 'failed_logins'[/code:1]

but it has been set in:

[code:1]$_SESSION['failed_logins'] = 0;[/code:1]

So I don't get why it says it's undefined???

I can call phpinfo() and see that there is a session defined and the session ID so there is a valid session...

I can even see the session files....

Topic locked