Jump to content

Archived

This topic is now archived and is closed to further replies.

kenwvs

Moved to a new server and am getting an error when you go to the page

Recommended Posts

I just moved my website from one server to another and have moved both the files and the database.  I had to create new names for the database and user and did this and changed it in a file called myconnect.php. 

When you go to the site you get errors on the page as follows:

[quote]Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/forsa7/public_html/index.php:6) in /home/forsa7/public_html/session.php on line 2

Warning: mysql_connect(): Access denied for user 'forsa7_dbmforsal'@'localhost' (using password: YES) in /home/forsa7/public_html/myconnect.php on line 14
I cannot connect to the database because: Access denied for user 'forsa7_dbmforsal'@'localhost' (using password: YES)[/quote]

I am not understanding what is causing this error as I have made sure the database name, server, user and passwords are all correct.  I even deleted the user, created a new one and gave him permission for this database, in case I had a wrong password.

Any ideas what might be causing this.

thanks,

Ken

Share this post


Link to post
Share on other sites
Well, the first problem has nothing to do with mysql, and the second is, apparently, an invalid password problem.

Share this post


Link to post
Share on other sites
I have determined that the problem was caused by there not being a [i][b]session_start()[/b][/i]  at the top of the index.php page.  Once I added that line to my page, the error disappeared and everything is working well.

I am not sure why I didn't have this problem on the old server, but I am not going to worry about it since the problem is solved.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.