PHP installation 5.6.7 - php

While upgrading php from php.5.3.25 to php5.6.7. got the below errors:
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/applications/php/lib/php/extensions/no-debug-non-zts-20131226/memcache.so' - /opt/applications/php/lib/php/extensions/no-debug-non-zts-20131226/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/applications/php/lib/php/extensions/no-debug-non-zts-20131226/ffmpeg.so' - /opt/applications/php/lib/php/extensions/no-debug-non-zts-20131226/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/applications/php/lib/php/extensions/no-debug-non-zts-20131226/mcrypt.so' - /opt/applications/php/lib/php/extensions/no-debug-non-zts-20131226/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0

The error is because you are trying to load those extensions which are not installed.Try this for installation in Ubuntu
sudo apt-get install memcached
sudo apt-get install mcrypt
sudo apt-get install mysql
FOR MORE REFERENCE

Related

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/gd.so' - /usr/lib/php/20151012/gd.so:

How to fix this message ?
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php/20151012/gd.so' - /usr/lib/php/20151012/gd.so: cannot
open shared object file: No such file or directory in Unknown on line
0
i think you need to install MCrypt module for php5.
Follow the step
sudo apt-get install php5-mcrypt
This might happen when you remove php pakage improperly
Hope this will resolve your problem

MSSQL on Ubuntu 16.04

I am trying to install sqlsrv and pdo_sqlsrv on Ubuntu 16. I am getting this result
I have already installed MSSQL Express on Ubuntu. I just need to install these two drivers.
sudo pecl install pdo_sqlsrv
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/php_pdo_sqlsrv_7_nts.so' - /usr/lib/php/20160303/php_pdo_sqlsrv_7_nts.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/php_sqlsrv_7_nts.so' - /usr/lib/php/20160303/php_sqlsrv_7_nts.so: cannot open shared object file: No such file or directory in Unknown on line 0
Could not download from "http://pecl.php.net/get/pdo_sqlsrv-4.0.8.tgz", cannot download "pecl/pdo_sqlsrv" (File http://pecl.php.net:80/get/pdo_sqlsrv-4.0.8.tgz not valid (received: HTTP/1.1 503 Service Unavailable
))
Error: cannot download "pecl/pdo_sqlsrv"
Download failed
install failed
sudo pecl install sqlsrv
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/php_pdo_sqlsrv_7_nts.so' - /usr/lib/php/20160303/php_pdo_sqlsrv_7_nts.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/php_sqlsrv_7_nts.so' - /usr/lib/php/20160303/php_sqlsrv_7_nts.so: cannot open shared object file: No such file or directory in Unknown on line 0
Could not download from "http://pecl.php.net/get/sqlsrv-4.0.8.tgz", cannot download "pecl/sqlsrv" (File http://pecl.php.net:80/get/sqlsrv-4.0.8.tgz not valid (received: HTTP/1.1 503 Service Unavailable
))
Error: cannot download "pecl/sqlsrv"
Download failed
install failed

Why i am getting on Server

PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20121212/raphf.so' - /usr/lib/php5/20121212/raphf.so:
cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20121212/propro.so' - /usr/lib/php5/20121212/propro.so:
cannot open shared object file: No such file or directory in Unknown on line 0
It's exactly saying what the error is. It can't open the libraries. Those libraries either dont exist in that folder or apache doesnt have the right to read them.
You need to install the propro and raph php extensions.
On Centos you'd do something like this
yum install php-raphf
yum install php-propro
For Ubuntu use apt-get
apt-get install php-raphf
apt-get install php-propro

Wordpress Installation PHP Error

THis is the update I get when I run the following command php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/curl.so' - /usr/lib/php/modules/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/dbase.so' - /usr/lib/php/modules/dbase.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/fileinfo.so' - /usr/lib/php/modules/fileinfo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/json.so' - /usr/lib/php/modules/json.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysql.so' - /usr/lib/php/modules/mysql.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysqli.so' - /usr/lib/php/modules/mysqli.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo.so' - /usr/lib/php/modules/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_mysql.so' - /usr/lib/php/modules/pdo_mysql.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_sqlite.so' - /usr/lib/php/modules/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/phar.so' - /usr/lib/php/modules/phar.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/zip.so' - /usr/lib/php/modules/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0
I'm trying to install Wordpress on a RHEL Machine. I initially had gotten mySQL up and running and then realized that my PHP was version 5.1.6. I added another repo, installed PHP 5.3 and removed the old php packages.
The error I get on a browser when I open localhost/wp-admin/install.php is:
Your PHP installation appears to be missing the MySQL extension which
is required by WordPress.
I have the package php-mysql.x86_64 installed and I can't figure out what the problem is.
I don't know what to do! Any help would be greatly appreciated.
Thanks.
Install required PHP libraries. RHEL installation command ( with all required modules for Wordpress):
sudo yum install php-bcmath php-cli php-common php-devel php-gd php-imap php-mbstring php-mcrypt php-mysqlnd php-odbc php-pdo php-pear php-pecl-geoip php-pecl-jsonc php-pecl-jsonc-devel php-pecl-zip php-pgsql php-process php-tidy php-xml php-xmlrpc
Install EPEL repos to update to latest PHP:
#CentOS 6 64Bit
sudo wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum update php
EPEL repos installation process for other versions - How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x
EDIT 1:
In order to disable other repositories, see and edit .repo files in /etc/yum.repos.d/ directory and set enabled=1 to enabled=0. After all don't forget to run:
yum clean all
So, I figured this out. The latest php version was installed. I was using 64 Bit RHEL and the libraries were in the /usr/lib64 folder instead of the /usr/lib folder. Once I changed that bit in the php.ini file, it ran like a charm. :)

Warning, when I run a PHP script

When I run a php script in console, I'm getting a following warning:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/php_mcrypt.dll' - /usr/lib/php5/20090626/php_mcrypt.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/php_curl.dll' - /usr/lib/php5/20090626/php_curl.dll: invalid ELF header in Unknown on line 0
The PHP script is correct, because it works on other comuputers.
I have an Ubuntu and server apache2
Check your php.ini currently you are trying to load a windows extension on a linux server.
Have a look in the folder /etc/php5/apache2/ for any file with a name like mcrypt and see if it references a dll file. If so, delete that file and restart apache
If you have ubuntu then sudo apt-get install php5-mcrypt will enable mcrypt for you

Categories