Annoying headers already sent error - PHP

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 642 Views - Last Post: 30 January 2012 - 09:18 PM Rate Topic: -----

Topic Sponsor:

#16 thrca  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 28
  • View blog
  • Posts: 65
  • Joined: 21-January 12

Re: Annoying headers already sent error - PHP

Posted 30 January 2012 - 09:38 AM

Try using references to your images from the root..

<img src="/icons/addstudent.png"/>



It sounds like you are including a file in a different subdir, which invalidates the relative path.

IE, Included file is in "/includes/somefile.php" and references "icons/someicon.png" which evaluates as "/includes/icons/someicon.png", not "/icons/someicon.png" as you are expecting it to.
Was This Post Helpful? 0
  • +
  • -

#17 squibby  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 59
  • Joined: 21-January 12

Re: Annoying headers already sent error - PHP

Posted 30 January 2012 - 06:25 PM

i run xampp on windows 7 when i am developing, but i uploaded to a linux host. Is that going to cause a problem? as all the files are the same.

I had a look at the logs but they dont make too much sense to me.

i also have tried the following before it doesnt make them show.grrr

<img src="/icons/addstudent.png"/>


Was This Post Helpful? 0
  • +
  • -

#18 no2pencil  Icon User is online

  • 2 girls, 1 club
  • member icon

Reputation: 3050
  • View blog
  • Posts: 22,959
  • Joined: 10-May 07

Re: Annoying headers already sent error - PHP

Posted 30 January 2012 - 06:28 PM

View Postno2pencil, on 30 January 2012 - 02:35 AM, said:

Does the sub directory have the correct permissions for the apache service (user) to enter?

Was This Post Helpful? 0
  • +
  • -

#19 squibby  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 59
  • Joined: 21-January 12

Re: Annoying headers already sent error - PHP

Posted 30 January 2012 - 06:58 PM

yeh i went to filezilla and set 777 in the permissions which is basically permission on everything and applied it to everything.
Was This Post Helpful? 0
  • +
  • -

#20 squibby  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 59
  • Joined: 21-January 12

Re: Annoying headers already sent error - PHP

Posted 30 January 2012 - 09:18 PM

Thanks for everyones help on this but i cant get it fixed. Its stopping me getting on with developing my site and i have so many other things i still have to do with it and things that i need to fix.

If anyone else has anymore suggestions please post asap. But im gonna have to give up for time being. thanks.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2