Call to undefined function...What does this mean?

If you head out to the page I have referenced, you'll get an error which I don't recognize or understand.

The code that the message is referring to is posted below. Line 17 is the "mysqli_connect" line.

What am I do doing wrong?
		include ("");
		$cxn = mysqli_connect($host,$user,$password,$database)
		or die ("couldn't connect to server");

Open in new window

brucegustPHP DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

That the function mysqli_connect doesn't exists in your system.
Maybe the mysqli extension isn't installed.
See for a reference about it
you should be able to work with mysqli with this changes:


and add an extra section called:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Did you install the mysqli extension from in your extension dir?
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

try the following only if you have php5 installed

you need to take the php.ini out of the windows directory and place it in the c:\php directory.

also you need to set the paths to c:\php in the environment variables.

then you need to copy libmysql.dll from c:\php to the windows directory

then you need to restart

If no use:

if you are still unable to connect to mysql, get the php package you are using and then use windows search to find ALL libmysql.dll files on your computer, then delete those that are (stand) on your PATH and delete them. Then extract a brand new libmysql.dll file from the pa ckage to a dir in your PATH. Make sure it is really the same php version you are using.
Guess you have MySQL 5...

The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above...

He/She is on a linux/unix box. Get your hosting people to compile php with mysqli.

That should do it.

You obviously don't have the mysqli extension installed. You may have the regular mysql one though. So try changing mysqli_connect() into mysql_connect() (note the "i" difference.)

That being said, all the over method calls would need to be changed the same, and the existing code relies on features of the mysqli extensions, than you'd need to do more changes.

The best solution might be to get the PHP mysqli extension on you web server system. I don't know if that's possible for you. If not, you'll need to switch over to "regular" mysql PHP extension.
>>You obviously don't have the mysqli extension installed. You may have the regular mysql one though. >>So try changing mysqli_connect() into mysql_connect() (note the "i" difference.)

Well no offense but maybe the server uploading has mysql server if the code is complicated...I won't recommend changing it but simply adding the extenseion...(even search and replace feature can do but still i hesitate...)

Best regards..


 The "regular" (old) mysql PHP extension works perfectly fine with MySQL 4.1.3 and above.

Solving brucegust's question depends on 2 things: Can mysqli extension be installed? And, does the script use advanced features only available with mysqli?

If no features of mysqli (comparatively to mysql extension) is used, then removing the "i" would mostly work fine, even with MySQL 5 as the server.
of course...but if the code is complicated rather i advice to have the extension...Let the asker decide...We will be informed soon i guess...
brucegustPHP DeveloperAuthor Commented:
Hey, folks!

The problem was solved by getting my ISP to ensure that mysqli was installed. It wasn't, or at least it hadn't been activated. Once that was in place, all was made well.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.