php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52609 session.save_path in php-fpm does not handle ";" in extended format correctly
Submitted: 2010-08-15 05:56 UTC Modified: 2011-04-01 22:13 UTC
From: rsyring at gmail dot com Assigned: fat (profile)
Status: Closed Package: FPM related
PHP Version: 5.3.3 OS: ubuntu 10.04
Private report: No CVE-ID: None
 [2010-08-15 05:56 UTC] rsyring at gmail dot com
Description:
------------
Version Explanation
=====================

I am using 5.3.2-1ubuntu4.2 with the php-fpm package from here:

https://launchpad.net/~brianmercer/+archive/php

Sorry for mis-representing my version, but I don't have a good method at the moment for getting 5.3.3 on Lucid.  Also, I checked the changelog here:

http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/sapi/fpm/fpm/

For any changes since the PPA was built and I did not see anything related to this particular issue, so it seems reasonable to assume this bug has not been fixed.

------------

It looks to me like php-fpm configuration parsing is not handling semi-colons inside of quotes correctly.

The following value works correctly when set in php.ini:

session.save_path = "0;0660;/home/webuser/tmp/php_sessions"

The following value works correctly when set in php-fcm.conf

php_admin_value[session.save_path] = "/home/webuser/tmp/php_sessions"

By "works correctly" I mean that session files are saved to the target directory and the correct value is shown in phpinfo().



Expected result:
----------------
With the following value set in a php-fcm.conf file:

php_admin_value[session.save_path] = "0;0660;/home/webuser/tmp/php_sessions"

I would expect to see:

* sessions saved in /home/webuser/tmp/php_sessions
* a mask of 0660 being used
* expect to see "0;0660;/home/webuser/tmp/php_sessions" in the phpinfo() output for session.save_path

Actual result:
--------------
I actually see an error message when trying to use sessions:

Warning: session_start(): open("0\/sess_9bite7f0iknrudokl1j080i5c7, O_RDWR) failed: No such file or directory

and '"0' in the phpinfo() output for session.save_path

Patches

php-fpm.ini_scanner_normal.patch (last revision 2010-08-19 09:30 UTC by fat@php.net)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-15 16:31 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: fat
 [2010-08-15 16:41 UTC] felipe@php.net
-Status: Assigned +Status: Feedback
 [2010-08-15 16:41 UTC] felipe@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2010-08-15 18:37 UTC] fat@php.net
-Status: Feedback +Status: Analyzed -Package: *Configuration Issues +Package: FPM related
 [2010-08-15 18:37 UTC] fat@php.net
The following patch has been added/updated:

Patch Name: php-fpm.ini_scanner_normal.patch
Revision:   1281890269
URL:        http://bugs.php.net/patch-display.php?bug=52609&patch=php-fpm.ini_scanner_normal.patch&revision=1281890269
 [2010-08-15 18:39 UTC] fat@php.net
-Status: Analyzed +Status: Feedback
 [2010-08-15 18:39 UTC] fat@php.net
Can you please try the attached patch ?

Thx
 [2010-08-16 15:33 UTC] rsyring at gmail dot com
-Status: Feedback +Status: Assigned
 [2010-08-16 15:33 UTC] rsyring at gmail dot com
Thanks for working on this.  I am sorry that I can't currently test the snapshot or patch as I am limited to working with ubuntu packages at the moment.  I may be able to eventually get some custom packages configured and compiled, but that won't be for another month or two at least.
 [2010-08-19 11:30 UTC] fat@php.net
The following patch has been added/updated:

Patch Name: php-fpm.ini_scanner_normal.patch
Revision:   1282210234
URL:        http://bugs.php.net/patch-display.php?bug=52609&patch=php-fpm.ini_scanner_normal.patch&revision=1282210234
 [2010-08-19 11:31 UTC] fat@php.net
this new revision corrects also the same problem when passing INI variable from 
the fastcgi client (PHP_VALUE and PHP_ADMIN_VALUE)
 [2010-08-20 10:33 UTC] fat@php.net
Automatic comment from SVN on behalf of fat
Revision: http://svn.php.net/viewvc/?view=revision&revision=302531
Log: Fix #52609 (INI scanner did not use ZEND_INI_SCANNER_NORMAL)
 [2010-08-20 10:34 UTC] fat@php.net
-Status: Assigned +Status: Closed
 [2010-08-20 10:34 UTC] fat@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2011-04-01 22:02 UTC] lbukata at seznam dot cz
This bug is reproducible with php version 5.2.17.
This version should be also patched.

Thank a lot.
 [2011-04-01 22:13 UTC] rasmus@php.net
We did not start to ship fpm with PHP until PHP 5.3.3 so we can't fix it in PHP 
5.2.x
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 07:01:27 2024 UTC