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

    Join Date
    Jul 2009
    Posts
    86
    Rep Power
    6

    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. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,112
    Rep Power
    9398
    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
    6
    Hi, thanks for the reply, I got Invalid Command for both.
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,440
    Rep Power
    4539
    I don't use IIS FTP and have no clue, sorry.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2009
    Posts
    86
    Rep Power
    6
    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. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,112
    Rep Power
    9398
    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