php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67561 PHP Fatal error: Unknown: Cannot find save handler '/var/lib/php/session'
Submitted: 2014-07-03 11:58 UTC Modified: 2014-07-03 17:45 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: mg2006ster at gmail dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.5.9 OS: Centos 6
Private report: No CVE-ID: None
 [2014-07-03 11:58 UTC] mg2006ster at gmail dot com
Description:
------------
In apace error log we have observed this below error
PHP Fatal error:  Unknown: Cannot find save handler '/var/lib/php/session' in Unknown on line 0

As i am not using session anywhere in the program.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-03 12:01 UTC] mg2006ster at gmail dot com
-PHP Version: 5.5.14 +PHP Version: 5.5.9
 [2014-07-03 12:01 UTC] mg2006ster at gmail dot com
Urgently need to resolve the issue.
 [2014-07-03 12:03 UTC] mg2006ster at gmail dot com
-Summary: PHP Fatal error: Unknown: Cannot find save handler '/var/lib/php/session' in +Summary: PHP Fatal error: Unknown: Cannot find save handler '/var/lib/php/session'
 [2014-07-03 12:03 UTC] mg2006ster at gmail dot com
Apache Version 2.4.7
 [2014-07-03 17:45 UTC] aharvey@php.net
-Status: Open +Status: Not a bug
 [2014-07-03 17:45 UTC] aharvey@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Your php.ini is misconfigured, most likely in the session.save_handler setting.
 [2019-10-18 14:33 UTC] m at xo dot pl
Hi.

First: sorry for reopening after 5 years but ...

It might not be a misconfiguration problem. Something similar start to happen to us when enabled h2 in 2.4.29-2.4.41 apache series and php. We debuged httpd core dumpes and there was exactly the same error in there.

Solution was strange:

we used php.ini (configured correctly) AND these three another lines in httpd.conf:

php_value session.save_handler "files"
php_value session.save_path    "/tmp/phpses"
php_value soap.wsdl_cache_dir  "/tmp/phpses"

Of course php.ini was exactly the same and directories existed (and worked for years).

Don't remember why we added it to httpd.conf a lot of years ago but it migrates from version to version and always worked without problems. Until h2 was enabled in this year and causes a lot of crashes. After debuging httpd soultion was so simple: remove these three lines from httpd.conf

Stupid but ... it works.

From "bt full":

#1  0x00007f6fa67273ef in virtual_open (path=0x1ec6660 "/vhosts_log/main_php.log", tsrm_ls=0x7f6ec0010c90, flags=1089) at /TOS/src/C6/php-5.6.40/Zend/zend_virtual_cwd.c:1667
        new_state = {cwd = 0x7f6ec0013e50 "\230<\001\300n\177", cwd_length = 1}
        f = <value optimized out>
#2  0x00007f6fa669363f in php_log_err (log_message=0x7f6ec0014060 "PHP Fatal error:  Unknown: Cannot find save handler '/tmp/phpses' in Unknown on line 0", tsrm_ls=0x7f6ec0010c90)
    at /TOS/src/C6/php-5.6.40/main/main.c:706
        fd = -1
        error_time = <value optimized out>
#3  0x00007f6fa6693ba5 in php_error_cb (type=1, error_filename=0x7f6fa6d984ae "Unknown", error_lineno=0, format=<value optimized out>, args=<value optimized out>) at /TOS/src/C6/php-5.6.40/main/main.c:1164
        log_buffer = 0x7f6ec0014060 "PHP Fatal error:  Unknown: Cannot find save handler '/tmp/phpses' in Unknown on line 0"
        error_type_str = <value optimized out>
        buffer = 0x7f6ec0014000 "Unknown: Cannot find save handler '/tmp/phpses'"
        buffer_len = 47
        display = <value optimized out>
        tsrm_ls = 0x7f6ec0010c90


Have a nice day :-) Maybe it helps someone :-)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 07:01:28 2024 UTC