Jump to content

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


kenwvs

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
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.