HOTScripts.comScene: You, banging your head on your computer.... you can't get your script to communicate with the database... you know the error,
Host: Your script is messed up...
Script Author: It's your hosting...
You: ARGH!
Here's a small php script that will help you test the script's connection to the database.
Before running the test, make sure to...
Replace localhost with the database server name if your server doesn't use localhost as for your database. Change the username and password with the details you have for your database. Pay careful attention to the quotations. The database name is not necessary.
When the script 'communicates' with the database, the resulting page will display ‘Successful connection’. Be sure to give your script installer the URL to the script.
If the script cannot communicate with the database, then you’ll probably see something like:
OR
Copy and paste that error and send it to your web host, along with the details of your database.
Don’t forget to remove the file once the situation is resolved.
Replace hostname (usually localhost), username and password with the details you have for your database. There’s no need to add the database name.
4. Upload to your server to a folder that’s viewable via a browser.
5. Load the file in your browser
If a connection is made, the resulting page will display ‘Connection OK’. Talk again with the software vendor and give them the URL to the script.
If a connection cannot be made, then you’ll probably see something like:
Warning: mysql_connect(): Access denied for user ‘dbuser’@'localhost’ (using password: YES) in /path/to/mysqltest.php on line 2
Could not connect to MySQL: Access denied for user ‘dbuser’@'localhost’ (using password: YES)
Copy and paste that error and send it to your web host, along with the details of your database.
Don’t forget to remove the file once the issue is settled.
