-1

I want to install some PHP extensions so I can run Laravel projects in the computer. I already uncommented the lines in the /etc/php/7.0/cli/php.ini dir, more precisely:

extension=php_mbstring.dll extension=php_mysqli.dll
extension=php_pdo_mysql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
extension=php_xmlrpc.dll

Then I ran sudo apt-get install php-mbstring php-mysqli php-pdo-mysql php-pdo-sqlite php-pgsql php-xmlrpc and restarted apache service sudo systemctl restart apache2. Still, when I run php --ini I got:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_mbstring.dll' - /usr/lib/php/20151012/php_mbstring.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/20151012/php_mysqli.dll' - /usr/lib/php/20151012/php_mysqli.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/20151012/php_pdo_mysql.dll' - /usr/lib/php/20151012/php_pdo_mysql.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/20151012/php_pdo_sqlite.dll' - /usr/lib/php/20151012/php_pdo_sqlite.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/20151012/php_pgsql.dll' - /usr/lib/php/20151012/php_pgsql.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/20151012/php_xmlrpc.dll' - /usr/lib/php/20151012/php_xmlrpc.dll: cannot open shared object file: No such file or directory in Unknown on line 0

I know the problem reducts to only add the .dll file to this path but I guess there must be a standard way to do this. Or will I have to download/compile them manually and put there? Thanks in advance.

By the way, I'm on linux mint 18.1 and using PHP 7

closed as off-topic by edwinksl, Kaz Wolfe, Android Dev, user364819, Eric Carvalho Jul 1 '17 at 23:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – edwinksl, Kaz Wolfe, Android Dev, Community, Eric Carvalho
If this question can be reworded to fit the rules in the help center, please edit the question.

1

Your configuration is wrong. The dll files you have enabled are compiled for Windows.

The correct way is to install php-mbstring package and let it enable the mbstring extension automatically:

sudo apt-get install php-mbstring You can then disable/enable the extension by using phpenmod/phpdismod commands:

sudo phpdismod mbstring # disable mbstring extension sudo phpenmod mbstring # enable mbstring extension again

Sources:

Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_mbstring.dll

  • That's strange, when I installed apache/php with apt-get the commented extensions were already with the .dll filetype. Also, I ran phpenmod for those extensions but still having the same error at php --ini – Fabiotk Jul 1 '17 at 22:02
  • You understood that I tried to say, that uncommenting those lines was a MISTAKE. You should only use apt-get install and not the config. – ADDB Jul 1 '17 at 22:13

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