I'm having some issues with my Magento installation. At the checkout I get the following error:
Call to undefined function mb_convert_encoding() in public_html/cpanel_user/lib/Pelago/Emogrifier.php on line 556
From research on Google and SO it seems to be a issue with MB-STRING.
I'm running CentOS with WHM/cPanel on top.
I installed the extension using the following command:
yum install php-mbstring
Rebooted the httpd via the following command:
service httpd restart
If you need anymore info let me know, I'm desperately looking to solve this issue.
Related
After following the install instructions for oracle instant client, php is not able to load the oci8 extension.
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst
I am getting an error.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/oci8.so' - libmql1.so: cannot open shared object file: No such file or directory in Unknown on line 0
I have verified both oci8.so and libmql1.so locations.
Am I missing something?
I'm using Ubuntu 16.04 and php version 7.1
There are few directories in /usr/lib/php/
for example
20131226 for php5.6
20160303 for php7.1
so problem with me that, the oci8 extension got installed on the wrong ( a user lib folder for php7.2) so I had to remove the php 7.2 completly
sudo apt-get purge php7.2-common
then I had uninstall the oci8 by running following command
sudo pecl uninstall oci8
and install again by running the following command
sudo pecl install oci8
To check the configuration loaded you do
php-config --extension-dir
And make sure that all extension are installed in the correct extension directory.
Make changes in the /etc/php/7.1/apache2/php.ini and /etc/php/7.1/cli/php.ini
Check by running phpinfo(); You must see this, ignore the cli if that stills gives you same error as your web shows the extension is getting loaded.
I solved adding the following to /etc/environment:
LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH
I followed this tutorial: https://gist.github.com/hewerthomn/81eea2935051eb2500941a9309bca703
What I did was completely remove any installations of PHP and reinstall the version that I need.
sudo apt-get purge 'php*'
Source: https://askubuntu.com/a/59889/226518
Or:
export LD_LIBRARY_PATH=/usr/local/instantclient_12_1/
I had the same problem, it works for me.
After wasting entire day for this small problem finally I came with this solution.
Sorry guys I am not champion is PHP but somehow I manage.
In my system I have CentOS 7 and PHP 7.4.XX.
I changed my LD_LIBRARY_PATH,
I have restarted my httpd service and checked phpinfo in browser (http://localhost/info.php),
Last I restared php-fpm service ........... and it's work for me.
Thanking you,
Anand
After following the install instructions for oracle instant client, php is not able to load the oci8 extension.
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst
I am getting an error.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/oci8.so' - libmql1.so: cannot open shared object file: No such file or directory in Unknown on line 0
I have verified both oci8.so and libmql1.so locations.
Am I missing something?
I'm using Ubuntu 16.04 and php version 7.1
There are few directories in /usr/lib/php/
for example
20131226 for php5.6
20160303 for php7.1
so problem with me that, the oci8 extension got installed on the wrong ( a user lib folder for php7.2) so I had to remove the php 7.2 completly
sudo apt-get purge php7.2-common
then I had uninstall the oci8 by running following command
sudo pecl uninstall oci8
and install again by running the following command
sudo pecl install oci8
To check the configuration loaded you do
php-config --extension-dir
And make sure that all extension are installed in the correct extension directory.
Make changes in the /etc/php/7.1/apache2/php.ini and /etc/php/7.1/cli/php.ini
Check by running phpinfo(); You must see this, ignore the cli if that stills gives you same error as your web shows the extension is getting loaded.
I solved adding the following to /etc/environment:
LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH
I followed this tutorial: https://gist.github.com/hewerthomn/81eea2935051eb2500941a9309bca703
What I did was completely remove any installations of PHP and reinstall the version that I need.
sudo apt-get purge 'php*'
Source: https://askubuntu.com/a/59889/226518
Or:
export LD_LIBRARY_PATH=/usr/local/instantclient_12_1/
I had the same problem, it works for me.
After wasting entire day for this small problem finally I came with this solution.
Sorry guys I am not champion is PHP but somehow I manage.
In my system I have CentOS 7 and PHP 7.4.XX.
I changed my LD_LIBRARY_PATH,
I have restarted my httpd service and checked phpinfo in browser (http://localhost/info.php),
Last I restared php-fpm service ........... and it's work for me.
Thanking you,
Anand
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'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
Currently the connection from my ec2- amazon ami instance to elasticache does not work
I attempt to connect and fail with
$server_endpoint = "lolololo.olol.olol.cache.amazonaws.com";
$server_port = 11211;
$dynamic_client = new Memcached();
$dynamic_client->setOption(Memcached::OPT_CLIENT_MODE, Memcached::DYNAMIC_CLIENT_MODE);
// it fails on previous line
// Fatal error: Undefined class constant 'OPT_CLIENT_MODE' in
$dynamic_client->addServer($server_endpoint, $server_port);
$dynamic_client->set('key', 'value', 60);
Steps i took
sudo yum install gcc-c++ php php-pear
sudo pecl install myplaceontheweb.com/assets/AmazonElastiCacheClusterClient-1.0.1-PHP53-64bit.tgz
sudo yum install php-devel
from root:
add
extension=memcached.so
extension=amazon-elasticache-cluster-client.so
to /etc/php.d/memcached.ini
php info says memcached is an installed part of php, i have rebooted the server after doing all of this.
sudo find . -type f -name 'amazon*.so'
yeilds ./usr/lib64/php/modules/amazon-elasticache-cluster-client.so
and it doesn't work by direct linking as an extension either
Is there anything obvious i am doing wrong? can anyone suggest a fix?
I don't know if I did this right, but I was having similar problems and finally got it working.
I was trying to install ElastiCache Cluster Client for PHP on Ubuntu 14.04 with Apache, but kept getting the "Memcached not found" error.
First, I followed the directions here:
http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Appendix.PHPAutoDiscoverySetup.html
with two changes
A. I downloaded the tookit from
http://elasticache-downloads.s3.amazonaws.com/ClusterClient/PHP-5.5/latest-64bit
B. In addition to adding a memcache.ini file to /etc/php5/cli/conf.d/, I also added one to /etc/php5/apache2/conf.d/
echo "extension=/full/path/to/amazon-elasticache-cluster-client.so" | sudo tee /etc/php5/apache2/conf.d/memcached.ini
That's it.
The only other gotchas are make sure you don't have php5-memcached already installed, and also make sure you're downloading the correct version of the Cluster Client tools for your system.
It appears that amazon-elasticache-cluster-client.so is suppose to replace memcached.so. You should remove extension=memcached.so and restart php.