Page 1 of 1

problem with mysql_create_db function

Posted: Wed Feb 06, 2008 12:43 am
by denisw
Hi,

Currently I have problem when running my php script on my webhosting. I got the following error, whereas the script is already tested and running well locally.

Fatal error: Call to undefined function mysql_create_db()

Please advise.

Thanks.

Re: problem with mysql_create_db function

Posted: Wed Feb 06, 2008 12:53 am
by Christopher
I have the sneaking suspicion that the function mysql_create_db() is not defined. That probably means that your PHP installation does not have the mysql extension loaded. You might want to create this script and run it:

Code: Select all

<?php
phpinfo();
That will tell you all about your installation. Check to see what MySQL llibrary is installed.

And don't forget to delete that script from production server because it can provide a wealth of information about your system to the wrong sort of people.

Re: problem with mysql_create_db function

Posted: Wed Feb 06, 2008 1:53 am
by denisw
Hi Christopher,

Thanks for your reply.
However, I'm pretty sure the mysql ext. is in there, since the mysql_connect function is working well.
The error occured right after this command executed.

thx

Re: problem with mysql_create_db function

Posted: Wed Feb 06, 2008 2:10 am
by Christopher
If you think the error message is erroneous, it may be that you to not have create permission in the database.