Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 879245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:54:04+00:00 2026-05-15T11:54:04+00:00

Alright well, I connect to 3 different ip’s when I run this script. It

  • 0

Alright well, I connect to 3 different ip’s when I run this script.

It copys files from directorys and downloads them to the website.

I’m having a slight problem with two of them ip’s…

I have turned on ftp passive but it still seems to come back as bool(false)

Updating server 1
bool(false) 
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line     42

Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 42
Updated cache...
bool(false) 
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line     60

Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 60
BZh9rE8PUpdated maps...
Updating server 2
bool(false) 
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line     103

Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 103
Updated cache...
bool(false) 
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line     121

Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 121
BZh9rE8PUpdated maps...
Updating server 3
array(1) { [0]=> string(36) "1ba90fa2e972b50cdaa6bb23c403296b.dua" } Updated cache...
array(8) { [0]=> string(6) "graphs" [1]=> string(22) "sb_Forlorn_sb3_R2L.bsp" [2]=>     string(17) "sb_gooniverse.bsp" [3]=> string(22) "sb_lostinspace_rc5.bsp" [4]=> string(19)     "sb_new_worlds_2.bsp" [5]=> string(22) "sb_Spacewar_SB3_V1.bsp" [6]=> string(21)     "sb_twinsuns_fixed.bsp" [7]=> string(10) "soundcache" } Updated maps...

. Part of the script:

ftp_pasv($conn, true); 
ftp_chdir($conn,"$DIR/maps/"); 

$files = ftp_nlist($conn,"*.*"); 
var_dump($files);

chdir('sandbox/cache/');

for($i=0;$i<count($files);$i++){ 
    if(!ftp_is_dir($files[$i])){
        usleep(500000); 
        if(!file_exists($files[$i])){
            ftp_get($conn,$files[$i],$files[$i],FTP_ASCII); 
        }
    }
} 

echo "Updated cache...<br />";
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:54:04+00:00Added an answer on May 15, 2026 at 11:54 am

    You are not using ftp_nlist() correctly.

    The manual for ftp_nlist() specifies the second argument to be a directory name (represented by a string). It looks as if you are instead trying to denote a filename pattern.

    Your code is using:

    $files = ftp_nlist($conn,"*.*"); 
    

    Unless you do have a directory named *.* this will not work.

    You should replace *.* with a valid directory name relative to the FTP user’s home directory.

    For example:

    $files = ftp_nlist($conn, ".");
    

    will list files in the current directory, which is likely to be $DIR/maps/ with respect to your example code.

    You may also need to switch to FTP passive mode to cope with firewall issues between the host from which your script is running and the FTP host. Refer to the manual for ftp_pasv() for details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright guys, well, here is the thing. I used this wonderful website and found
Alright well I am trying to create a dictionary from a text file so
Alright I created some custom classes for my project sourced from this tutorial ,
Alright, well this is the deal. I have a page, and then it loads
Alright, switching from working Hpricot to Libxml-ruby due to speed and well the disappearance
Alright, so everything on this website was finished, it all worked, it displayed right
Alright, well. I was making a Hashing/Dehashing website for hashing MD5, SHA1, SHA512, etc.
Alright well I recently got into normalizing my database for this little side project
Alright, so this question isn't exactly about thread management... well, sort of. I am
Alright, i dont know how to explain it well.. but i have a switch

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.