PHP's session_start() function is failing

In recent days, PHP’s session_start() function has stopped working. For example, the following PHP code - in a web page - echos “session_start() failed”:

$session_start_result = @session_start();
if (!$session_start_result) { echo “session_start() failed”; exit; }
echo “session_start() succeeded”;

However, this script works OK if entered interactively into a PHP shell.

Perhaps the permissions have changed somewhere on some tmp directory, which the web server can no longer write to??

For example, this web page - which uses the PHP code that I noted above - can be used to test whether “session_start()” is working.

FWIW: Running “phpinfo()” shows that the variable “session.save_path” is set to “/public/scratch/php_session/vhost_ibiblio”. If you run

ls -lta /public/scratch/php_session/vhost_ibiblio | head -20

you see that sessions were created frequently up until “Oct 7 12:36”, but only two sessions were created since then.


ls -lgd /public/scratch/php_session/vhost_ibiblio


drwxr-xr-x 3 19999 29528064 Oct 11 14:57 /public/scratch/php_session/vhost_ibiblio

So that directory might need to be "chown"ed and/or "chgrp"ed.

Thank you for apparently fixing this problem. (Out of curiosity, what was the solution?}