PHP Warning: PHP Startup: Unable to load dynamic library
Solution 1
Run:
sudo gedit -H /etc/php/7.0/cli/php.ini
and comment out extension=php_intl.dll
.
Solution 2
Something wrong with your configuration, but if you have root access, just install again the missing extensions. For PHP 7.0:
sudo apt-get install php7.0-intl
sudo apt-get install php7.0-soap
Note the version of your Ubuntu could be necessary in some weird cases (you upgraded too much your packages and need to downgrade). Here a example but look at the version installed first!
sudo apt-get install php7.0-intl=7.0.22-0ubuntu0.16.04.1
sudo apt-get install php7.0-soap=7.0.22-0ubuntu0.16.04.1
Worked for me (not SOAP extension by the way but intl
and some others)
Solution 3
As per oerdnj's answer here there is something wrong with your configuration. You shoul not enable the extension in php.ini (e.g. you should not uncomment the line ;extension=php_mbstring.dll
, for instance).
You should install the extension like sudo apt-get install php-mbstring
and let it be automatically activated.
Solution 4
Sometime some of extensions are not install
so you can install it with terminal
run following commands to install that particular extensions
sudo apt-get install php7.0-extension name
or
you can install all extension with following command
sudo apt-get install php7.0-*
Solution 5
First check from where the php.ini file is getting applied for your project. To check this just save file with below code in root folder with name phpInfo.php
<?php echo phpInfo(); ?>
Now run the file on browser by typing http://localhost/file_folder/phpInfo.php
and check for Loaded Configuration File. Now open the file in editor and uncomment(remove comma from start) php_intl
Don't forget to restart apache.
Related videos on Youtube
Jatin Raikwar
I am a web developer. Works on Magento, Joomla, Codeigniter, Joomla, Laravel, Lumen, Javascript. Provide Training for people who want to learn with very low cost. You can contact me or hire me. Call :- +91 8600609613 Email :- [email protected]
Updated on September 18, 2022Comments
-
Jatin Raikwar over 1 year
I got error like
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_intl.dll' - /usr/lib/php/20151012/php_intl.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_soap.dll' - /usr/lib/php/20151012/php_soap.dll: cannot open shared object file: No such file or directory in Unknown on line 0
As @Parto said
I run
php -i | grep ".ini"
And got result :-
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_intl.dll' - /usr/lib/php/20151012/php_intl.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_soap.dll' - /usr/lib/php/20151012/php_soap.dll: cannot open shared object file: No such file or directory in Unknown on line 0 Configuration File (php.ini) Path => /etc/php/7.0/cli Loaded Configuration File => /etc/php/7.0/cli/php.ini Scan this dir for additional .ini files => /etc/php/7.0/cli/conf.d Additional .ini files parsed => /etc/php/7.0/cli/conf.d/10-mysqlnd.ini, /etc/php/7.0/cli/conf.d/10-opcache.ini, /etc/php/7.0/cli/conf.d/10-pdo.ini, /etc/php/7.0/cli/conf.d/15-xml.ini, /etc/php/7.0/cli/conf.d/20-bcmath.ini, /etc/php/7.0/cli/conf.d/20-calendar.ini, /etc/php/7.0/cli/conf.d/20-ctype.ini, /etc/php/7.0/cli/conf.d/20-curl.ini, /etc/php/7.0/cli/conf.d/20-dom.ini, /etc/php/7.0/cli/conf.d/20-exif.ini, /etc/php/7.0/cli/conf.d/20-fileinfo.ini, /etc/php/7.0/cli/conf.d/20-ftp.ini, /etc/php/7.0/cli/conf.d/20-gd.ini, /etc/php/7.0/cli/conf.d/20-gettext.ini, /etc/php/7.0/cli/conf.d/20-iconv.ini, /etc/php/7.0/cli/conf.d/20-intl.ini, /etc/php/7.0/cli/conf.d/20-json.ini, /etc/php/7.0/cli/conf.d/20-mbstring.ini, /etc/php/7.0/cli/conf.d/20-mcrypt.ini, /etc/php/7.0/cli/conf.d/20-mysqli.ini, /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini, /etc/php/7.0/cli/conf.d/20-phar.ini, /etc/php/7.0/cli/conf.d/20-posix.ini, /etc/php/7.0/cli/conf.d/20-readline.ini, /etc/php/7.0/cli/conf.d/20-shmop.ini, /etc/php/7.0/cli/conf.d/20-simplexml.ini, /etc/php/7.0/cli/conf.d/20-soap.ini, /etc/php/7.0/cli/conf.d/20-sockets.ini, /etc/php/7.0/cli/conf.d/20-sysvmsg.ini, /etc/php/7.0/cli/conf.d/20-sysvsem.ini, /etc/php/7.0/cli/conf.d/20-sysvshm.ini, /etc/php/7.0/cli/conf.d/20-tokenizer.ini, /etc/php/7.0/cli/conf.d/20-wddx.ini, /etc/php/7.0/cli/conf.d/20-xmlreader.ini, /etc/php/7.0/cli/conf.d/20-xmlwriter.ini, /etc/php/7.0/cli/conf.d/20-xsl.ini, /etc/php/7.0/cli/conf.d/20-zip.ini user_ini.cache_ttl => 300 => 300 user_ini.filename => .user.ini => .user.ini com_init_db => 0 Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
I am using php 7 and Ubuntu 16.04
-
Admin almost 8 yearsWell, can't say that i've ever seen .dll's being loaded in Ubuntu...
-
Parto almost 8 yearsWhat does
php -i | grep ".dll"
return when run in terminal? If it returns nothing, runphp -i | grep ".ini"
and include the result in your question. -
Jatin Raikwar almost 8 years@Parto I updated my question.
-
upbeta01 almost 8 yearsFirst thing to check is, if the DDL file exist somewhere outside the path. So you have to run
find /* -name "php_intl.dll"
make sure you run this as root or user with privilege as some directories have specific permissions being set. Usually, the the php library you're trying to install is part of php5, did you search if PHP7 fully supports it? -
Ian over 7 yearsin response to bc2946088's comment back in June, I can confirm that, with a clean ubuntu installation, adding apache, php, mysql and cacti, I am seeing logs which say 'unable to load dynamic library - /usr/lib/php/20121012/php_gd2.dll' - so it looks like either a logging error or apache/php does use this extension. It is weird though.
-
-
Marius over 5 yearsThis helped me, thanks. I found that mine was uncommented in
/etc/php/7.0/apache2/php.ini
but commented out in/etc/php/7.0/cli/php.ini
. Which is why mine only happened at weird times.