Games
AU nouse
Member
2,179 Posts
#1
2.8 years ago
Hey guys,

im creating a mini forum where forum topic's will be displayed in an external page. I have managed to make it work though when I put it on the internet i get PHP Warnings and I don't get them while using XAMPP. Any idea's how to fix?

URL:http://122.201.100.216/~mysuperb/web/aa/forumdisplay.php

Highlight the page as the text for warning is white.

ERRORS:

[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at /home/mysuperb/public_html/web/aa/test.php:11)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at /home/mysuperb/public_html/web/aa/test.php:11)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at /home/mysuperb/public_html/web/aa/test.php:11)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at /home/mysuperb/public_html/web/aa/test.php:11)
AU Ponco
PC Platform Mod
2,433 Posts
#2
2.8 years ago
Hey mate,

Can you post the code?

pastebin.com


And just to clarify...you copy / pasted your entire site to a web server (from your XAMMP server), and now you're getting these errors?
AU nouse
Member
2,179 Posts
#3
2.8 years ago
I found the solution :).

My method wasn't connecting to external link and rather trying to make it work within the php code. I connected it to another html document and used

<!-- BEGIN announcements -->
<div><table cellspacing="0" cellpadding="0" width="190px" border="1" style="background-color:transparent; border-bottom:1px dotted #8e8e8e; font-size:15px;"><td><a href='{announcements.POST_LINK}'>{announcements.TOPIC_TITLE}</a><br /></td>
<td>{announcements.POST_AUTHOR}<br /></td></table></div>
<!-- END announcements -->

and it fixed it.

And the error was coming from putting that div inside the php using echo "html codes"; . It still don't show error on xamp but on internet it did so i ll just use this new method i found

/LOCK
AU Antonio
Member
6,961 Posts
#4
2.8 years ago
chances are your XAMPP install is set to ignore warnings while online one is spiting them all out.

headers already sent means your outputting html then modifying headers, http headers are sent to the browser before any html hence why its complaining your modifying them after they have already been sent.

when modifying headers you need to do it at the very top of the script before any html.

Back to Top