how to enable shell_exec

Status
Not open for further replies.

msk19994

Active Member
2,813
2011
567
25
Hey Guys
I wanted to ask you how to enable shell_exec on a server
i have a dedicated server and have a kloxo panel i remove the shell_exec from the not allowed in the php.ini what elese to do to make it work
Thanks
 
17 comments
I don't want to say this again, freaking backup your files before you edit a single letter of your files first, then proceed with the work.

Below are the exact steps to enable a particular PHP function:

1. Remove all functions from disable_functions in php.ini
2. Add functions in php.ini suhosin.executor.func.blacklist = “” those you want to disable globally.

After that in the virtual host section of a domain you can add below code to enable a function only for one domain:

<VirtualHost 127.0.0.1>
………..
<IfModule mod_php5.c>
php_admin_value suhosin.executor.func.blacklist = “shell_exec”
</IfModule>
……
</VirtualHost>

In this example shell_exec has been enabled for the VirtualHost.
 
^ i already saw that when googled can u explain more clearly that like i rRemove all functions from disable_functions in php.ini
and leave it blank ''
Add functions in php.ini suhosin.executor.func.blacklist = “” those you want to disable globally.
so in the end of php.ini i add this code
suhosin.executor.func.blacklist = “”
those you want to disable globally.
i dont understand this
and
<VirtualHost 127.0.0.1>
………..
<IfModule mod_php5.c>
php_admin_value suhosin.executor.func.blacklist = “shell_exec”
</IfModule>
……
</VirtualHost>

In this example shell_exec has been enabled for the VirtualHost.
what the heck is the VirtualHost section please explain ?
 
^ i already saw that when googled can u explain more clearly that like i rRemove all functions from disable_functions in php.ini
and leave it blank ''

so in the end of php.ini i add this code
suhosin.executor.func.blacklist = “”

i dont understand this
and

what the heck is the VirtualHost section please explain ?

You should have suhosin installed for this to work.

At your disable_functions line on your php.ini file you should see this:
Code:
disable_functions = show_source,system,shell_exec,passthru,exec,phpinfo,proc_open
or something quite similar to that, Replace that line with this:

Code:
disable_functions = show_source,system,passthru,phpinfo,proc_open;


After that, restart Apache by executing the following command:

Code:
[COLOR=#666666][I]service httpd restart[/I][/COLOR]
The virtual host thing is needed only if you want to apply those rules for a single Domain
 
so to be extra caucious i saw two php.ini files
ie 1 in /etc/php.ini
and the other in /home/httpd/uploadvideos.tv/php.ini
and then both of the times i did service httpd restart
did i do it right ?>
if not then ill pm some 1 my ssh details so that person can do it for me
 
Hey Guys
I wanted to ask you how to enable shell_exec on a server
i have a dedicated server and have a kloxo panel i remove the shell_exec from the not allowed in the php.ini what elese to do to make it work
Thanks
If you didn't do this in the kloxo panel you probably didn't update the correct one.

When kloxo first starts at the bottom on the right side of icons is php config and when you click advanced in php config is the line with the excluded.

Then under services for httpd click the right 3rd blue circle to restart it.
 
mate ^ yes it was still there i did it i mean remove form advanced but still i error is there
ie my uploader is saying its still uploading i actually did a ssh reset of apache too but still didnt work and also went in the domain area also changed there but still same
 
Status
Not open for further replies.
Back
Top