Whenever I run my php command line script, before the script actually outputs to the screen, php always returns a bunch of error messages as follows:
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20060613/gd.so' - (null) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20060613/mbstring.so' - (null) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so' - (null) in Unknown on line 0
PHP Warning: Module 'memcache' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20060613/mysql.so' - (null) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20060613/mysqli.so' - (null) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so' - (null) in Unknown on line 0
PHP Warning: Module 'syck' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20060613/zip.so' - (null) in Unknown on line 0
PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
However, the warnings doesn't really seem to stop my scripts from running properly (although it says certain libraries couldn't be loaded, but I can still use them in my scripts). I am currently running php5.2 installed via macports for Leopard 10.5.7
hidetoshi:bin jeffrey04$ port installed php5
The following ports are currently installed:
php5 @5.2.9_0+apache2+macosx+mysql5+pear+postgresql83
php5 @5.2.9_2+apache2+macosx+mysql5+pear+postgresql83 (active)
php5 @5.3.0_1+apache2+macosx+mysql5+pear+postgresql83
php5 @5.3.0_2+apache2+macosx+mysql5+pear+postgresql83
and I switch to php5.2 via this simple shell script
port deactivate php5 @5.3.0_2+apache2+macosx+mysql5+pear+postgresql83
port activate php5 @5.2.9_2+apache2+macosx+mysql5+pear+postgresql83
port deactivate php5-syck @0.55_2
port activate php5-syck @0.55_1
port deactivate php5-memcache @2.2.5_1
port activate php5-memcache @2.2.5_0
port deactivate php5-xdebug @2.0.5_0
port activate php5-xdebug @2.0.4_0
/opt/local/apache2/bin/apachectl restart
Am I doing anything wrong? Is there any way to remove the warnings returned during php initialization?