in reply to Net-FTP corrupting php file

y, my first thought also was that the php file should be put across as text .. can you post the line of the php file that gives the parse error? That might show how the file was changed.. Actually, even better--can you diff the php file that was put up via Net::FTP against a good version that you put up there with WS-FTP?

Replies are listed 'Best First'.
Re^2: Net-FTP corrupting php file
by cormanaz (Deacon) on May 23, 2005 at 21:54 UTC
    You mean compare the two files? Why didn't I think of that? When I did, I found the clue that let me discover the real prolem.

    Perhaps you will get a kick out of this: I had put the wrong file handle on a close command so the PHP file wasn't closed when Net::FTP uploaded it, and there was still a little text left in the buffer resulting in a truncated file. After the upload, PERL flushed the buffer and closed the file before shut down, so when I then uploaded the file with my FTP client it was the complete file and of course it worked.

    I hate it when that happens :-)

    Steve