Jump to content
xisto Community
gisellebebegirl

Wordpress Error Help Urgent

Recommended Posts

I am getting this message when trying to access my website http://forums.xisto.com/no_longer_exists/

Warning: Cannot modify header information - headers already sent by (output started at /home/giselle/public_html/chantellepaige.org/index.php:4) in /home/giselle/public_html/chantellepaige.org/news/wp-includes/pluggable.php on line 864

can somoene help me? i googled and it said to take out spaces near it but its not working

Share this post


Link to post
Share on other sites

I can access your site just fine. Is this error now OK for you?That error is caused where you send some data to the browser, then try to modify the headers of the page. Before data is sent, the headers have to be sent, and cannot be changed after data has started being sent. You'll need to look through the code to see if anything is outputted to the browser before the headers are changed. If you've recently modified any code, revert to an earlier backup to resolve the problem.

Share this post


Link to post
Share on other sites

To clarify, anything sent to the browser before a line like:

header("some code here");

Will cause this error. For example:
Echo "Redirecting....";header("location:anothersite.com");

Oo i just realized you come from Exeter rvalkass! Nice place... Holidayed there three times now :(

Back on subject.... You can try re-downloading the installer archive if you didnt change anything, could just be a dodgy download source. Or if you downloaded a custom or modded version of the system then download the official one and see if the error goes away.

Share this post


Link to post
Share on other sites

To add some information about the cannot modify header, I suggest to start using ob_start("ob_gzhandler"); just read about it on a PHP manual, it's really very useful and the script doesn't execute slower or something, sometimes even faster, because of that a browser supports gzip encoding, also you can use 3 or more output buffers to do something with your code/script and you can always use header(); or send Cookies, even though you already printed something and you won't get any errors. :(

Here is one example how you can use it:

<phpif (EXEC_GZIP && !headers_sent() && ( ob_get_length() == 0 ) && extension_loaded('zlib') && ( ini_get('zlib.output_compression') != 1 || ini_get('output_handler') != 'ob_gzhandler') ){	ob_start("ob_gzhandler");	define('GZIP_IS_ON', 1);}?>

Lets say EXEC_GZIP is a setting true or false to use output buffering and if it's true and etc. GZIP_IS_ON define is used for to end a script, if you're using more than 1 output buffers.. I use three or two, it depends, but usually it is needed to send the right content length of a file to the browser that is why I call ob_end(); function, which looks like this:

<phpfunction ob_end() {	// Turn off Templater	ob_end_flush();	// Turn off GZip output buffering	if (defined('GZIP_IS_ON') ) ob_end_flush();	// Send the right header for length of the output buffer	header("Content-Length: " . ob_get_length() );	// Send the output buffer and turn off output buffering	ob_end_flush();}?>

Share this post


Link to post
Share on other sites

Hi!@AlokI'm assuming you are getting the error: "Warning: Cannot modify header information - headers already sent by ...". Can you reply with the name of the file listed in the error? If you can open the file, make sure you've removed and spaces at the beginning of the file before the <?php opening tag. Next, check for any echo or print statements at the start of the file that appear before header statements. Also ensure that any functions that call echo or printer do not precede functions that call header. As a last resort, you can use output buffering by setting it in the PHP configuration file, which is the php.ini file located in the etc folder on most Linux distributions.Hope this helps. Oh, and can you post more information about the environment you've got there? What Operating System are you running, are you using an Apache MySQL PHP bundle, what version of PHP are you running, which version of WordPress have you got and which plugins are installed, what theme are you running, did you manually edit any of the files? This information will help in further diagnosing the problem you are experiencing.Regards

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.