Click to See Complete Forum and Search --> : [RESOLVED] Sessions file is empty
Fingers68
04-28-2007, 07:49 AM
php 4.4.6
windows xp
iis 5
After upgrading php to 4.4.6 after using 4.3.9 all session files are empty. The file is created but blank. I have checked the sessions folder has permissions for IUSR
I have also tried every thing here http://bugs.php.net/bug.php?id=16263
Please help, at a total loss.
bradgrafelman
04-28-2007, 12:03 PM
I have checked the sessions folder has permissions for IUSRWhat kind of permissions? Have you given the IUSR_ account full control? Does it also have permissions for the c:\PHP\ folder?
Try setting error_reporting to E_ALL, and do a test script like this:
<?php
session_start();
$_SESSION['test'] = 'testing';
echo 'id: ' . session_id();
session_write_close();
?>Then, check the corresponding session file (it echo's the ID so it should be easy to find) and see if it has data in it. Also see if any errors/warnings/etc. are outputted to the browser.
Fingers68
04-28-2007, 01:10 PM
Thanks bradgrafelman
Yes the file has been writen too.
test|s:7:"testing";
The page comes back with this info
id: 71e4abbd02e1c4288ff31bb0cf306222PHP Warning: Unknown(): (null): Unable to initialize module Module compiled with module API=20060613, debug=0, thread-safety=1 PHP compiled with module API=20020429, debug=0, thread-safety=1 These options need to match in Unknown on line 0
I might ad that I am also storing the session data in a mysql database.
The permissions are full control for the c:\php folder and the sessions folder
********************* UPDATE ************************
After a fresh overwrite of all the php 4.4.6 files and the sys32 windows files the error is now gone.
The test session file is being writen to but my script is still not writing any data to the session file nor the database. Yet the scripts were working fine before upgrade to 4.4.6 !!! :(
The scripts are working fine in this enviroment also http://www.tcuniforms.co.uk/phpinfo.php
Although the system is a Linux apache box I have tried to mirrow the php_ini settings.
bradgrafelman
04-29-2007, 12:10 PM
1. You say the "error is now gone" - does that mean you got rid of the "Warning: Unknown(): (null):" error?
2. and the sys32 windows filesWhat sys32 windows files? No files related to PHP should ever copied outside of the PHP folder (e.g. c:\php\).
3. Can you perhaps show us the output of a phpinfo() on your server (the one experiencing problems).
4. The test session file is being writen to but my script is still not writing any data to the session file nor the database.So you're saying my simple session example code is working just fine, and that you've narrowed it down to your specific script experiencing session problems? If so, we'll need to see some code from your script.
Fingers68
04-29-2007, 02:21 PM
The system I am having problems with is my local machine so its difficult to show you, I will see if I can save the file and upload.
The php_ini file is attached to my first post.
The session test works fine coming back with this only
id: 71e4abbd02e1c4288ff31bb0cf306222PHP
The scripts I am using are live here http://www.tcuniforms.co.uk so I know they work and like I say my scripts all worked fine on my local machine before the upgrade from 4.3.9 to 4.4.6
I tried pointing the php. to the php dll, but this did not work so pointed it back to the php.exe
Added phpinfo.txt (rename to phpinfo.htm)
Fingers68
04-30-2007, 08:08 AM
SORTED IT!!!
Running mysql 5 in "strict mode" was causing the problem.
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.