0

I temporarily set apc.enable_cli=1 in apc.ini, then run php -r "apc_clear_cache();" in the terminal to clear APC cache but this is what I got:

PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/php5/lib/php/extensions/no-debug-non-zts-20100525/mcrypt.so' - /opt/php5/lib/php/extensions/no-debug-non-zts-20100525/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/php5/lib/php/extensions/no-debug-non-zts-20100525/mysql.so' - /opt/php5/lib/php/extensions/no-debug-non-zts-20100525/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/php5/lib/php/extensions/no-debug-non-zts-20100525/mysqli.so' - /opt/php5/lib/php/extensions/no-debug-non-zts-20100525/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/php5/lib/php/extensions/no-debug-non-zts-20100525/pdo.so' - /opt/php5/lib/php/extensions/no-debug-non-zts-20100525/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/php5/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so' - /opt/php5/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

I'm running PHP-FPM 5.4.3, Nginx 1.3.1 and APC 3.1.10 on an Ubuntu Server 12.04 (VPS). Do you have any idea of what these errors mean?

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
MultiformeIngegno
  • 1,627
  • 9
  • 24
  • 31
  • Most likely your php-cli is using a different php.ini file, one with different extensions/paths to extensions set. – c2h5oh Jul 10 '12 at 09:50

1 Answers1

0

The errors mean that the file /opt/php5/lib/php/extensions/no-debug-non-zts-20100525/mcrypt.so does not exist, while your PHP configuration wants to load it. Either make the file exist (again?), or modify your PHP configuration to not load the file. Also, /opt/php5 is not an Ubuntu-standard location for PHP installation, so you've done something custom to the machine -- I'd start by reviewing your notes on what you did there.

womble
  • 95,029
  • 29
  • 173
  • 228
  • @c2h5oh: Seems there's no php.ini for php-cli: php --ini (same errors posted in 1st post) Configuration File (php.ini) Path: /etc/php5 Loaded Configuration File: /etc/php5/php.ini Scan for additional .ini files in: /etc/php5/conf.d Additional .ini files parsed: /etc/php5/conf.d/apc.ini, /etc/php5/conf.d/mcrypt.ini, /etc/php5/conf.d/mysql.ini, /etc/php5/conf.d/mysqli.ini, /etc/php5/conf.d/pdo.ini, /etc/php5/conf.d/pdo_mysql.ini – MultiformeIngegno Jul 10 '12 at 10:17
  • yeah I compiled nginx and php5-fpm in /opt. I searched for that extension in php.ini file but I can't find it! – MultiformeIngegno Jul 10 '12 at 10:22
  • Uhm, I tried what suggested here: http://www.webhostingtalk.com/showpost.php?s=40996bbf8311616ad51ae8a6a16568a1&p=6775082&postcount=2 So I found out that those files (mysql.so, mycrypt.so, etc) was in /usr/lib/php5/20090626/, I copied them to /opt/php5/lib/php/extensions/no-debug-non-zts-20100525/ but now I get this: PHP Warning: PHP Startup: mcrypt: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These options need to match in Unknown on line 0 and so on for every of this files... – MultiformeIngegno Jul 10 '12 at 10:31