Jump to content


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

  • Please log in to reply
2 replies to this topic

#1 kenwvs

  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 02 July 2006 - 09:03 PM

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:

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)

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.



#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 03 July 2006 - 05:22 AM

Well, the first problem has nothing to do with mysql, and the second is, apparently, an invalid password problem.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 kenwvs

  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 03 July 2006 - 05:27 AM

I have determined that the problem was caused by there not being a session_start()  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.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users