View previous topic :: View next topic |
Author |
Message |
m7d7g7 -
Joined: 29 Nov 2002 Posts: 4 Location: USA
|
Posted: Sat Nov 30, 2002 12:39 am Post subject: FTPex Script Help |
|
|
(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 |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Nov 30, 2002 1:34 am Post subject: Re: FTPex Script Help |
|
|
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 |
|
|
m7d7g7 -
Joined: 29 Nov 2002 Posts: 4 Location: USA
|
Posted: Sat Nov 30, 2002 2:12 am Post subject: |
|
|
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 |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Nov 30, 2002 10:33 pm Post subject: |
|
|
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 |
|
|
Guest
|
Posted: Sun Dec 01, 2002 12:03 am Post subject: |
|
|
ok...i got it. you cant have the files in a password protected directory. :D thanks for your help! |
|
Back to top |
|
|
Help .. Guest
|
Posted: Tue Dec 10, 2002 5:14 am Post subject: |
|
|
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
|
Posted: Tue Dec 10, 2002 1:38 pm Post subject: |
|
|
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 |
|
|
|