- Web server: any web server which can run PHP. The most popular one is Apache.
- PHP: at least version 4.2.3. net2ftp works under safemode.
- Disk space: 450kB for net2ftp, and a few MB for the temporary files.
1 - Unzip all the files on your computer, and upload them to your server.
2 - The /temp directory should be chmodded to 777 (you can use www.net2ftp.com to do this).
3 - Set your settings in the settings.inc.php file. Read the comments to know what each setting does. Be careful not to erase special characters (dollar or semi-colon).
4 - You can incorporate the net2ftp login form in your existing website. See the example pages example_login_page.php and example_login_page.html. If you use the PHP version, all functionality will be active (cookies are read, login form is adapted according to the settings file). If you use the HTML version, don't forget to edit the form's action property.
5 - A database is only required if you want to log the actions of the users. To create the tables, execute the SQL queries below (also in the "create_tables.sql" file). This can be done easily in PhpMyAdmin, the popular front-end to MySQL.
- Protect the /temp and the /admin directories. If you use the Apache web server, use .htaccess and .htpasswd files to do this -- sample files are provided (username admin, password net2ftp).
.htaccess file: set the path to the .htpasswd file
.htpasswd file: enter a list of usernames and encrypted passwords (the admin panel can be used to generate encrypted passwords)
- In your php.ini file, register_globals can be set to "off" (this is more secure), but the application will off course also work if it is set to "on".
- The files are transmitted using mode FTP_BINARY by default. There is a list of file extensions (txt, php, ...) which are transmitted by FTP_ASCII.
In the FTP server's configuration, set it for UNIX style directory listings rather than MSDOS style listings -- otherwise it will not work with net2ftp.
Make sure that the user running Apache has read/write/erase permissions in the system's temp directory.
If this is not the case, you will be able log in, but the list of directories and files will remain empty -- this is because the ftp_rawlist function will not return anything.
To view the admin panel, go to /net2ftp/admin/index.php.
Use it to view or empty the logs, encrypt passwords for the .htpassword files, or the view the settings of your PHP installation (phpinfo function).