NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Windows IDE save file format


Joined: 16 Jun 2006
Posts: 8
Reply with quote
Hi Everyone,
Here's an interesting little problem I've ran into. I develop on a Windows XP machine with NuSphere PhpED 4.6.1 Build 4627. My test and production environments are *nix based. Now, when I have some PHP scripts that don't send browser output, I'll get the "Error on line 20. Cannot modify header errors, headers already sent by Line: XX" This error will occur immediately after my closing ?> tag for the script. The problem is, I have no line 20, the last line according to PhpEd is 19. It's always an off by 1 case. I'm assuming the way PhpEd is saving files with the EOF character, the *nix systems are interpreting that character as a blank line.

I have my File Format drop down set to Unix in PhpEd. Has anyone else experienced this and found a way to get the files to "stay the same" between" environments. It's really time consuming to have to go through and manually remove the blank lines from the files on the *nix machines once they're there.

Thanks!

Bob
View user's profileFind all posts by BobtoriousSend private message


Joined: 01 Mar 2006
Posts: 42
Location: Poland
Reply with quote
Works with no problem here (b 4627), see if you're missing a semiclon or have unclosed brackets. Does PhpEd highlight any syntax error (red underline) ?
View user's profileFind all posts by ertiusSend private message


Joined: 16 Jun 2006
Posts: 8
Reply with quote
ertius wrote:
Works with no problem here (b 4627), see if you're missing a semiclon or have unclosed brackets. Does PhpEd highlight any syntax error (red underline) ?


There is no syntax error. The scripts all work as expected. The only thing is that Linux sees an extra new line after my closing ?> Leaving the browser to believe that there is non php stuff to send. If I open the file in PhpEd, that extra line isn't there. The minute I move it over to a *nix machine, I can nano or vi the file, and there is an extra whitespace line at the end which I have to manually remove.

Also, if I take the file and copy it back over from the *nix machine, and open it on Windows with PhpEd, there is no extra blank line after the closing ?>. Very interesting indeed.
View user's profileFind all posts by BobtoriousSend private message


Joined: 01 Mar 2006
Posts: 42
Location: Poland
Reply with quote
I got similar problem (but not related to PhpEd) some time ago. I was including many files in one .php and in one of those files there was a white space before <?

I do all my work on PhpEd using "Windows" file format, copy it to Linux server over sftp and all works fine for me. Does "windows" file format help ?
View user's profileFind all posts by ertiusSend private message


Joined: 16 Jun 2006
Posts: 8
Reply with quote
ertius wrote:
I got similar problem (but not related to PhpEd) some time ago. I was including many files in one .php and in one of those files there was a white space before <?

I do all my work on PhpEd using "Windows" file format, copy it to Linux server over sftp and all works fine for me. Does "windows" file format help ?


Saving using the Windows file format gives me the same problem. Thanks for the replies too!
View user's profileFind all posts by BobtoriousSend private message


Joined: 01 Mar 2006
Posts: 42
Location: Poland
Reply with quote
Are you using PhpEd's (s)ftp feature to send files or 3rd party app ?
View user's profileFind all posts by ertiusSend private message


Joined: 16 Jun 2006
Posts: 8
Reply with quote
ertius wrote:
Are you using PhpEd's (s)ftp feature to send files or 3rd party app ?


I am not using PhpEd's sftp feature. I am using the SSH Secure File Transfer application to move my files to the *nix boxes.
View user's profileFind all posts by BobtoriousSend private message


Joined: 01 Mar 2006
Posts: 42
Location: Poland
Reply with quote
Bobtorious wrote:
I am not using PhpEd's sftp feature. I am using the SSH Secure File Transfer application to move my files to the *nix boxes.

PhpEd has builid-in SCP - see Tools -> Accounts. Try this function to send files to your devbox, maybe SCP your're using is messing with files you send.
View user's profileFind all posts by ertiusSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Problem with extra line end at the end of saved file is confirmed by our QA team and will be fixed in forthcoming build 4628.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 16 Jun 2006
Posts: 8
Reply with quote
dmitri wrote:
Problem with extra line end at the end of saved file is confirmed by our QA team and will be fixed in forthcoming build 4628.


Ah, good to hear! I will await 4628. Thanks for the info Dmitri!
View user's profileFind all posts by BobtoriousSend private message
Windows IDE save file format
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic