Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have issues with php finding its extensions. and be able to debug it's php code on my server. I use Zend Debugger with PHP 5.3 on Ubuntu server. I configured php.ini file with these properties to enable Zend debugger:

extension_dir = "/usr/lib/php5/extensions"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Zend Extension (Debugger)     ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
zend_extension="/usr/lib/php5/extensions/ZendDebugger.so"
zend_debugger.allow_hosts=10.100.14.147
zend_debugger.expose_remotely=always

Howerer, after restarting apache2 web server, my deployed app crashes with error:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/extensions/mysql.so' - /usr/lib/php5/extensions/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 '/usr/lib/php5/extensions/mysqli.so' - /usr/lib/php5/extensions/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 '/usr/lib/php5/extensions/pdo.so' - /usr/lib/php5/extensions/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 '/usr/lib/php5/extensions/pdo_mysql.so' - /usr/lib/php5/extensions/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

It's unable to find mysql and other extension libraries on the new "extension_dir" path.

*Before setting this config param (extension_dir) it was commented out in my php.ini **Leaving this param commented in php.ini breaks my ZendDebugger extension from being loaded.

What are my options to make both things work?

Best Regards!

share|improve this question
2  
What files are in /usr/lib/php5/extensions? Also, can you comment the parameter out and get phpinfo, as I think that shows the default exension_dir directory. –  meulop May 11 '12 at 11:00
1  
are those extension libraries available in path defined by you in extension_dir ? Also all of those extensions MIGHT have their own configuration file in /etc/php/conf.d/... you might want to have a look there too whether it contains some dodgy include/extension directives –  gyre May 11 '12 at 11:41
    
I figured it out. Actual extension_dir=/usr/lib/php5/20090626. So I found mysql libs there, and also copied ZendDebugger.so there. After resetting server it read Zend Debug extension correctly and mysql as well. I never noticed that this was in my phpinfo() while extension_dir was commented out. I tought phpinfo() will never show it because it's commented in php.ini. Howerer this "numberish" dir was default value. –  ZeC May 11 '12 at 12:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.