FTPex Script Help

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
m7d7g7
-


Joined: 29 Nov 2002
Posts: 4
Location: USA

PostPosted: Sat Nov 30, 2002 12:39 am    Post subject: FTPex Script Help Reply with quote

(http://www.teca-scripts.com/free/ftpex.php)
this script is suppost to display all of the files on a FTP site. i got it configured that so it looks in a directory that i specified inside the root of the site. (i just have a folder called files(i want to share pictures)). the script works fine i can see all of the files and folders in the directory. but the problem comes when i click to download the file. it says the page canot be found. i put the configuration part of the script below.

Code:
########################################################
# URL of this script
$script    = "http://127.0.0.1/cgi-bin/ftpex/FTPex.cgi";

########################################################
# Base absolute path and base URL, $basedir SHOULD point to $baseurl
$basedir   = "c:\\server\\site\\members\\files";
$baseurl   = "http://127.0.0.1/cgi-bin/ftpex/";

########################################################
# Header and Footer files
$header    = "c:/server/site/cgi-bin/ftpex/header.txt";
$footer    = "c:/server/site/cgi-bin/ftpex/footer.txt";

########################################################
# URL to images directory, relative or absolute
$imagedir  = "images";

########################################################
# File types with their own images, the images should be named [type].gif
@filetypes = ("avi", "bmp", "gif", "html", "jpg", "mov", "mpeg", "swf", "txt", "zip");

########################################################
# To enable internal text viewer, set to 1, or 0 otherwise
$textviewer= 1;

########################################################
# File types which uses the internal text viewer
@texttypes = ("txt", "msg", "ini");

# END OF CONFIG


hopefully someone will spot the problem :) but you can find a working demo of the script here: http://www.teca-scripts.com/cgi-bin/ftpex/ftpex.cgi

thanks,
mike
Back to top View user's profile Send private message AIM Address MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Nov 30, 2002 1:34 am    Post subject: Re: FTPex Script Help Reply with quote

You should edit the FTPex.cgi file and locate the two lines which start by:
Code:

$basedir=
$baseurl=


and change them as follows:
Code:

$basedir   = "c:\\program files\\abyss web server\\htdocs\\mydir";
$baseurl   = "/mydir";


Where $basedir is the real path corresponding to the virtual path $baseurl
(of course, change them to be suitable to the paths you have on your
computer.)
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
m7d7g7
-


Joined: 29 Nov 2002
Posts: 4
Location: USA

PostPosted: Sat Nov 30, 2002 2:12 am    Post subject: Reply with quote

still doesnt work? here is my code now:

Code:
########################################################
# URL of this script
$script    = "http://127.0.0.1/cgi-bin/ftpex/FTPex.cgi";

########################################################
# Base absolute path and base URL, $basedir SHOULD point to $baseurl
$basedir   = "c:\\server\\site\\members\\files";
$baseurl   = "/files";

########################################################
# Header and Footer files
$header    = "c:/server/site/cgi-bin/ftpex/header.txt";
$footer    = "c:/server/site/cgi-bin/ftpex/footer.txt";


BTW i'm asking you for help becuase i e-mailed the guy who made this and never got a reply. :roll:
Back to top View user's profile Send private message AIM Address MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Nov 30, 2002 10:33 pm    Post subject: Reply with quote

m7d7g7 wrote:
still doesnt work? here is my code now:

Code:
########################################################
# URL of this script
$script    = "http://127.0.0.1/cgi-bin/ftpex/FTPex.cgi";

########################################################
# Base absolute path and base URL, $basedir SHOULD point to $baseurl
$basedir   = "c:\\server\\site\\members\\files";
$baseurl   = "/files";

########################################################
# Header and Footer files
$header    = "c:/server/site/cgi-bin/ftpex/header.txt";
$footer    = "c:/server/site/cgi-bin/ftpex/footer.txt";


BTW i'm asking you for help becuase i e-mailed the guy who made this and never got a reply. :roll:

It works fine when we tested it with the settings we gave you. May be you have a wrong path somewhere. So double check what you have written here (it depends on your computer.) But in practice, nothing prevents it from working.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Guest






PostPosted: Sun Dec 01, 2002 12:03 am    Post subject: Reply with quote

ok...i got it. you cant have the files in a password protected directory. :D thanks for your help!
Back to top
Help ..
Guest





PostPosted: Tue Dec 10, 2002 5:14 am    Post subject: Reply with quote

I try to use this script ..but cant manage to make it work .. here is my code
Code:
########################################################
# URL of this script
$script    = "http://203.125.64.99/cgi-bin/FTPex.cgi";

########################################################
# Base absolute path and base URL, $basedir SHOULD point to $baseurl
$basedir   = "C:\\Abyss Web Server\\Webby\\FTP";
$baseurl   = "FTP/";

########################################################
# Header and Footer files
$header    = "C:\Abyss Web Server\cgi-bin\header.txt";
$footer    = "C:\Abyss Web Server\cgi-bin\footer.txt";

########################################################
# URL to images directory, relative or absolute
$imagedir  = "C:\Abyss Web Server\Webby\images";

########################################################
# File types with their own images, the images should be named [type].gif
@filetypes = ("bmp", "gif", "html", "jpg", "txt", "zip");

########################################################
# To enable internal text viewer, set to 1, or 0 otherwise
$textviewer= 0;

########################################################
# File types which uses the internal text viewer
@texttypes = ("txt", "msg", "ini");

# END OF CONFIG
########################################################
########################################################


Help pls ..
Back to top
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Dec 10, 2002 1:38 pm    Post subject: Reply with quote

We already answered to the same question and gave instructions on how to make that script work. So please follow them.
By the way, we noticed that you use \ in the strings. You should double \ in the strings (this is the PHP syntax.)
Your base_url should start with a slash /.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group