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 a 
    php.ini or .user.ini file 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() and passthru() 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.php

    The same message may refer to  shell_exec() or passthru().

    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:

    1. 1
      Log in to the xneelo Control Panel.
    2. 2
      Select a product (Web Hosting or Managed Servers) from the side menu.
    3. 3
      Select the domain name.
    4. 4
      Under 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_errors while troubleshooting, but remember to disable it afterwards. Displaying PHP errors on a live website is not recommended.

    See How to enable the displaying of PHP error messages.





  • 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() or passthru().

    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.