PHP Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so'

php warning: php startup: unable to load dynamic library windows
php warning: php startup: unable to load dynamic library mysqli
php startup: unable to load dynamic library ubuntu
php warning php startup unable to load dynamic library '/usr/local/lib/php/extensions/
php warning: php startup: unable to load dynamic library 'curl'
php warning: php startup: unable to load dynamic library phalcon so
php warning: php startup: unable to load dynamic library centos
php warning php startup unable to load dynamic library usr lib php 20131226 php_intl dll

I am trying to update laravel using composer update on ubuntu 06.04 but everytime i run composer update this warning always comes up.

PHP Warning:  PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/lib/php/20170718/mcrypt.so (/usr/lib/php/20170718/mcrypt.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/mcrypt.so.so (/usr/lib/php/20170718/mcrypt.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Does anyone knows how to deal it?

I am using php7.2

First, open up a terminal window and install the necessary dependencies with the commands:

sudo apt-get -y install gcc make autoconf libc-dev pkg-config
sudo apt-get -y install php7.2-dev
sudo apt-get -y install libmcrypt-dev

Once the dependencies have been installed, you can install mcrypt with the command:

sudo pecl install mcrypt-1.0.1

And there you go. Mcrypt is now installed. Go back to the process of installing whatever server software that depends upon this extension and you should be good to go.

How to fix PHP Warning: PHP Startup: Unable to load dynamic , As Darren commented, Apache don't understand php.ini relative paths in Windows. In PHP manual we have an How-to install Apache 2.x on Microsoft Windows. $ php -v PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\php_pdo_sqlsrv_7_nts_x64.dll' - The specified procedure could not be found. in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\php_sqlsrv_7_nts_x64.dll.dll' - The specified procedure could not be found.

I faced similar issue when I installed Php7.2 on Ubuntu 18. Though I had installed mcrypt using PECL still I get the error mentioned in the question.

I did following to fix it

sudo apt-get install php-pear php7.2-dev

then uninstalled

pecl uninstall mcrypt

Now reinstall mcrypt

sudo apt-get -y install gcc make autoconf libc-dev pkg-config
sudo apt-get -y install libmcrypt-dev
sudo pecl install mcrypt-1.0.1

When you are shown the prompt

libmcrypt prefix? [autodetect] :

Press [Enter] to autodetect.

After success installing mcrypt using pecl, you should add mcrypt.so extension to php.ini.

The output will look like this:

...
Build process completed successfully
Installing '/usr/lib/php/20170718/mcrypt.so'    ---->   this is our path to mcrypt extension lib
install ok: channel://pecl.php.net/mcrypt-1.0.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=mcrypt.so" to php.ini

Now restart Apache

sudo service apache2 restart

Grab installing path and add to cli and apache2 php.ini configuration.

sudo bash -c "echo extension=/usr/lib/php/20170718/mcrypt.so > /etc/php/7.2/cli/conf.d/mcrypt.ini"
sudo bash -c "echo extension=/usr/lib/php/20170718/mcrypt.so > /etc/php/7.2/apache2/conf.d/mcrypt.ini"

SOLVED, Hello I have got a lot of this error on my server: [13-Apr-2017 16:32:55 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 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

For (>= PHP 7.3) you can use the following command:

sudo pecl install mcrypt-1.0.2

PHP Startup: Unable to load dynamic library, PHP Warning: PHP Startup: Unable to load dynamic library '/path/to/extension/ mysqli.so' (tried: /path/to/extension/mysqli.so� I'm using laravel and thus require the command line to run artisan commands. When doing so, php gives me the following errors: "Warning: PHP Startup: Unable to load dynamic library '/usr/local/ze

I faced this problem when I upgraded my PHP to 7.3

I found mcrypt.so was still present in /etc/php/7.3 that should not be as it is deprecated in php 7.3 so just deleting mcrypt.so from /etc/php/7.3 solved issue.

I used following commands:

cd /etc/php/7.3

sudo rm -rf mcrypt.so

sudo service apache2 restart

MySQLPHP Warning: PHP Startup: Unable to load dynamic library , The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_pdo_oci.dll' - The� Ensure the phpinfo.php file is configured with 0644 permissions.User and group ownership should be set to the corresponding cPanel account’s username. Here's an example of how to do this via the command line:

İts is worked for me.

export LC_ALL="C"

export LANG="C

sudo pecl install mcrypt-1.0.1

16.04, Run: sudo gedit -H /etc/php/7.0/cli/php.ini. and comment out extension=php_intl. dll . Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\php_sybase_ct.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\php_ibm_db2.dll' - The specified module could not be found. in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library, PHP Warning: PHP Startup: Unable to load dynamic library. Posted 4 years ago by opilo. I updated my server using these two commands: sudo apt-get update� "PHP Startup: Unable to load dynamic library 'ext\php_interbase.dll' - The specified module could not be found." The file 'ext\php_interbase.dll' is present, the phpinfo () page displays OK (but without a section headed 'interbase').

PHP Warning: PHP Startup: Unable to load dynamic library(ubntu , PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/ extensions/no-debug-non-zts-20090626/ixed.5.2.lin' - /usr/local/lib/php/e Windows was assigning an internal IP address. Setting a static IP didn't work. I was assuming it was a DHCP server failure. I connected my monitor to pfSense to see what was going on, and for every reboot it was the same warning: PHP startup, unable to load dynamic library. Tried to do an update, but couldn't. Tried to reset to factory, but

Ubuntu: PHP Warning: PHP Startup: Unable to load dynamic library , Ubuntu: PHP Warning: PHP Startup: Unable to load dynamic library (3 Solutions!) Helpful Duration: 3:02 Posted: Oct 23, 2019 [SOLVED] PHP Startup: Unable to load dynamic library Post by TrevorH » Tue Jun 04, 2013 8:48 am There is no 'distributed Centos 6.4 version' of this package.

Comments
  • mcrypt was deprecated in PHP 7.1 and moved to PECL in PHP 7.2. New code should use OpenSSL if possible. Are you sure you need mcrypt?
  • mcrypt is deprcated and hasn't been maintained for years. Don't use it.
  • I'm not sure I needed it. But the problem is when running composer it always shows up
  • I check on apache2/php.ini.. its not there. I dont know it is being initiated
  • stackoverflow.com/questions/16830405/…
  • I get the same err on sudo pecl install mcrypt-1.0.1
  • Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187 PHP Notice: Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187 Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187 PHP Notice: Trying to access array offset on value of type bool in /usr/share/p hp/PEAR/REST.php on line 187 pecl/mcrypt requires PHP (version >= 7.2.0, version <= 7.3.0, excluded versions: 7.3.0), installed version is 7.4.8 No valid packages found install failed
  • You really are a lifesaver, I've been struggling with this matter for a whole day, I think your latest commands did the trick. Thanks!
  • @yehanny I am glad that my answer helped you.
  • Comment it also in /etc/php/7.2/mods-available/mcrypt.ini