title: how to enable shell_exec and exec on php?
body: <p>(There is some mention of this online, but none of the solutions worked.)
  I want to be able to use shell_exec and exec from a PHP script.</p>
  <p>Meaning, use:</p>
  <pre><code>&lt;? exec(&quot;echo hello world&quot;); ?&gt; 
  </code></pre>
  <p>or</p>
  <pre><code>&lt;? shell_exec(&quot;echo hello world&quot;); ?&gt;
  </code></pre>
  <p>According to a link I found online (<a href="http://forums.cpanel.net/f5/enable-shell_exec-one-user-109601.html" rel="nofollow noreferrer">http://forums.cpanel.net/f5/enable-shell_exec-one-user-109601.html</a>), one way to do it is to add under VirtualHost the directives:</p>
  
  php_admin_value suhosin.executor.func.blacklist = “shell_exec”
  
  <p>but when I looked at the configuration file, trying to restart the webserver, I get:</p>
  <pre><code>28/07/14 17:18:26:    Syntax error on line 1 of /etc/httpd/conf.d/serv1.conf:
  28/07/14 17:18:26:    php_admin_value takes two arguments, PHP Value Modifier (Admin)
  </code></pre>
  <p>and the server is not restarted.</p>
  <p>Any ideas how to enable exec and shell_exec? I can't trace the origin of this error.</p>
  <p>EDIT: I am not the root on the machine. I couldn't find an php.ini file, but there is an /etc/httpd/conf.d/php.conf file and it has no disable_functions.</p>
  <p>Here it is:</p>
  <pre><code>#
  # PHP is an HTML-embedded scripting language which attempts to make it
  # easy for developers to write dynamically generated webpages.
  #
  &lt;IfModule prefork.c&gt;
  LoadModule php5_module modules/libphp5.so
  &lt;/IfModule&gt;
  &lt;IfModule worker.c&gt;
  LoadModule php5_module modules/libphp5-zts.so
  &lt;/IfModule&gt;
  
  #
  # Cause the PHP interpreter to handle files with a .php extension.
  #
  AddHandler php5-script .php
  AddType text/html .php
  
  #
  # Add index.php to the list of files that will be served as directory
  # indexes.
  #
  DirectoryIndex index.php
  
  #
  # Uncomment the following line to allow PHP to pretty-print .phps
  # files as PHP source code:
  #
  #AddType application/x-httpd-php-source .phps
  </code></pre>