function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
shan876shan876 

Error getting the PHP tool to work on server?????

Hi :
  So I loaded php toolkit to the hosting server that I have online... I get an error trying to start it

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/domain/public_html/sfdc/samples/header.inc:9) in /home/domain/public_html/sfdc/samples/login.php on line 30

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/domain/public_html/sfdc/samples/header.inc:9) in /home/domain/public_html/sfdc/samples/login.php on line 30
 
Does anyone know where I am going wrong???
Am I suppose to do something?
 
I did test out the report/index.html and got no errors and place my salesforce login...
SforcePartnerClientTest this works out....
 
Thanks
Shan
 
 
 
sf_davesf_dave
This error usually means that a page has written output to the browser, either through

echo "asdf";

or just having HTML in PHP, prior to your session_start() call.

Just ensure your session_start() is before any output is sent to the browser.

-Dave
jhilgemanjhilgeman
I'm coming in a little late on this one, but figured in case anyone else comes by this thread...
 
Dave is correct in saying that some data (even if it's just an accidental blank space in the wrong spot) got sent to the browser, which is what's causing the problem. I just wanted to add that the error messages indicate where the problem started. Look in the parentheses part of the error messages:
 
(output started at /home/domain/public_html/sfdc/samples/header.inc:9)
 
That means that you need to open up the file called /home/domain/public_html/sfdc/samples/header.inc, and go down to line 9. You may have a print or an echo statement in there or something that sends data to the browser. To avoid the problem, you just have to remove that line or the code that sends the data to the browser OR move your session_start() (and other session_ functions) code to be ABOVE line 9.
 
- Jonathan