Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282768 - PHP cli startup warns mm_create failure (permision denied)
Summary: PHP cli startup warns mm_create failure (permision denied)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
: 271053 309469 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-26 03:22 UTC by Barry Schatz
Modified: 2010-07-29 17:44 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Barry Schatz 2009-08-26 03:22:26 UTC
$ php --version
PHP Warning:  PHP Startup: mm_create(0, /session_mm_cli1000) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0
PHP 5.2.10-pl0-gentoo with Suhosin-Patch 0.9.7 (cli) (built: Aug 25 2009 20:04:48) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
    with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH


Reproducible: Always

Steps to Reproduce:
1. Run php --version on the command line as example output in "Description" above.
2.
3.

Actual Results:  
$ php --version
PHP Warning:  PHP Startup: mm_create(0, /session_mm_cli1000) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0
PHP 5.2.10-pl0-gentoo with Suhosin-Patch 0.9.7 (cli) (built: Aug 25 2009 20:04:48) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Expected Results:  
n/a

It should not have output the warning exhibited.

In addition, phpinfo() output to the browser reports that the Configure Command includes '--disable-cli'. Don't understand why that appears and don't recall if it was there when cli performed without the warning in previous php version compiles. But 'cli' is present in the USE flags list. Also, the Configure Command list includes '--with-mm'.
Comment 1 valli 2009-08-27 12:26:18 UTC
Uncomment the line
;session.save_path = "/tmp"
in the file
/etc/php/cli-php5/php.ini

As of 5.2.10 the default is /.
Comment 2 Nathan March 2009-08-28 17:56:35 UTC
(In reply to comment #1)
> Uncomment the line
> ;session.save_path = "/tmp"
> in the file
> /etc/php/cli-php5/php.ini
> 
> As of 5.2.10 the default is /.
> 

There's no way they changed the default to that as it doesn't make any sense whatsoever. I've filed a php bug report here: http://bugs.php.net/bug.php?id=49401

Comment 3 Serhij S. Stasyuk 2009-11-16 13:20:44 UTC
Seems it is related to http://bugs.php.net/49503
Comment 4 Matti Bickel (RETIRED) gentoo-dev 2010-04-05 22:29:02 UTC
*** Bug 271053 has been marked as a duplicate of this bug. ***
Comment 5 Matti Bickel (RETIRED) gentoo-dev 2010-04-05 22:32:42 UTC
I'm still looking into this.

For the short term you can either:
(1) set save_path explicitly.
(2) USE="-sharedmem" and emerge -C libmm

I didn't have problems without libmm (or with USE="apache2" for that matter)

--disable-cli *might* turn up because we're building php a couple of times (for
each SAPI you define). So your apache SAPI might not know about your CLI SAPI.
But that's just a guess.
Comment 6 Pacho Ramos gentoo-dev 2010-07-06 12:04:25 UTC
(In reply to comment #5)
> I'm still looking into this.
> 
> For the short term you can either:
> (1) set save_path explicitly.

Matti, why don't you set it explicitly to proper value by default? It would solve most of sandbox violations some packages in the tree are suffering due that

Thanks
Comment 7 Ole Markus With (RETIRED) gentoo-dev 2010-07-06 20:00:40 UTC
Is this issue still around? It should have been fixed by upstream. At least I cannot reproduce with php-5.3.2
Comment 8 Pacho Ramos gentoo-dev 2010-07-08 09:50:34 UTC
*** Bug 309469 has been marked as a duplicate of this bug. ***
Comment 9 Matti Bickel (RETIRED) gentoo-dev 2010-07-09 13:51:46 UTC
Ole: you testing with USE="-apache2"? I haven't hit that with the apache2 SAPI, a bug report upstream hinted that this SAPI still defaults save_path to /tmp.
Comment 10 Matti Bickel (RETIRED) gentoo-dev 2010-07-29 17:44:53 UTC
I've added a little sed to uncomment ;session.save_path = "/tmp" in the config files. So this should be fixed now (at least I can't reproduce with USE="sharedmem cli -apache2 -cgi" php-5.3.3).

Thanks for the comments.