Jump to content

[SOLVED] possible text editor issues


jmr3460

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.