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.
problem with mysql_create_db function
Moderator: General Moderators
- 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
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: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.
Code: Select all
<?php
phpinfo();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)
Re: problem with mysql_create_db function
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
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
- 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
If you think the error message is erroneous, it may be that you to not have create permission in the database.
(#10850)