Re: session_set_save_handler
| From: | Richard Lynch | Date: | Tue, 31 Jul 2001 06:27:22 +0000 |
| Subject: | Re: session_set_save_handler | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-60340@lists.php.net to get a copy of this message | ||
> I have found that I can still use my customer save_handler with the
> session.save_handler in the php.ini being set to 'files'. Since I
> implemented this function, we noticed that our other applications that do
> not call session_set_save_handler started having the following error:
> "Fatal error: Failed to initialize session module in backend.php on line
27
Somebody as OSCON was describing the same behaviour Wednesday in the PHP
guru room, I think... Or was that you? Hi again, if so. :-)
Maybe try using .htaccess files in each application's directory and:
php_value session.save_handler user
php_value session.save_handler files
in the appropriate directories.
> Warning: Failed to write session data (user). Please verify that the
current
> setting of session.save_path is correct (/tmp) in backend.php on line 0"
>
> line 27 of backend.php is a simple session_start();
>
> The /tmp is not full and is fully writable. It seems that when the 3
custom
> session applications are in use, that this error starts popping up in
other
> session applications.
>
> Is my call to a session_set_save_handler somehow "changing" the php.ini
for
> a bit? It's like the custom session application is setting the
> session.save_handler to 'user' for all other sessions.
Sounds like a reasonable hypothesis...
PHP is doing its best to do what you want, but you've confused it thoroughly
by calling session_set_save_handler() with the "files" setting in php.ini --
Those two together is basically just not kosher, so it's trying to do what
you said, only you've confused it.
You should be able to throw in a <?php phpinfo();?> to see what the
master/local values for session.save_handler is at various points, but the
change on the fly may not be shown there if your theory is correct. It
*SHOULD* show the .htaccess alterations suggested above, though, and I'm
hoping that by setting it up correctly in advance for each appliation, it
will all work out right.
--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm