Topic "PHP File and Editor Issues"

Author Message
Anonymous User

Guest


Running a Debian server and performing modifications to a .php script on a Windows XP environment. Opening files from WinSCP either through the internal or an external editor will display blank lines after a closing PHP statement, ?>.

I have modified end-of-file settings with no positive results. This has been tested on two different machines with the same result, with files created in multiple editors.

The issue does not seem to appear in other documents, only in documents that have a closing PHP statement in the middle of the file.

Note that copying the file to a directory and opening it locally will result in the file being displayed properly.

Is this a bug or is there a setting I have missed?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
I'm not able to reproduce this. Neither with external not internal editor. What version of WinSCP are you using? Do I understand right that the file looks like:
Code:
<?\n
code\n
code\n
?>

_________________
Martin Prikryl
inetbizo
[View user's profile]
Donor
Joined: 2008-07-29
Posts: 1
Location: Destin, FL, USA
I've been using the internal editor and the files are not being saved in unix format but windows and therefor corrupts the linux file. I cannot find setting to make sure file is saved in unix format without windows EOF
Anonymous User

Guest


Sorry for the delayed response. This was attempted in both WinSCP 4.1.5 (Build 410) and WinSCP 4.1.6 (Build 412).

Yes, prikryl, what you have for the example is similar, but any addition to the end of the script will not be shown.

For example:
Code:
<?php\n
code\n
code\n
?> \n
<html here>\n
<php\n
code\n
?>


Anything that is included after the first "?>" will not be displayed in any editor if opened directly from the server through WinSCP.

Hope that clarifies.
Anonymous User

Guest


One more bit of clarification: It is not necessarily HTML or other PHP scripts that do not display - any text entered after the closing tag is 'truncated', but the whitespace and number of lines are both retained.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Please download the file using binary mode to your local machine, archive it (e.g. to ZIP file) and send it to my email. Thanks. You may also try to reupload the file back under the different name and verify the the problem still appears, so I should be able to reproduce the problem on my system. Also what is your server? FTP/SCP/SFTP? What OS?
_________________
Martin Prikryl
Anonymous User

Guest


prikryl, I have sent you an email with the information you requested.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
For tracking: The problem is caused by bug in ascii transfers in MySecureShell.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License