Avatar of areyouready344
areyouready344
Flag 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) {
PHP

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
rubene

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.
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
rubene

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?
Your help has saved me hundreds of hours of internet surfing.
fblack61
areyouready344

ASKER
# 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
areyouready344

ASKER
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?
Dave Baldwin

What version of Linux are you using?  Some of them do things differently.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
areyouready344

ASKER
I'm using centOS 6
ASKER CERTIFIED SOLUTION
rubene

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Ray Paseur

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