Jump to content

Recommended Posts

I am not sure but I am beginning to think that I have a text editor issue. I start a new page fresh and if I am trying to session_start() or set_cookie() I get header errors. The only way I can stop the errors is to trim() them. Does this mean that my editor is inserting white space or something.

I am not really asking for a list of editors as much as is this possible. Well maybe I would like to know what some of you use (if this is appropriate to ask)? I am currently using UltraEdit v12.

Link to comment
https://forums.phpfreaks.com/topic/160372-solved-possible-text-editor-issues/
Share on other sites

I am not sure but I am beginning to think that I have a text editor issue. I start a new page fresh and if I am trying to session_start() or set_cookie() I get header errors. The only way I can stop the errors is to trim() them. Does this mean that my editor is inserting white space or something.

I am not really asking for a list of editors as much as is this possible. Well maybe I would like to know what some of you use (if this is appropriate to ask)? I am currently using UltraEdit v12.

 

You can do a test like this. Copy the code to "notepad" or any other plain text editor and save it as the "php" file. Run this file. If it is not showing any error, then surely, you are having an issue with the script editor that you are using.

 

this is my code:

<?php
setcookie("TestCookie","dogs");
?>

 

This is my warning:

Warning: Cannot modify header information - headers already sent by (output started at /home3/simplic5/public_html/php/index.php:1) in /home3/simplic5/public_html/php/index.php on line 2

What is wrong with this code?

I guess my text editor will only let me save as utf-8 BOM.

 

This is the actual code of the warning when I view source code. is the <br /> from the browser or the PHP saved file?

<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home3/simplic5/public_html/php/index.php:1) in <b>/home3/simplic5/public_html/php/index.php</b> on line <b>2</b><br />

I guess my text editor will only let me save as utf-8 BOM.

 

This is the actual code of the warning when I view source code. is the <br /> from the browser or the PHP saved file?

<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home3/simplic5/public_html/php/index.php:1) in <b>/home3/simplic5/public_html/php/index.php</b> on line <b>2</b><br />

 

Try Eclipse with PDT. Free, lightweight and simply great.

http://www.eclipse.org/pdt/downloads/

Problem solved on one machine. I upgraded my UltraEdit to v.15 and tried to set a cookie and it is set. I have 45 days with this trial version. It is a programming editor that I am very familiar with so unless I have any other problems I going to stay with this. Thanks for all the help freaks.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.