Problem running Admin.php
Whenever I run the admin.php script I get the following error after I log in:
Warning: Cannot modify header information - headers already sent by (output started at /home/bluetu/public_html/autositemap/config.php:1) in /home/bluetu/public_html/autositemap/admin.php on line 145
Warning: Cannot modify header information - headers already sent by (output started at /home/bluetu/public_html/autositemap/config.php:1) in /home/bluetu/public_html/autositemap/admin.php on line 55
Any ideas?
Thanks
Hi David,
Well, I've stripped every bit of white space I can find and I still get the same result.
Here's the code (cut and pasted) from my current config.php
<?php
$config_baseHREF="http://www.";
$config_databaseServer="localhost";
$config_databaseUsername="bluetu";
$config_databasePassword="J*******";
$config_databaseName="bluetu_sitemap";
$config_databaseTablePrefix="";
$config_adminPassword="J*******";
?>
Obviously I've hidden the passwords but otherwise it'sa straight lift from the file
Thanks,
Alan
Hi Alan,
I'm sorry you're still having this issue. The white space that causes the error you are getting is normally cause by white space in the following positions:
HERE
HERE<?php
$config_baseHREF="http://www.";
$config_databaseServer="localhost";
$config_databaseUsername="bluetu";
$config_databasePassword="J*******";
$config_databaseName="bluetu_sitemap";
$config_databaseTablePrefix="";
$config_adminPassword="J*******";
?>HERE
AND_HERE(most likely at the end). Can you check that there is no carriage-return on the end after the closing ?> )
Cheers,
David.
Hi David,
Not a , or any other character anywhere outside the PHP tags. I've even cut and pasted the text into a new file and then renamed it just in case there are any funnies.
Any other thoughts?
Alan
Hi,
Has the warning message changed at all?
output started at /home/bluetu/public_html/autositemap/config.php:1This says that PHP started generating output at line 1 of config.php, which implies that the white space is at the top.
Now you've checked and re-saved the file, has this message changed at all?
Cheers,
David.
I just created yet another new file, config.txt, on my desktop, pasted the contents of config.php into it. Then I renamed it to config.php and FTP'd it over to the server and it now works fine!!!!
I've actually done a COMPARE on the new and original files and reckons they are identical!
Beats me . . .and I've worked in IT for nearly 30 years!
Still, let's not look a gift horse in the mouth.
Thanks for all your help.
Alan
Hi,
All that has happened is that some white space (carriage-returns or SPACE characters) have got onto either the beginning or end of config.php whilst making the changes for your server.
To fix this, edit config.php again, and delete any characters outside of the PHP tags. That should be all it is.
Cheers,
David.