Topic on Project:Support desk

Jump to navigation Jump to search

[RESOLVED] Warning: is_executable(): open_basedir restriction in effect

10
Cavila (talkcontribs)

Since I've started a data refresh process that's necessary for Semantic MediaWiki, I'm seeing the following error message at the bottom of every page:

Warning: is_executable(): open_basedir restriction in effect. 
File(/usr/bin/php) is not within the allowed path(s): 
([...]/:/tmp/) in [...]/includes/Wiki.php on line 655 

Line 655 refers to something beginning

if ( !wfShellExecDisabled() && is_executable( $wgPhpCli ) )

No shell access as I'm on a shared host (with Suhosin enabled). Decreasing JobRunRate from "1" to e.g. "0.5" helps somewhat to reduce occurrences of the error message, but it does not solve the issue, let alone speed up the process.

With some googling you'll find a variety of solutions for PHP configuration issues involving "open_basedir restriction in effect", but almost none of them seems to cover this specific situation. The exception may be here, where the third suggestion about setting $wgPhpCli to a dummy value (?) might or might not be helpful in my case.

Any idea what could be done about it?

Cavila (talkcontribs)

Some additional notes. The problem persists even if the refresh process has been cancelled. I also noticed that a lot of wikis are affected by the same issue, although no bugzilla report has been submitted yet.

Cavila (talkcontribs)

OK, this may be a bug in MW 1.22:

  • $wgPhpCli used to have a default value of 'php', without any requirement to set it explicitly in LocalSettings.php.
  • In MW 1.22, the default value appears to have become '/usr/bin/php', pointing to a file which does not exist, hence the error message above. Explicitly reverting to a value of 'php' woukd appear to solve the issue.

Is that correct?

Ciencia Al Poder (talkcontribs)

It was changed to /usr/bin/php even before than 1.19.

You can change $wgPhpCli in your LocalSettings if you need to, that's fine if that solves your problem.

Cavila (talkcontribs)

Thanks for responding. There have not been any issues on my MW 1.19.7 installation, so something else must be involved. But at least the error message no longer shows up.

Sophivorus (talkcontribs)

Had the same problem in 1.23alpha installations and fixed it by setting $wgPhpCli = 'php';

122.101.20.5 (talkcontribs)

Thanks for Fix it.

Before:global $wgJobRunRate, $wgPhpCli, $IP;   ... 639 Line
After:global $wgJobRunRate, $wgPhpCli, $IP;    ...639 Line
             $wgPhpCli = 'php';               ...640 Line
Benby (talkcontribs)

Adding $wgPhpCli = 'php'; to /wiki/LocalSettings.php worked on my configuration as well. Thanks for sharing.

(In my LocalSettings.php I actually had to add a new line for $wgPhpCli. Searching for that variable only gave me occurences in DefaultSettings.php - just an addition which may help other MediaWiki newbies like me.)

Cavila (talkcontribs)

There may be a catch though. I now have a job queue of well over a million. Does MW somehow need this to run jobs?

Cavila (talkcontribs)
Reply to "[RESOLVED] Warning: is_executable(): open_basedir restriction in effect"