Page MenuHomePhabricator

Use exec() function when shell_exec() function is disabled
Closed, ResolvedPublic


Author: ben

While uploading images I was getting the error "shell_exec() has been disabled for
security reasons". To fix this problem I have made the following core code changes to
the "wfShellExec()" function in the includes/Globalfunctions.php file. I am receiving
this error because my ISP has disabled the shell_exec php function but this problem can
also be reproduced if the server is in safe mode.

I would like to know if this basic functionality can be added to the core code. Error
code would be needed to be added to check if shell_exec() is disabled on the server or
not, it should then use the exec() function instead of shell_exec().

What are your thoughts? Can this be added?

"changes made to -- Globalfunctions.php --
1616 #return shell_exec( $cmd );
1617 return exec( $cmd );"

You can view [
60m_receive_this_warning_during_installing_Wiki_.26_then_Thumb.60s_don.27t_created] as a

Version: 1.6.x
Severity: major
OS: Windows XP
Platform: PC



Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 9:21 PM
bzimport set Reference to bz6298.
bzimport added a subscriber: Unknown Object (MLST).
  • This bug has been marked as a duplicate of 5405 ***