MediaWiki installation not loading, reporting "call to undefined function shell_exec"

Viewed 11

My installation of MediaWiki started reporting a fatal error and wouldn't load; after setting my LocalSettings to show more descriptive error reporting, the top error was that there was a call to an undefined function shell_exec in a particular PHP file. Everything was working before, and though I had made no changes to the site, it suddenly starting doing this.

1 Answers

After a morning of tracking things down, I discovered that my web hosting service had made a change to my configuration (and likely other customers') of PHP: they had disabled the "shell_exec" command in PHP, which allows PHP scripts to call shell commands (in my case, it was a call to getconf deep inside MediaWiki's code).

In my case, I was able to remove this restriction in cPanel (under MultiPHP INI settings) and everything began working just fine. I had no luck in finding anything about this online using my MediaWiki-specific search terms so I thought I'd drop this on SO in case someone else runs into the same problem.

Related