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?
<?php 
 
		include ("carter.inc");
 
		$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

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

nahimeCommented:
That the function mysqli_connect doesn't exists in your system.
Maybe the mysqli extension isn't installed.
See http://it2.php.net/manual/it/book.mysqli.php for a reference about it
0
jazzIIIloveCommented:
you should be able to work with mysqli with this changes:

extension=php_mysqli.dll

and add an extra section called:

[mysqli]
mysqli.max_links=-1
mysqli.default_port=3306
mysqli.default_socket=
mysqli.default_host=
mysqli.default_user=
mysqli.default_pw=
0

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
jazzIIIloveCommented:
Did you install the mysqli extension from http://dev.mysql.com/downloads/connector/php/ in your extension dir?
0
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.

jazzIIIloveCommented:
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.
0
jazzIIIloveCommented:
Guess you have MySQL 5...

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

right?
0
ngechu1Commented:
He/She is on a linux/unix box. Get your hosting people to compile php with mysqli.

That should do it.

0
jausionsCommented:
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.
0
jazzIIIloveCommented:
>>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 5...so 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..

0
jausionsCommented:
jazzIIIlove:

 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.
0
jazzIIIloveCommented:
jausions:
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...
0
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.

Thanks!
0
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
PHP

From novice to tech pro — start learning today.