简体   繁体   中英

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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM