|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-08-04 22:05 UTC] marko at l-t dot ee
I have a module to store session data in PostgreSQL database. Open & read part works, the write is buggy. In the log I get: -- log -- <br> <b>Warning</b>: Failed to write session data. Please check that the current +setting of session.save_path is correct (/tmp) in <b>Unknown</b> on line +<b>0</b><br> <br> -- strace -- write(1, [ my own html ] .., 53) = 53 close(135476516) = -1 EBADF (Bad file descriptor) write(1, "<br>\n<b>Warning</b>: Failed to "..., 168) = 168 -- php with --enable-debug <br> <b>Warning</b>: Failed to write session data. Please check that the current setting of session.save_path is correct (/tmp) in <b>Unknown</b> on line <b>0</b><br> Unknown(0) : Warning - Failed to write session data. Please check that the current setting of session.save_path is correct (/tmp) session.c(1011) : Freeing 0x081329C4 (7 bytes), script=/usr/home/marko/public_html/stest/index.php Last leak repeated 3 times -- Test case and my module is available at http://195.222.18.13/php/pgsession.tgz PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 23:00:01 2025 UTC |
No. CVS did not compile, so I replaced 4.0.1pl2 session/ with CVS's one and tested this. Seems like I forgot to mention my _main_ problem. That is, session.c uses my 'open' & 'read' to start session, but seems like it uses 'files' 'write' & 'close' to end session. When I register my own shutdown function that basically does { my_write(session_id(), session_encode()); my_close(); } then everything works. My functions log to a file so I see that my write does not even get called. Before I sent a mail to -general, where this was described, but seems like this was wrong place to send it, and afterward I forgot. ---- Now --enable-debug reports: <b>Warning</b>: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in <b>Unknown</b> on line <b>0</b><br> Unknown(0) : Warning - Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) session.c(1036) : Freeing 0x0815ADCC (8 bytes), script=/home/marko/public_html/pgsession/index.php Last leak repeated 3 times