Author Topic: Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so  (Read 6813 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
i am using centos 7 and php 8.0.1  . but this error
how do i solve this error
PHP Warning:  PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/local/lib/php/extensions/no-debug-zts-20200930/mcrypt.so (/usr/local/lib/php/extensions/no-debug-zts-20200930/mcrypt.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-zts-20200930/mcrypt.so.so (/usr/local/lib/php/extensions/no-debug-zts-20200930/mcrypt.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Offline
*
Re: Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so
« Reply #1 on: August 22, 2021, 11:41:20 AM »
please help me  :(

Offline
*
Re: Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so
« Reply #2 on: August 23, 2021, 08:05:40 AM »
rebuild php 8 with newer version than 8.0.1...you should use latest from 8
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so
« Reply #3 on: September 19, 2021, 12:12:00 AM »
Same error with build 8.0.10 as well
NOTED in rebuild log
DELETING DSO Handler
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
--2021-09-18 08:10:06--  https://pecl.php.net/get/mcrypt-1.0.4.tgz
Resolving pecl.php.net (pecl.php.net)... 104.236.228.160
Connecting to pecl.php.net (pecl.php.net)|104.236.228.160|:443... connected.
ERROR: The certificate of 'pecl.php.net' is not trusted.
ERROR: The certificate of 'pecl.php.net' was signed using an insecure algorithm.
tar: mcrypt-*: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
/usr/local/cwpsrv/htdocs/resources/conf/el8/php_switcher/external_modules/8.0/mcrypt.sh: line 7: cd: mcrypt-*/: No such file or directory
« Last Edit: September 19, 2021, 12:36:51 AM by arfrater »

Offline
*****
Re: Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so
« Reply #4 on: September 20, 2021, 12:55:15 PM »
hi upgrade to centos 8 stream. its known issue with old centos 8 iso in stream its fixed.

Offline
*
Re: Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so
« Reply #5 on: October 27, 2021, 11:53:59 PM »
I encountered exactly this same problem but on AlmaLinux 8.

Code: [Select]
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
--2021-10-27 15:28:45--  https://pecl.php.net/get/mcrypt-1.0.1.tgz
Resolving pecl.php.net (pecl.php.net)... 104.236.228.160
Connecting to pecl.php.net (pecl.php.net)|104.236.228.160|:443... connected.
ERROR: The certificate of 'pecl.php.net' is not trusted.
ERROR: The certificate of 'pecl.php.net' was signed using an insecure algorithm.
tar: mcrypt-*: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
/usr/local/cwpsrv/htdocs/resources/conf/el8/php_switcher/external_modules/7.4/mcrypt.sh: line 7: cd: mcrypt-*/: No such file or directory
Cannot find config.m4.
Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module

/usr/local/cwpsrv/htdocs/resources/conf/el8/php_switcher/external_modules/7.4/mcrypt.sh: line 9: ./configure: No such file or directory
make: *** No targets specified and no makefile found.  Stop.

I was able to solve the problem by manually installing the PECL myself from the command line.

# pecl install mcrypt

We aren't using the multi PHP version switcher, so this installed the PECL for the one and only system version of PHP.  If you're using the version switcher you might have to do the installation a bit differently.

Nonetheless the PECL install worked fine.  I will just make a note of this so it can be done manually if we ever re-build PHP again and the process happens to fail again.

Also all the nonsense about this being a CentOS 8 issue seems to be nonsense - AlmaLinux is not CentOS. :P  It seems like there's a bug here which CWP should look into.

However part of the issue seems to be the download failing due to an invalid SSL certificate, I'm not sure why because the SSL certificate seems fine in my browser.  In fact I can wget the same URL and I don't see any certificate problems.

Code: [Select]
[root@server ~]# wget -O /dev/null https://pecl.php.net/get/mcrypt-1.0.1.tgz
--2021-10-27 18:55:45--  https://pecl.php.net/get/mcrypt-1.0.1.tgz
Resolving pecl.php.net (pecl.php.net)... 104.236.228.160
Connecting to pecl.php.net (pecl.php.net)|104.236.228.160|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 33782 (33K) [application/octet-stream]
Saving to: ‘/dev/null’

100%[======================================>] 33,782      --.-K/s   in 0.009s 

2021-10-27 18:55:45 (3.54 MB/s) - ‘/dev/null’ saved [33782/33782]
« Last Edit: October 27, 2021, 11:56:09 PM by Kirk »