logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: Cannt send header problem
Author
peacemaker



Joined: 23 May 2008
Posts: 80

PostPosted: Tue 25 Aug '09 12:28    Post subject: Cannt send header problem Reply with quote

Hi all , this is with respect to my previous threads, i have uploaded up my site and now the problem is its giving me error
Quote:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /../../../../../modifyemp.php:1) in /../../../..l/modifyemp.php on line 150

and the line 150 is:-- session_start().
The wat can be the problem, i have deleted all the html before this and above this 150 line there is javascript code for validation.
Wat can be the problem, this is form for modifying emp details. Even it gets updated properly inspite of this session error.
Thanks in advance
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Tue 25 Aug '09 14:20    Post subject: Reply with quote

same as with the header function. No output before the session_start. So you may start your session at the very top of your code. See http://de.php.net/manual/en/function.session-start.php
Back to top
peacemaker



Joined: 23 May 2008
Posts: 80

PostPosted: Wed 26 Aug '09 7:24    Post subject: All clear now Reply with quote

Hi thanks james for your gr8 help always , my all problems are clear now, the header problem ,and session problem. I put session start at very first line thats line 1. so no prob of header and session now. Thanks a lot for your help regarding this.
Back to top
peacemaker



Joined: 23 May 2008
Posts: 80

PostPosted: Wed 10 Nov '10 16:56    Post subject: Session Problem Reply with quote

Hi james, i solved that problem by putting session_start at top of the page.
But there was another problem regarding this, it was giving error related to session, i searched aand came to know that i have to remove some characters by editing the php file in text using utf-8 format. There are some ascii chars at the beginning of file i removed them and it worked properly.
i make a new topic with error message and then i will describe it properly.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Wed 10 Nov '10 18:00    Post subject: Reply with quote

That is the issue saving files UTF-8 with BOM. If you have a good reason to save files in UTF-8 (like letter that doesn't fit into iso-8859-1) than use UTF-8 without BOM. If you don't have any special charakters / letters in your php code it is recommend to save php files in ASNI / ASCII.
Back to top
peacemaker



Joined: 23 May 2008
Posts: 80

PostPosted: Thu 11 Nov '10 13:16    Post subject: Reply with quote

now i dnt remember in which file format i saved but at the moment its working fine. wat i feel is its i removed those special chars and then i think i saved it in ANSI and its working thats it..
Back to top


Reply to topic   Topic: Cannt send header problem View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner