7

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

  • 3
    Well, can't say that i've ever seen .dll's being loaded in Ubuntu... – user508889 Jun 8 '16 at 13:21
  • What does php -i | grep ".dll" return when run in terminal? If it returns nothing, run php -i | grep ".ini" and include the result in your question. – Parto Jun 8 '16 at 15:19
  • @Parto I updated my question. – Jatin Raikwar Jun 9 '16 at 5:07
  • First 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? – upbeta01 Jun 9 '16 at 6:05
  • in 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. – Ian Oct 20 '16 at 15:27
6

Run:

sudo gedit -H /etc/php/7.0/cli/php.ini

and comment out extension=php_intl.dll.

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.

  • 1
    This 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. – Marius Sep 4 '18 at 15:27
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)

1

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-*

0

I tried with following commands and error gone :

nano /etc/php/7.1/cli/php.ini

Search for intl.dll and soap.dll comment this extension

service apache2 restart

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.