Copy link to clipboard
Copied
Hi,
I just added login functionality to my formerly html site and made all the pages into PHP pages. I uploaded all my files to my hosting site successfully, but when I tried accessing my site, it came up with an error. Then I created my index page as a .htm file, and it worked successfully again. I think it may be an error with my database because I don't think that I loaded that on the site. This is my first time uploading dynamic pages to the world wide web, but they have worked on my testing server. Does anybody know what the issue is, and does anybody know of a good tutorial for hosting a database?
Thank you!
As the error message suggests, go to connAdmin.php and change the database login credentials that are found on line 9 of the file. You should have access to phpMyAdmin on your host that supports php. Contact your hosting provider for info on how to access phpMyAdmin remotely. Go to phpMyAdmin on your host and import your database that you exported from your localhost. Enter the login credentials that are used to access your remote database on line 9 of conn_Admin.php
Copy link to clipboard
Copied
the hosting server needs to have the default file be index.php (or similar) so it knows to looks for that file as the default.
what happens when you go directly to that page (i.e. domain.com/index.php versus domain.com)?
if you're website is throwing php/mysql errors, and the errors are turned on in the ini file, then you would see the error. if they are turned off, you will see a blank page. you can setup a local testing environment to check your work, or you can do something like the following
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
include("file_with_errors.php");
?>
Copy link to clipboard
Copied
cycloneill wrote:
This is my first time uploading dynamic pages to the world wide web, but they have worked on my testing server.
jon wrote:
you can setup a local testing environment to check your work
redundancy
Copy link to clipboard
Copied
Also, yes, my file was named index.php and error reporting was on. The error message is the one I just posted.
Copy link to clipboard
Copied
As the error message suggests, go to connAdmin.php and change the database login credentials that are found on line 9 of the file. You should have access to phpMyAdmin on your host that supports php. Contact your hosting provider for info on how to access phpMyAdmin remotely. Go to phpMyAdmin on your host and import your database that you exported from your localhost. Enter the login credentials that are used to access your remote database on line 9 of conn_Admin.php
Copy link to clipboard
Copied
cycloneill wrote:
I uploaded all my files to my hosting site successfully, but when I tried accessing my site, it came up with an error.
What was the error? If, as Jon says, the display of errors is turned on in the PHP configuration file, you should see an error message. Without knowing what the error message says, it's impossible to guess what the problem might be.
If the display of errors is turned off, use the code the Jon gave you to display the error message, and then post the details here so someone can help you resolve the problem.
Copy link to clipboard
Copied
David_Powers wrote:
What was the error? If, as Jon says, the display of errors is turned on in the PHP configuration file, you should see an error message. Without knowing what the error message says, it's impossible to guess what the problem might be.
If the display of errors is turned off, use the code the Jon gave you to display the error message, and then post the details here so someone can help you resolve the problem.
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'Kevin'@'localhost' (using password: YES) in /home/eperfu5/public_html/Connections/connAdmin.php on line 9
Fatal error: Access denied for user 'Kevin'@'localhost' (using password: YES) in /home/eperfu5/public_html/Connections/connAdmin.php on line 9
That was the error. I thought it had something to do with uploading a database to my host. Probably localhost shouldn't be involved in this website, but I don't know how to change it.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now