Page MenuHomePhabricator

external PHP can't be started - open_basedir not checked
Closed, ResolvedPublic


Probably since job handling starts an external php process by default.

This fails if open_basedir does not contain /usr/bin/

There should be a check for the open_basedir, and an automatic fallback to the internal job queue.

Version: 1.22.1
Severity: major
See Also:



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:05 AM
bzimport set Reference to bz60208.
bzimport added a subscriber: Unknown Object (MLST).

I agree. Note that the open_basedir check should not be done against /usr/bin/, but against the actual value of $wgPhpCli (which defaults to /usr/bin/, but also might be different).

In master this already checks is_executable(), which should handle open_basedir.

Maybe, but it still logs a warning every time it looks for the PHP binary :-(

From my error_log: (domains replaced with

[error] [client IP_HIDDEN] PHP Warning: is_executable(): open_basedir restriction in effect. File(/usr/bin/php) is not within the allowed path(s): (/home/www/ in /home/www/ on line 652, referer:

Change 113038 merged by jenkins-bot:
Moved job running via $wgJobRunRate to a special API