FileZilla upload

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

FileZilla upload

Post by icesolid »

I am having the strangest problem.

I have uploaded files through FileZIlla forever, suddenly I noticed I was getting a session_start - headers already sent error on one my pages and couldn't figure out why it was happening. I tried uploading the same file through a different client (WinSCP) and the the error went away.

Any ideas what is going on? I like FileZilla much better than WinSCP.
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Re: FileZilla upload

Post by icesolid »

I forgot to add that I am running the FileZIlla client on Ubuntu (linux) and WinSCP on Windows (obviously)
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: FileZilla upload

Post by pickle »

Maybe an encoding issue?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: FileZilla upload

Post by McInfo »

I'm curious whether this script reveals a difference between the two versions of the file.

Code: Select all

<?php
// Change this to the appropriate file name
$filename = './target';
printf("File-Size: %d bytes; ", filesize($filename));
if ($fh = fopen($filename, 'rb')) {
    if ($byte = fread($fh, 1)) {
        list(, $byte) = unpack('C', $byte);
        printf("First-Byte: 0x%02X; ", $byte);
    }
    if ($byte = fread($fh, 1)) {
        list(, $byte) = unpack('C', $byte);
        printf("Second-Byte: 0x%02X; ", $byte);
    }
    fclose($fh);
}
Post Reply