PHP execution functions are disabled
On Web Hosting and Managed Servers, the PHP functions exec(), shell_exec() and passthru() are disabled by default for security reasons.
These functions allow PHP scripts to run operating system commands on the server. If a website is compromised, this capability could be misused to run harmful commands. Disabling these functions helps reduce this risk.
Most websites, including WordPress, Drupal and Joomla, work without these functions. If your website does not use them, no action is needed.
-
Which products this applies to
These functions are disabled by default on:
- Web Hosting
- Managed Servers
This applies to every domain hosted on these products.
The PHP Config tool does not include an option to enable these functions. Adding aphp.inior .user.inifile to your website files will not override this restriction.On a Self-Managed Server, you administer the server and control its PHP configuration, including these settings.
A Managed Server, although dedicated to your account, is administered by xneelo and uses the same PHP defaults as Web Hosting. Moving from Web Hosting to a Managed Server will therefore not enable these functions.
-
Why these functions are restricted
The
exec(),shell_exec()andpassthru()functions allow PHP scripts to execute commands directly on the server.If a website is compromised, an attacker could misuse these functions to download files, modify website content or execute other commands under the hosting account.
Disabling these functions closes off this potential route of misuse. It is a security measure applied at platform level and does not replace the need to keep your website and applications secure.
-
What if your website uses these functions
If a PHP script attempts to call one of these functions, PHP blocks the call and records an error similar to:
PHP Fatal error: Uncaught Error: Call to undefined function exec() in /usr/www/users/FTP-USER/script.phpThe same message may refer to
shell_exec()orpassthru().Depending on how your website uses the function, you may notice:
- A blank page, or a page that only loads partially.
- A specific website feature that stops working, while the rest of the website remains accessible.
- An error recorded in your website or PHP error log.
Some custom applications, scripts and features may rely on these functions. Examples include certain Laravel or Symfony tasks, PDF generation, image or video processing and bespoke PHP scripts.
Your online shop, contact form or WordPress admin area may continue working normally, even if an individual plugin or script is affected.
How to check for errors
To check the error log in the xneelo Control Panel:
-
1Log in to the xneelo Control Panel.
-
2Select a product (Web Hosting or Managed Servers) from the side menu.
-
3Select the domain name.
-
4Under Hosting tools, select Error Logs.
If you still use konsoleH, open the relevant domain and check its error log for the same message.
Your web developer can also check your application’s own logs for calls to these functions.
For more information, see How to enable PHP error logging.
You can temporarily enable
display_errorswhile troubleshooting, but remember to disable it afterwards. Displaying PHP errors on a live website is not recommended.
-
What to do if your website is affected
Share this article with your web developer and ask them to identify the script, application or plugin attempting to use
exec(),shell_exec()orpassthru().Where possible, your developer should replace the affected functionality with a PHP library or maintained plugin that performs the task without executing operating system commands.
For example:
- Use a PHP library to generate PDFs.
- Use a maintained plugin for image processing.
- Use Cronjob Manager to schedule PHP scripts that do not rely on these functions.
See How to manage your cronjobs via the xneelo Control Panel.
-
When a different product is a better fit
If your website or application requires these PHP functions, a Self-Managed Server may be a better fit.
With a Self-Managed Server, you are responsible for administering the server, including installing software and managing your own PHP configuration and security settings.
For more information about the limits of custom requests on a Managed Server, see Customisations to our standard Managed Server configuration.
Feedback
Related Posts:
- PHP resource limits for shared Web Hosting
- What directives can be changed with the PHP Config tool via the xneelo Control Panel?
- How to view your error logs in the xneelo Control Panel
- Can database triggers, functions, stored procedures or views be added to a database?
- FAQ: How to upgrade to PHP 8.3 via the xneelo Control Panel





