How do I connect PHP template or program to a database

Asked by:
tspanacea / 5 Points
Time:
2012-01-25 10:59 pm EST
Category:
Website Troubleshooting
Hits:
2,550
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

To ask this user for more information, please first login.

To submit an answer, please login.

Best answer chosen by Web Hosting Hub staff

0

ChristiNi
Staff
13,688 Points
2012-01-25 11:38 pm EST
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.

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help 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.
}