Skip to content

Call to undefined function simplexml_load_string() when running cron

I am getting this error when running cron.php on a Magento 1.9 site that I recently migrated to a new server. Everything was working correctly on the old one, now I get the error below:

Call to undefined function simplexml_load_file() in var/www/app/Mage.php:767

Line 767 on that file is as follows:

$localConfig = simplexml_load_file($localConfigFile);

I used function_exists('simplexml_load_file') right above that line and that came out true. I also checked that I have have all the required libraries in place. I also tried to run the cron.php file using a terminal (I am on a Plesk server) and it worked just fine.

Current environment:

  • Plesk 18.0.64 on AlmaLinux 8.10
  • PHP 7.1.33
  • Apache + nginx

The setup is the same as the old server, I just migrated to a more powerful machine.

Anyone with an idea of what is going on here? What am missing?