PHP Warning: PHP Startup: Unable to load dynamic library

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I have seen quite a few posts here about this com/tag/issue">issue, but have yet to understand what is wrong with my setup. This is what I get when trying to run anything with PHP:

Sat Sep 02 - 12:11 PM > php -version
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/tidy.dll' - No such file or directory in Unknown on line 0
PHP 7.0.19 (cli) (built: May 14 2017 03:08:04) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies

The tidy.dll is referenced in this ini file

Sat Sep 02 - 12:11 PM > cat /etc/php.d/tidy.ini
extension = tidy.dll

Here is my extension_dir defined:

Sat Sep 02 - 12:12 PM > php -i | grep extension_dir
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/tidy.dll' - No such file or directory in Unknown on line 0
extension_dir => /usr/lib/php/20151012 => /usr/lib/php/20151012

The permissions in that directory seem OK.

Sat Sep 02 - 12:12 PM > ls -la /usr/lib/php/20151012
total 2228
drwxr-xr-x+ 1 RobertMarkBram None      0 Aug 31 21:20 .
drwxr-xr-x+ 1 RobertMarkBram None      0 Apr 13 15:25 ..
-rwxr-xr-x  1 RobertMarkBram None  15389 May 14 18:27 ctype.dll
-rwxr-xr-x  1 RobertMarkBram None  81949 May 14 18:27 curl.dll
-rwxr-xr-x  1 RobertMarkBram None  76829 May 14 18:27 gd.dll
-rwxr-xr-x  1 RobertMarkBram None 956957 May 14 18:27 imap.dll
-rwxr-xr-x  1 RobertMarkBram None 426013 May 14 18:27 intl.dll
-rwxr-xr-x  1 RobertMarkBram None  36381 May 14 18:27 json.dll
-rwxr-xr-x  1 RobertMarkBram None  35357 May 14 18:27 mcrypt.dll
-rwxr-xr-x  1 RobertMarkBram None 110621 May 14 18:27 mysqli.dll
-rwxr-xr-x  1 RobertMarkBram None  27165 May 14 18:27 pdo_mysql.dll
-rwxr-xr-x  1 RobertMarkBram None 271389 May 14 18:27 phar.dll
-rwxr-xr-x  1 RobertMarkBram None  19485 May 14 18:27 pspell.dll
-rwxr-xr-x  1 RobertMarkBram None  10781 May 14 18:27 recode.dll
-rwxr-xr-x  1 RobertMarkBram None  43549 May 14 18:27 tidy.dll
-rwxr-xr-x  1 RobertMarkBram None  21021 May 14 18:27 tokenizer.dll
-rwxr-xr-x  1 RobertMarkBram None  81949 May 14 18:27 xmlrpc.dll
-rwxr-xr-x  1 RobertMarkBram None  27677 May 14 18:27 xsl.dll

And looking at the ACLs for just tidy.dll, I don't see a problem.

Sat Sep 02 - 12:13 PM > getfacl /usr/lib/php/20151012/tidy.dll
# file: /usr/lib/php/20151012/tidy.dll
# owner: RobertMarkBram
# group: None
user::rwx
group::r-x
other:r-x

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.