|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-08-28 17:56 UTC] nathan at gossamer-threads dot com
Description: ------------ As of 5.2.10 it seems that the semaphore files are being created in / instead of the usual /tmp. Uncommenting the default session.save_path of /tmp in the php.ini fixes it. Reproduce code: --------------- nathan@ndb3 ~ $ php --version PHP Warning: PHP Startup: mm_create(0, /session_mm_cgi-fcgi1005) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0 PHP 5.2.10 (cgi-fcgi) (built: Aug 28 2009 10:23:30) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies Patches011_all_sharedmem_session_path_gentoo.patch (last revision 2010-05-28 19:28 UTC by mabi at gentoo dot org)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 19:00:02 2025 UTC |
Php 5.2.6 doesn't throw the error, but stracing does reveal that it's trying to create the file and failing: open("/session_mm_cgi-fcgi1009.sem", O_RDWR|O_CREAT|O_EXCL, 0600) = -1 EACCES (Permission denied) shmdt(0xb54c2000) = 0 shmctl(6619145, IPC_64|IPC_RMID, 0) = -1 EINVAL (Invalid argument) unlink("/session_mm_cgi-fcgi1009.sem") = -1 ENOENT (No such file or directory) If the expected behavior is to use the current working directory, this is not what it's doing: nathan@ndb3 ~ $ pwd /home/nathan nathan@ndb3 ~ $ php-cli -v PHP Warning: PHP Startup: mm_create(0, /session_mm_cli1005) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0 PHP 5.2.10 (cli) (built: Aug 28 2009 10:17:34) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies My assumption would be that the stock ini file that php ships with should contain a basic example that works on 99% of the machines out there. No reasonably configured machine would allow a user to write to /, so if there's no code change needed here perhaps the default php.ini should have that session.save_path uncommented?