{"id":1342,"date":"2026-08-21T12:58:12","date_gmt":"2026-08-21T12:58:12","guid":{"rendered":"https:\/\/www.freethought.uk\/help\/?p=1342"},"modified":"2026-08-21T12:58:12","modified_gmt":"2026-08-21T12:58:12","slug":"php-disabled-functions-troubleshooting-guide","status":"publish","type":"post","link":"https:\/\/www.freethought.uk\/help\/php-disabled-functions-troubleshooting-guide\/","title":{"rendered":"PHP Disabled Functions: Troubleshooting Guide"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"overview\">Overview<\/h2>\n\n\n\n<p>For security reasons, certain PHP functions are disabled on Freethought hosting servers. These are typically system-level functions that allow PHP scripts to execute commands directly on the server. If your script relies on one of these functions, you may see an error when running it.<\/p>\n\n\n\n<p>This is most common when migrating a website from another host or from cPanel to ULTRA Cloud, as different servers have different security configurations.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"common-error-messages\">Common error messages<\/h2>\n\n\n\n<p>You may encounter one of the following errors in your browser or error logs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Fatal error: Call to undefined function shell_exec()<\/code><\/li>\n\n\n\n<li><code>Warning: exec() has been disabled for security reasons<\/code><\/li>\n\n\n\n<li><code>Fatal error: Call to undefined function system()<\/code><\/li>\n\n\n\n<li><code>Warning: passthru() has been disabled for security reasons<\/code><\/li>\n<\/ul>\n\n\n\n<p>These all indicate that the function your script is trying to use has been disabled at the server level.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-are-these-functions-disabled\">Why are these functions disabled?<\/h2>\n\n\n\n<p>Functions like <code>exec<\/code>, <code>shell_exec<\/code>, <code>system<\/code>, and <code>passthru<\/code> allow PHP scripts to run operating system commands directly on the server. On shared and managed hosting environments, these are disabled by default because:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>They pose a significant security risk if a site is compromised<\/li>\n\n\n\n<li>A malicious script could use them to access other accounts on the server<\/li>\n\n\n\n<li>They can be exploited to install malware, send spam, or damage the server<\/li>\n<\/ul>\n\n\n\n<p>This is standard security practice across the hosting industry and is not specific to Freethought.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-check-which-functions-are-disabled\">How to check which functions are disabled<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-1-create-a-phpinfo-file\">Option 1: Create a phpinfo file<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a file called <code>phpinfo.php<\/code> in your website&#8217;s root directory<\/li>\n\n\n\n<li>Add the following content:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php phpinfo(); ?&gt;<\/pre>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Visit <code>yourdomain.com\/phpinfo.php<\/code> in your browser<\/li>\n\n\n\n<li>Search the page for <strong>disable_functions<\/strong><\/li>\n\n\n\n<li>The value will list all currently disabled functions\n<ul class=\"wp-block-list\">\n<li>Delete the phpinfo.php file after checking. It exposes sensitive server information that should not be publicly accessible.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-2-check-your-error-logs\">Option 2: Check your error logs<\/h3>\n\n\n\n<p>In ULTRA Cloud, navigate to <strong>Debugging<\/strong> and Click <strong>Retrieve<\/strong> <strong>Logs<\/strong> to view recent PHP errors. On cPanel, check <strong>Errors<\/strong> in the main dashboard or review the <code>error_log<\/code> file in your site&#8217;s directory.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"can-i-enable-disabled-functions-myself\">Can I enable disabled functions myself?<\/h2>\n\n\n\n<p>No. The <code>disable_functions<\/code> directive is set at the server level in the PHP configuration and cannot be changed via <code>.htaccess<\/code>, <code>php.ini<\/code> overrides, or within your PHP scripts. This requires a server administrator to modify.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"requesting-a-function-to-be-enabled\">Requesting a function to be enabled<\/h2>\n\n\n\n<p>If your application genuinely requires a disabled function, contact Freethought support and include:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>The domain name<\/strong> affected<\/li>\n\n\n\n<li><strong>The exact function(s)<\/strong> you need enabled (e.g. <code>shell_exec<\/code>, <code>exec<\/code>)<\/li>\n\n\n\n<li><strong>What the function is used for<\/strong> (e.g. &#8220;My backup plugin uses exec to run mysqldump&#8221;)<\/li>\n\n\n\n<li><strong>The script or plugin<\/strong> that requires it<\/li>\n<\/ol>\n\n\n\n<p>Our team will review the request. In most cases, functions can be enabled on a per-account basis if there is a legitimate use case. However, some functions may remain restricted depending on the server environment and hosting plan.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"commonly-disabled-functions\">Commonly disabled functions<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Function<\/strong><\/td><td><strong>Purpose<\/strong><\/td><\/tr><tr><td><code>exec()<\/code><\/td><td>Executes a system command and returns the last line of output<\/td><\/tr><tr><td><code>shell_exec()<\/code><\/td><td>Executes a command via the shell and returns the full output<\/td><\/tr><tr><td><code>system()<\/code><\/td><td>Executes a command and displays the output directly<\/td><\/tr><tr><td><code>passthru()<\/code><\/td><td>Executes a command and passes raw output to the browser<\/td><\/tr><tr><td><code>popen()<\/code><\/td><td>Opens a pipe to a process for reading\/writing<\/td><\/tr><tr><td><code>proc_open()<\/code><\/td><td>Similar to popen but with more control over the process<\/td><\/tr><tr><td><code>eval()<\/code><\/td><td>Evaluates a string as PHP code<\/td><\/tr><tr><td><code>putenv()<\/code><\/td><td>Sets the value of an environment variable<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"workarounds-and-alternatives\">Workarounds and alternatives<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>WordPress plugins<\/strong>: Many plugins offer alternatives that don&#8217;t require system functions. Check plugin documentation for &#8220;safe mode&#8221; or alternative methods.<\/li>\n\n\n\n<li><strong>Built-in PHP functions<\/strong>: For file operations, use PHP&#8217;s native file functions (<code>copy()<\/code>, <code>rename()<\/code>, <code>unlink()<\/code>) instead of calling system commands.<\/li>\n\n\n\n<li><strong>Scheduled tasks<\/strong>: If you need cron-like behaviour, use the built-in cron scheduler in ULTRA Cloud or <strong>Cron Jobs<\/strong> in cPanel rather than executing commands via PHP.<\/li>\n\n\n\n<li><strong>Upgrade your plan<\/strong>: VPS and dedicated server plans typically have fewer restrictions, as you are not sharing resources with other customers.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"still-need-help\">Still need help?<\/h2>\n\n\n\n<p>If you&#8217;re unsure which function is causing the issue, or if you&#8217;d like us to review your use case, contact us at www.freethought.uk\/contact\/ and we&#8217;ll be happy to assist.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview For security reasons, certain PHP functions are disabled on Freethought hosting servers. These are typically system-level functions that allow PHP scripts to execute commands directly on the server. If your script relies on one of these functions, you may see an error when running it. This is most common&hellip;<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,22,3,28,26],"tags":[],"class_list":["post-1342","post","type-post","status-publish","format-standard","hentry","category-our-control-panel","category-access","category-cpanel","category-servers","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts\/1342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/comments?post=1342"}],"version-history":[{"count":1,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts\/1342\/revisions"}],"predecessor-version":[{"id":1346,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts\/1342\/revisions\/1346"}],"wp:attachment":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/media?parent=1342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/categories?post=1342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/tags?post=1342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}