problem with mysql_create_db function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
denisw
Forum Newbie
Posts: 14
Joined: Mon Jul 24, 2006 11:21 pm

problem with mysql_create_db function

Post 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.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: problem with mysql_create_db function

Post 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.
(#10850)
denisw
Forum Newbie
Posts: 14
Joined: Mon Jul 24, 2006 11:21 pm

Re: problem with mysql_create_db function

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: problem with mysql_create_db function

Post by Christopher »

If you think the error message is erroneous, it may be that you to not have create permission in the database.
(#10850)
Post Reply