When I'm trying to run a command in PHP, I am getting these warnings:

Warning: exec() has been disabled for security reasons in /home/panel/public_html/index.php on line 63

Now. I looked in cPanel WHM to be welcomed with a message of:

So... as you can see Safe Mode is turned off.

Stats:
Dedicated server
cPanel 11/WHM

If anyone has any ideas, feel free to post. :3

EDIT:
Warning: phpinfo() has been disabled for security reasons in /home/westie/public_html/info.php on line 1

Haha. Same problem :/

Dani AI

Generated

A practical checklist for (and thanks to for pointing at php.ini):

A few places can block functions even with Safe Mode off: the active php.ini (global or per-user when using suPHP/CGI), and security patches/modules (Suhosin, custom WHM tweaks). The quickest way to see what the web SAPI is using and which functions are blacklisted is to drop a tiny script in the webroot and view it in a browser:

<?php
echo 'SAPI: '.php_sapi_name()."\n";
echo 'Loaded php.ini: '.php_ini_loaded_file()."\n";
echo 'disabled: '.ini_get('disable_functions')."\n";
?>

If the output lists the functions in question, edit the indicated php.ini (common locations: /usr/local/lib/php.ini or /etc/php.ini, but trust the script output). Search the system for other php.ini fragments (for example, grep -R "disable_functions" /etc /usr/local -n 2>/dev/null) because include-dir settings or per-user ini files can override the global file. After changing the disable_functions line, restart the web PHP service (apache/httpd or php-fpm) so the change takes effect.

Security notes: re-enabling exec/system/shell_exec increases risk. Prefer safer alternatives (well-sanitized arguments, escapeshellarg/escapeshellcmd, or a permission-limited wrapper script run by a separate user). If a hosting policy or Suhosin is blocking functions, adjust only with full understanding of the exposure and audit the sites that will gain those capabilities.

This is kept in your php.ini

You should look it over and enable the features you require for your application.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.