I need help from server admin. Kinldy enable shell_exec() for my account.

Status
Not open for further replies.

Safwan

New Member
Messages
22
Reaction score
0
Points
0
Hello. My domain name is www.pjmhs.com

I have installed a journal CMS on the website: http://pkp.sfu.ca/ojs The CMS requires shell_exec() function. It gives me an error when i try to upload an image file through the CMS configuration screen.

Code:
Warning:  shell_exec() has been disabled for security reasons in /home/safwan/public_html/annals/classes/core/String.inc.php on line 288
I searched the internet and found instructions for enabling only function for one domain:

You can however use suhosin to enable a function for one domain only.
How can you do that ?
After installing suhosin, remove all functions from disable_functions in php.ini and add in php.ini suhosin.executor.func.blacklist = "exec,passthru,shell_exec" and all the functions that you whant to disable globally.
After that for each domain in the virtual host section you can add suhosin.executor.func.blacklist again but without the function that you need to enable. And so you will enable that function only for one domain.
Example:
<VirtualHost 127.0.0.1>
...........
...........
<IfModule mod_php4.c>
php_admin_value open_basedir "/usr/lib/php"
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir "/usr/lib/php"
php_admin_value suhosin.executor.func.blacklist = "passthru,shell_exec"
</IfModule>
.......
......
</VirtualHost>

In this example exec has been enabled for the VirtualHost.
This way it will be better as you do not neet to modify all the virtual hosts only the ones that you need to enable one or more functions.

suhosin is already on your server. Thanks. Reply soon.
Edit:
Can i get Intermediate Level PHP support? Thanks. I am unable to upload the logo to be displayed as my website header. I need that function. Kindly help. Thanks.
 
Last edited:

DeadBattery

Community Support Team
Community Support
Messages
4,018
Reaction score
120
Points
0
shell_exec() is a very dangerous PHP function so we have not enabled it for the Intermediate PHP version.
 
Status
Not open for further replies.
Top