1

I added a few new PHP version to my server according do this tutorial: https://www.23systems.net/2016/01/installing-php-5-6-x-7-0-x-ubuntu-14-04-virtualmin-5-0gpl-using-ppa/, by addding sudo add-apt-repository ppa:ondrej/php

However after sudo aptitude install pkg-php-tools php5.6 php5.6-cgi php5.6-cli php5.6-dbg php5.6-common php5.6-curl php5.6-gd php5.6-imap php5.6-intl php5.6-mysql php5.6-pspell php5.6-sqlite3 php5.6-tidy php5.6-opcache php5.6-json php5.6-bz2 php5.6-mcrypt php5.6-readline php5.6-xmlrpc php5.6-enchant php5.6-xsl php-all-dev php7.0 php7.0-cgi php7.0-cli php7.0-common php7.0-dbg php7.0-curl php7.0-enchant php7.0-gd php7.0-imap php7.0-intl php7.0-ldap php7.0-mcrypt php7.0-readline php7.0-pspell php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-json php7.0-sqlite3 php7.0-mysql php7.0-opcache php7.0-bz2 libapache2-mod-php7.0

The PHP versions throw the following errors:

root@xxx /projects/xxx/xxx-site # php5.6
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_curl.dll' - /usr/lib/php/20131226/php_curl.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/php/20131226/php_gd2.dll' - /usr/lib/php/20131226/php_gd2.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/php/20131226/php_mbstring.dll' - /usr/lib/php/20131226/php_mbstring.dll: cannot open shared object file: No such file or directory in Unknown on line 0

For all the enabled extensions. I checked the folder, and there are no dll files there at all. Just so files. How do I fix this? My old PHP version (5.5) still works, but 5.6, 7.0, 7.1 don't work..

1

Did you modify you php.ini at any time?. DLL extensions are for Windows; is really strange a error like that.

First, if your intention is work/test with various PHP's version I think something like phpbrew could fits better.

For you problem, search in the php.ini for the "Dynamic Extensions" sections.

For see what php.ini is using you could do:

$ php5.6 -i | grep -i 'configuration file'
Loaded Configuration File => /etc/php/php.ini

Then, in that file your dynamic extensions should be .so files, not .dll. Also you can try with different php.ini (I'm guessing could be more than one for the different versions) with the -c option:

$ php5.6 -c /etc/php/other/php.ini

If that works, maybe you could just replace the file :)

| improve this answer | |
  • This is exactly how I downloaded it, apart from enabling certain extensions. However I did enable the extensions from the php.ini file, this was probably wrong. I know there's php5enmod, how do I use this form multiple php versions? – Richard Aug 18 '16 at 13:58
  • @Richard: I think there should be symbolic links under a conf.d directory for each version – Alberto Maturano Aug 19 '16 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.