Page 1 of 1

What does "Call to undefined function mysqli_query()&qu

Posted: Fri Jan 12, 2007 12:05 pm
by christian_phpbeginner
Hi folks, I don't understand, why does this error shows up when it is running on the web server, but not on my local server ?
Fatal error: Call to undefined function mysqli_query() in......on line xx
I have read an article that I searched from google. It says that in order mysqli_query to work, I need to use mysqli_connect, which I have done it even before I found the article. But it doesn't seem to work and I do not know why ?

Thank you,
Chris

Posted: Fri Jan 12, 2007 12:09 pm
by bmcewan
most likely that extension is not installed on your production server, phpinfo(); should be of some help.

Posted: Fri Jan 12, 2007 6:23 pm
by christian_phpbeginner
Hi, thanks for the reply. Yes, you're right, they don't support mysqli. But they allow me to create my own php.ini file, is it still possible if I just copy and paste the "extension=php_mysqli.dll" ??? There is a link to create a php.ini, but when I click on it, I have only an empty textarea and commented "WRITE YOUR PHP EXTENSIONS HERE..." ....

Thanks again,
Chris

Posted: Fri Jan 12, 2007 7:39 pm
by volka
Isn't there any documentation for this feature?

Posted: Sat Jan 13, 2007 12:00 am
by christian_phpbeginner
No volka, nothing !....I asked the technical support and it took them for like 24 hours to answer ! They say they support for the mysqli extension. But this morning, I tested it using phpinfo(); still the extension mysqli doesn't in the list !

So, if they don't support it. Means that I should change my mysqli into mysql ?

Thanks,
Chris

Posted: Sat Jan 13, 2007 12:09 am
by feyd
I'd verify that they support custom php.ini's, then if you must, place one where they say you can place it. Otherwise, yes, use the MySQL extension.

For portability to other hosts you may want to set up your code so it may run either.

Posted: Sat Jan 13, 2007 1:24 am
by christian_phpbeginner
I have changed it into mysql_query().

The web hosting doesn't support mysqli because they don't installed the extension by reason, which is that the mysqli functions are not yet stable, compared to mysql.

Thanks to all of you who have replied !

Sincerely,
Chris