This thread is resolved. Here is a description of the problem and solution.
Problem:
I can't login to /wp-admin following fatal error: Uncaught Error: Call to undefined function simplexml_load_file()
Solution:
The SimpleXML extension is not active on the server. Forcing a re-install of XML solved it.
apt-get --reinstall install php7.3-xml
Check the errata link.
Relevant Documentation:
- https://wpml.org/errata/php-7-possible-issues-simplexml/
- https://stackoverflow.com/questions/49447168/call-to-undefined-function-simplexml-load-file
- https://stackoverflow.com/questions/35593521/php-7-simplexml
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 7 replies, has 3 voices.
Last updated by Dražen 4 years, 4 months ago.
Assisted by: Dražen.
Author | Posts |
---|---|
September 24, 2020 at 8:26 am #7087829 | |
bertieB |
I can't login to /wp-admin following upgrade to php 7.3 (see error below) Fatal error: Uncaught Error: Call to undefined function simplexml_load_file() in /var/www/xxxxxxxx/www/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-wp-installer.php:817 Stack trace: #0 /var/www/xxxxxxxx/www/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-wp-installer.php(71): WP_Installer->load_repositories_list() #1 /var/www/xxxxxxxx/www/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-wp-installer.php(50): WP_Installer->__construct() #2 /var/www/xxxxxxxx/www/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/functions-core.php(3): WP_Installer::instance() #3 /var/www/xxxxxxxx/www/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/installer.php(15): WP_Installer() #4 /var/www/xxxxxxxx/www/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/loader.php(164): include_once('/var/www/my_web...') #5 /var/www/xxxxxxxx/www/wp-includes/cla in /var/www/xxxxxxxx/www/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-wp-installer.php on line 817 I looked at this page But I am not on Ubuntu, I'm on Debian GNU/Linux 10 (buster) apt-get upgrade I contacted the support of my server and ran That didn't solve the problem. I did So it looks likes simplexml is not installed. I tried Reading package lists... Done |
September 25, 2020 at 8:50 am #7097703 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, Thank you for contacting WPML support! Before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process. If you run phpinfo (hidden link) on your site root, do you see this? If not there, then SimpleXML is still not active (may require server restart) and there is nothing we can help with. Regards, |
September 25, 2020 at 12:58 pm #7099755 | |
bertieB |
Hi Bruno, I created a php file And SimpleXML appears twice Module Authors Additional .ini files parsed you can view the file here I hope we can fix it as I have a webinar in a couple weeks with Saleforce and many French NGOs so the French version is important. Thanks, Bertie |
September 28, 2020 at 12:37 pm #7114861 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello Bertie, thanks for getting back. Sorry for waiting, we have a higher queue these days. Sometimes phpinfo can show SimpleXML enabled even if it is not working correctly or set up and running on the server. Typically on Debian systems, you have different PHP configuration for CLI and for PHP running as say an Apache module. Your phpinfo page may very well show SimpleXML as being enabled via web server, while it is not enabled via CLI. To check if the module is enabled and running you can try creating a new PHP file with the next code and opening it. If you have SimpleXML enabled you will get the next message: ""SimpleXML functions are available.". <?php if (function_exists('simplexml_load_file')) { echo "simpleXML functions are available.<br />\n"; } else { echo "simpleXML functions are not available.<br />\n"; } What can I suggest is: - try installing another version, for example, php7.2-xml - Contact you hosting support and make sure SimpleXML is installed, enabled working as excepted - Please check the next StackOverflow pages for a possible solution: - https://stackoverflow.com/questions/49447168/call-to-undefined-function-simplexml-load-file Please let me know how it goes. Kind regards, |
October 1, 2020 at 7:25 am #7140993 | |
bertieB |
Hi, |
October 1, 2020 at 1:43 pm #7144111 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, thanks for the feedback. Yes, that then means SimpleXML is not activated, which is required for WPML to work correctly: - https://wpml.org/home/minimum-requirements/ I am sorry that I could not provide any more help, but this is an issue up to the hosting/server. I tried my best to propose solutions that worked for other users, but unfortunately, they seem to not work for you. I can only suggest to try on another hosting or other proposed solution from Stackoverflow. Hope you understand. Kind regards, |
October 4, 2020 at 9:46 am #7159375 | |
bertieB |
For info, and to close the ticket. apt-get --reinstall install php7.3-xml |
October 5, 2020 at 6:14 am #7161947 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Great! 🙂 Glad to hear your issue is now solved. I will be closing this ticket and marking it as resolved. I hope I was helpful. Don't hesitate to ask if you find any problem in the future, I'll gladly help you. Regards, |