amavadia Posted March 4, 2010 Share Posted March 4, 2010 Hi all So ive been designing implementing my php website for the past few months locally using WAMP stack, and coding with php designer. All was fine, and the site worked perfectly with a mysql database. I then uploaded it to my webserver with support for php and mysql, built the tables as required, and the site does work, but I am gettin this error on some pages.: Warning: Cannot modify header information - headers already sent by (output started at /home/sites/findaplacement.com/public_html/list.inc.php:57) in /home/sites/findaplacement.com/public_html/update_customer_admin.php on line 90 This occurs on pages where i used validation to check the input of forms, then submit the details to the database to be stored. I have an IF loop that says if everything is OK, then update the record in the database, and then using header('Refresh: 5; URL=account.php'); on line 90 of the page update_customer_admin.php send the user to their account home page. I have made sure that the header is the first output the page gives, and the file it is showing as the problem (list.inc.php) is a simple include file which contains the definition of a few arrays, nothing else. And line 57 dosent event have any code on it, its just the php closing tag '?>' I find it strange because it works perfectly locally. Anyone have any idea what might be different on my webserver which might cause this?? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/194129-stumped-php-error-when-uploaded/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 4, 2010 Share Posted March 4, 2010 line 57 doesn't event have any code on it, its just the php closing tag '?>' You probably have some white-space on that line after the ?> tag. Quote Link to comment https://forums.phpfreaks.com/topic/194129-stumped-php-error-when-uploaded/#findComment-1021386 Share on other sites More sharing options...
amavadia Posted March 4, 2010 Author Share Posted March 4, 2010 line 57 doesn't event have any code on it, its just the php closing tag '?>' You probably have some white-space on that line after the ?> tag. AMAZING... Thank You!! Really would not have thought about that... all that aggravation for a space! Quote Link to comment https://forums.phpfreaks.com/topic/194129-stumped-php-error-when-uploaded/#findComment-1021388 Share on other sites More sharing options...
amavadia Posted March 4, 2010 Author Share Posted March 4, 2010 Out of interest, why does the space not make a difference when developing locally but has an impact online? Quote Link to comment https://forums.phpfreaks.com/topic/194129-stumped-php-error-when-uploaded/#findComment-1021402 Share on other sites More sharing options...
PFMaBiSmAd Posted March 4, 2010 Share Posted March 4, 2010 You php.ini must have the output_buffering setting turned ON or set to a specific value, thereby hiding the problem. I would recommend turning output_buffing OFF because that will result in a development system that will help you produce code that will work on all server configurations. Quote Link to comment https://forums.phpfreaks.com/topic/194129-stumped-php-error-when-uploaded/#findComment-1021409 Share on other sites More sharing options...
amavadia Posted March 4, 2010 Author Share Posted March 4, 2010 Just turned it off Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/194129-stumped-php-error-when-uploaded/#findComment-1021413 Share on other sites More sharing options...
Deoctor Posted March 4, 2010 Share Posted March 4, 2010 so PFMaBiSmAdif we have a space at the end of the ?> tag php will not able to resolve that space or how it will be.. can u explain it to me more.. if u have any article can u just let me know of that.. Quote Link to comment https://forums.phpfreaks.com/topic/194129-stumped-php-error-when-uploaded/#findComment-1021421 Share on other sites More sharing options...
PFMaBiSmAd Posted March 4, 2010 Share Posted March 4, 2010 output started at /home/sites/findaplacement.com/public_html/list.inc.php:57 Anything that is not in between php tags is in-line (static, not dynamic) content in that file and will be output to the browser. Quote Link to comment https://forums.phpfreaks.com/topic/194129-stumped-php-error-when-uploaded/#findComment-1021425 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.