I've been stuck at this error for hours now and I can't seem to find anything useful on the internet about it. The error is the classic
Fatal error: Class 'SimpleXMLElement' not found in
/var/www/NavPHP/nav/plugin/log/NavLog.php on line 29
I'm not using Namespace so that's not the problem.
It's a project that works fine in production and used to work in my former computer with WampServer and PHP 5.6.2. Now that I got a new computer, I'm interested in setting up a virtual environment with puphpet, but I'm getting this error.
According to Docs, the SimpleXMLElement class should come with PHP by default. I didn't find any important information on php.ini and in my phpinfo() there's the following:
SimpleXML Sterling Hughes, Marcus Boerger, Rob Richards
Any tips?
Thanks
Update
Just to add this
The problem was that I was using Cent OS and in this Linux Distribution, the php-libxml package does not come as default.
I ended up generating a new machine through PuPHPet GUI and added to the System Package the following packages to be installed:
php-xml, php-simplexml
Problem solved.
For those using PHP 7 and Ubuntu, #MPS solved it by running apt-get install php7.0-xml and service apache2 restart.
On Centos, we need to install the XML php package. You can try yum install php56w-xml or yum install php70w-xml if you're using php70w repository for PHP 7.0
I faced this issued and finally solved by run following command :
apt install php5.6-xml
After it reload and restart apache2 service :
service apache2 reload
service apache2 restart
And a PHP restart may be required
systemctl restart php-fpm
If you are running ubuntu in AWS Cloud 9. Then from your menu bar->Window->New Terminal->type sudo apt install php-xml
Related
I have a requirement where I need to update the PHP and PHP-fpm to the latest version of the server. this server is hosted using Nginx and WordPress. We are using amazon Linux 2 when I disable php7.4 and enable php8 in amazon-Linux-extras and install I'm getting an error.
php error
I have a couple of questions:
what happens when I uninstall and install PHP to the latest version does it after the site?
Do we have any workaround for this PHP error?
Thanks in advance.
I'm expecting a solution to update my PHP to the latest version without any issues. I have just started learning DevOps. I'm not familiar with these errors
I removed php-json by sudo yum remove php-json and installed of php
sudo yum install php php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip}
Still the application works.
php-json is available in Amazon Linux Extra topic "php7.4"
$ sudo amazon-linux-extras install php7.4
I have a problem when i consume a Weservice SOAP with php from my instance in AWS (Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-1022-aws x86_64)). When I consume this service (http://fakeurl:fakeport/DynamicsNAV/WS/Company/Codeunit?wsdl) in my localhost, it work! but in production (AWS) not work and show this error:
SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://fakeurl:fakeport/DynamicsNAV/WS/Company/Codeunit?wsdl' : failed to load external entity "http://fakeurl:fakeport/DynamicsNAV/WS/Company/Codeunit?wsdl"
Is there anything I can do?
Any settings I can make?
I already installed php-soap and I already configured the php.ini but not work. In DigitalOcean it work.
I've had a similar problem and worked out it was SELinux that was blocking the call - you could try disabling that first as a try...
I installed this components in Ubuntu:
sudo apt-get install -y tmux curl wget php7.0-curl php7.0-gd php7.0-intl
After that I rebooted the server.
Recently I have installed TYPO3 CMS 8 in my local server, after all configuration wizard finally I got error like "Call to undefined function TYPO3\CMS\Core\Localization\Parser\simplexml_load_string()".
Can anyone help me for resolving this error.
This is php extension error. install php7.0-xml using below command and after restart your apache server.
sudo apt-get install php7.0-xml
sudo service apache2 restart
I found this in german: https://forum.typo3.org/index.php/t/214932/-typo3-german-gel-st-simplexml-problem-typo3-7-6-und-php-7-auf-ubuntu-server-16-04
SimpleXML is not active by default in PHP 7 on Ubuntu. See
http://stackoverflow.com/questions/35593521/php-7-simplexml. After
activate them all works.
I am running an Ubuntu 12.04 Apache2/PHP/MYSQL server that was using a deprecated version of PHP. I realized this once I tried to install the sqlite3 extension I get an error:
Failed to fetch http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/dists/precise/main/source/Sources
Research shows me that this is no longer used and instead use ondrej/php instead. This is a production server and I need to figure out steps to replace the PPA with the correct one.
Will I need to uninstall PHP and reinstall using the new packages? If so how should I go about doing this cleanly?
Is there a way to temporarily install sqlite3 without having to change repositories completely (I do not have php-dev installed at the moment either).
First you should check if there are any compatibility issues with the version you want to upgrade to (did a quick google to find this: https://github.com/squizlabs/PHP_CodeSniffer). Then, add the repository that contains the version you want, sudo apt-get update and install the version of php you want. To switch the version apache uses, do the following:
sudo a2dismod php5
sudo a2enmod php5.6
sudo service apache2 restart
I am trying to install php-mbstring with php 5.6 and I get this error:
Error: php56w-common conflicts with php-common-5.4.45-3.el6.remi.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I have attempted to install php56-mbstring, but I get the following. I am not sure if this means it is already installed or not:
Nothing to do
What is the most appropriate package to install? Which one should I be trying to resolve and how can I resolve it. Thanks!
I run into same problem with my server running PHP 5.6.17. For me it seems that the extension that I was looking for was php56w-mbstring.x86_64
It can be found from webtatic repository. I don't remember enabling that by myself, but in case it is missing here is the instructions how to enable said repo: http://www.certdepot.net/rhel7-install-webtatic-repository/
You can list available repos in your server by command yum repolist
To search if your repos has something related to mbstring use command yum list *mbstring*
So solution for me was this: yum install php56w-mbstring.x86_64
Finally restart Apache: service httpd restart
By the way, I am running CentOS server so your commands might be slightly different on your OS.
Have you added the module to your PHP.ini file extension=php_mbstring.dll
I tried and tried everything until i came to this link. https://docs.phpmyadmin.net/en/latest/setup.html#debian-setup
I run /usr/sbin/pma-configure and bam I had phpmyadmin working without the mbstring error
there is so many setups now that it is hard to find the one you need.
running ubuntu 14.04 with 4 versions of php installed with virtualmin webmin cp. Debian and Ubuntu changed the way how setup is enabled and disabled. few just happy this is working now. hope this helps you spend less time that i did to find this solution.