I'm pretty new to PHP and MySQL, but I made a script to login in a members section on my site. It worked, but now I changed the location of the database and I got this warning-message below.
------------------------------------------------------------------------------------
Warning: Cannot modify header information - headers already sent by (output started at /home/projects/mijndomein3/default/detritus/rechtswinkeloverbetuwe.nl/www/config.php:17) in /home/projects/mijndomein3/default/detritus/rechtswinkeloverbetuwe.nl/www/inloggen.php on line 23
------------------------------------------------------------------------------
The database is hosted on a remote server (http://www.freesql.org) and the site is hosted in Holland (http://www.rechtwinkeloverbetuwe.nl). I know it's not a MySQL connection problem.
Error while connecting to a remote MySQL-database
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
markl999 wrote:What is line 17 of config.php ?
That line is outputting something and line 23 of inloggen.php looks like it has something like a Header("Location .. in it. The output from line 17 of config.php is causing the problem in inloggen.php as headers must be sent before any output.
I did know all the things you guys mentioned, but the remark above made me think.... there is NO line number 17 in config.php!
So, I just pressed backspace 2 times at the bottom of config.php and the problem was solved.
I did't know this could happen. Why does php give an error when I have pressed "enter" two extra times at the bottom of a php-page?