LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-03-2004, 01:37 PM   #1
ppaul
LQ Newbie
 
Registered: Jul 2003
Posts: 1

Rep: Reputation: 0
Unhappy phpnuke


Hello, I working on my web-page (first time) using Apache, MySql, and Phpadmin, Phpnuke.

when i try to view my web-page from another PC i get the following errors on the first page.

Warning: Cannot add header information - headers already sent by (output started at /var/www/html/header.php:32) in /var/www/html/includes/sessions.php on line 249

Warning: Cannot add header information - headers already sent by (output started at /var/www/html/header.php:32) in /var/www/html/includes/sessions.php on line 250
PHP-Nuke Powered Site: Forums



Warning: Cannot add header information - headers already sent by (output started at /var/www/html/header.php:32) in /var/www/html/includes/page_header.php on line 525

Warning: Cannot add header information - headers already sent by (output started at /var/www/html/header.php:32) in /var/www/html/includes/page_header.php on line 531

Warning: Cannot add header information - headers already sent by (output started at /var/www/html/header.php:32) in /var/www/html/includes/page_header.php on line 532


can anyone help me, not sure what to do, or why i'm getting this.

Thank-you PPaul
 
Old 04-09-2004, 07:39 AM   #2
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
I can tell you why you get this error, but probably not how to resolve it.
The reason for this error is as it states that header can't be sent because some text has already been sent to the client. This usually happens when you try to set cookies after having sent text to the client.
Cookies are sent using headers and need to be the very first thing sent to the client. If any character are sent, even an empty line you would get this error if you try to set cookies.

This means that you can't have an empty line at the top of your php script pages (above the <?php tag) as this would send the header and an empty line to the client.
 
Old 04-11-2004, 11:09 PM   #3
abs
Member
 
Registered: Oct 2003
Posts: 203

Rep: Reputation: 30
easiest way to fix it is put
Code:
<?php ob_start(); ?>
at the TOP of the php file (first line). check output buffering for info on this.

ob_end_flush() gets called automatically when the script ends.

IN THIS CASE: i guess u've just installed php nuke and are running it, it's not actually ur script. so check if the server has enabled output buffering. put <?php phpinfo(); ?> in a file and view it in browser. i think it's been disabled. if it's ur own webserver, check apache config to change this. may have to restart apache. if server can buffer output, check php.ini.

Last edited by abs; 04-11-2004 at 11:23 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHPNuke 7.7 and SendMail Fegero Linux - Software 0 07-07-2005 11:32 AM
PHPNuke: what is it?? orange400 Linux - Software 2 08-06-2004 05:25 PM
PHPNUKE and DEBIAN Linutzo Debian 1 04-29-2004 05:01 PM
phpnuke and phpbb dilberim82 Linux - Software 2 03-06-2004 07:06 PM
can't get phpnuke to work xiryc13 Linux - Newbie 2 02-26-2004 01:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration