#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2009
    Posts
    86
    Rep Power
    5

    PHP ftp_size


    Hi Chaps,

    I'm trying to read the file size on an FTP site.

    I've been using ftp_size() which worked, but since have upgraded our server to IIS 7.5.

    I read on http://php.net/manual/en/function.ftp-size.php, that not all servers support this.

    Is there something on the server that I can change to enable this? Or is there something else I can try?

    Cheers
  2. #2
  3. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,749
    Rep Power
    9397
    It seems IIS 7.5 does support SIZE so this is really a question about how to enable the support or whatever.

    While I move this, got a question or two:
    If you connect to the server yourself (like opening cmd.exe, typing "ftp host", and logging in as needed) and run "FEAT", what do you get back? If you then try "SIZE filename" what happens?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2009
    Posts
    86
    Rep Power
    5
    Hi, thanks for the reply, I got Invalid Command for both.
  6. #4
  7. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    I don't use IIS FTP and have no clue, sorry.
    ======
    Doug G
    ======
    It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2009
    Posts
    86
    Rep Power
    5
    When I access the FTP site through IE8/FireFox, the file sizes are displayed, but SIZE is not enabled through CMD.exe,

    I tested:
    CMD.exe > ftp host > username > password > ?
    neither FEAT nor SIZE were displayed

    Has anyone got any ideas on this? This is litterally the last part of my application and desperate to get this sorted!
  10. #6
  11. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,749
    Rep Power
    9397
    Only thing I can think of, besides a lot of Googling, is to run a packet sniffer and see what Firefox is doing. Wireshark is the best - there are portable versions if you don't want to install it.

IMN logo majestic logo threadwatch logo seochat tools logo