Link to home
Start Free TrialLog in
Avatar of areyouready344
areyouready344Flag for United States of America

asked on

how to stop this PHP warning message?

I get the following PHP warning message when executing the PHP command below. How can I overcome this warning message?

# php test2.php
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/msqli.so' - /usr/lib/php/modules/msqli.so: cannot open shared object file: No such file or direc0
PHP Warning:  Module 'mysqli' already loaded in Unknown on line 0
object(MyClass)#1 (0) {
Avatar of rubene
rubene
Flag of Netherlands image

This is just a shot in the dark, because I've never heard of msqli (as opposed to mysqli), but it may be an error in your php.ini file. Do you happen to have a line like 'extension=msql.so' in there? If so either change it into 'extension=mysqli.so' if you're using mysqli or just remove it.

Ruben.
Avatar of areyouready344

ASKER

After commenting out  -->> ;extension=mysql.so

 I no longer get the following warning message

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/msqli.so' - /usr/lib/php/modules/msqli.so: cannot open shared object file: No such file or direc0


However, I still get the following message:

PHP Warning:  Module 'mysqli' already loaded in Unknown on line 0
Does the php.ini also contains the line 'extension=mysqli.so' twice?
Or otherwise does it get loaded for the second time at runtime using the dl function somewhere?
# find / -name mysqli.so
/usr/lib/php/modules/mysqli.so


Also, the php.ini only show one location of this value


extension=/usr/lib/php/modules/mysqli.so


This one is commented out

;extension=msqli.so
okay I commented out

;extension=/usr/lib/php/modules/mysqli.so


and the message no longer show up...

thanks for leading me in the right direction but I thought I need this value mysqli.so?
Avatar of Dave Baldwin
What version of Linux are you using?  Some of them do things differently.
I'm using centOS 6
ASKER CERTIFIED SOLUTION
Avatar of rubene
rubene
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hmm... I did not see any "magic bullets" but maybe something in the man pages will turn up.
http://www.php.net/manual/en/mysqli.setup.php

Sometimes this little script is useful:
<?php phpinfo();

Open in new window