How do I connect PHP template or program to a database

Asked by:
tspanacea
Time:
2012-01-25 6:59 pm
Category:
Website Troubleshooting
Hits:
956
Trying to get a PHP template called ‘Profolio’ installed and working at photoveritas.com (add-on domain at panaceahomeservices.com).

Template designer says to install: “Open up the file config.php and change the Database Host, Username, Password and Name information to your own values.”

I changed them to:
$host = "photoveritas.com";
$db_username = "the email address I use to log in to Web Hosting Hub";
$db_password = "the password I use to log in to Web Hosting Hub";
$database = "photoveritas.com/profolio";

Then uploaded the profolio folder with the new config.php file to public_html/photoveritas.com/profolio

But when I enter: photoveritas.com/profolio in browser, the following error is returned:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'tsp@tspanacea.co'@'whub26.webhostinghub.com' (using password: YES) in /home/panace7/public_html/photoveritas.com/profolio/config.php on line 15
Access denied for user 'tsp@tspanacea.co'@'whub26.webhostinghub.com' (using password: YES)

Can you tell me where I’m going wrong? Thanks………..Tom

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by Web Hosting Hub staff

0

ChristiNi
2012-01-25 7:38 pm
Hello Tom,

I'm sorry you're having trouble connecting your PHP file to your database. When connecting to a database, the user name and password needed will not be the same as your AMP user name and password.

From what I can see (based on reviewing PHP files and online research) this is a stand alone program (as opposed to a theme for another program). Please see our article on Manual Installation of PHP Software for step-by-step instructions on how to connect your new PHP program to a database.

If you have any questions or need further assistance during the installation process, please let us know. We're always happy to help!

Regards,

Christi N.

You must login before you can post a comment about this answer.

Like this Question?

Have a Question?

If you need some help, submit your question to our Community! We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)

Recent Questions

  1. Error in sending mails from my email account
  2. I can't connect to the server with filezilla
  3. Can't login to email

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.