php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52710 Session Disappears
Submitted: 2010-08-26 22:11 UTC Modified: 2010-09-07 21:11 UTC
From: diemuzi at gmail dot com Assigned: fat (profile)
Status: Closed Package: FPM related
PHP Version: 5.3.3 OS: Archlinux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: diemuzi at gmail dot com
New email:
PHP Version: OS:

 

 [2010-08-26 22:11 UTC] diemuzi at gmail dot com
Description:
------------
It appears when running PHP 5.3.3 with FPM support sessions disappear on almost every-other request. The session name stays the same, but any application using a session returns a blank page until the page has been refreshed again.

Currently I have the session.save_path to /tmp, I tested other locations but the same issue. (This did not occur with FastCGI/CGI). As another test I changed the location of the save_path and loaded a phpinfo() script. It showed the corrected changed location, however upon refresh it was changed back to /tmp. Another refresh and the location was again changed to the path I specified. When the path changes, it does not write a new session file in either location.

The error in the error log is always:
FastCGI: server stdeer: PHP Fatal error
session_start(); open(/tmp/session_name_here, O_RDWR) failed: Permission denied(13) Array

Testing with random permissions ranging from 0644, 0666, 0755, 0777 return the same results. I also attempted to change the permissions to the actual session file and the same results.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-26 22:23 UTC] fat@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: fat
 [2010-08-26 22:23 UTC] fat@php.net
Can you please provide you complete php-fpm.conf ?
 [2010-08-26 22:31 UTC] diemuzi at gmail dot com
-Status: Feedback +Status: Assigned
 [2010-08-26 22:31 UTC] diemuzi at gmail dot com
#
# php-fpm.conf
#

; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;

; All relative paths in this configuration file are relative to PHP's install
; prefix.

; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
; file.
include=/usr/local/etc/fpm.d/*.conf

;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;

[global]
; Pid file
; Default Value: none
pid = /var/run/php-fpm.pid

; Error log file
; Default Value: /usr/local/var/log/php-fpm.log
error_log = /var/log/php-fpm.log

; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
log_level = notice

; If this number of child processes exit with SIGSEGV or SIGBUS within the time
; interval set by emergency_restart_interval then FPM will restart. A value
; of '0' means 'Off'.
; Default Value: 0
;emergency_restart_threshold = 1

; Interval of time used by emergency_restart_interval to determine when
; a graceful restart will be initiated.  This can be useful to work around
; accidental corruptions in an accelerator's shared memory.
; Available Units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;emergency_restart_interval = 1

; Time limit for child processes to wait for a reaction on signals from master.
; Available units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;process_control_timeout = 1

; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
; Default Value: yes
daemonize = no


#
# admin.conf (included by php-fpm.conf)
#

[admin]
listen = /tmp/fcgi_ipc/php-fpm.sock
listen.backlog = -1
listen.owner = apache
listen.group = apache
listen.mode = 0777
user = admin
group = admin
pm = dynamic
pm.max_children = 1
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 1
pm.max_requests = 500
catch_workers_output = no

#
# Notes
#

I attempted to change the values of the servers thinking perhaps it had something to do with that but no luck. As for php.ini they are default values which comes packaged with PHP 5.3.3 just for sanity tests.

As an additional test a moment ago I switched back to FastCGI/CGI mode without FPM support and as expected I did not encounter this situation. If this is a configuration issue, I appologize for the bug report.
 [2010-08-26 22:38 UTC] fat@php.net
-Status: Assigned +Status: Feedback
 [2010-08-26 22:38 UTC] fat@php.net
HUm well I'm using a quite similar configuration and it works without any 
problems.

Can you strace the child process when the problem occurs and report the returned 
result please ?

strace -p PID -s 1024 -o /tmp/strace.fpm.log
 [2010-09-07 21:11 UTC] diemuzi at gmail dot com
-Status: Feedback +Status: Closed
 [2010-09-07 21:11 UTC] diemuzi at gmail dot com
Closing, not related with FPM. This was bad timing the issue presented itself once FPM was compiled and used.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC