HomePHP Page 2 - Setting Up a Web-Based File Manager: bfExplorer
Installing bfExplorer - PHP
Everybody knows how to use a conventional desktop application that acts as a file manager. And we all know how useful these manipulation utilities really are. They give us a hierarchical view of the content of our folders. They also have dozens of extra functions. In this series, we’re going to see how we can do this on a web server. We will present two freeware PHP-based file managers. You’ll find out how to install and configure them.
As always, first things first: download the latest release of bfExplorer from here. Extract the archive to a specific folder on your local machine. I strongly suggest reading the "install.txt" document because it explains the whole installation process.
Create a new SQL database on your server. BfExplorer works with both MySQL and PostgreSQL. The database should be empty, but it's not necessary because new tables can be created. You can create a new database by logging into your cPanel admin panel and choosing "MySQL® Databases" or its PostgreSQL alternative. Then, you create a new database; for example, we'll create "hostname_users".
It's really important to point out that in general, paid hosting web spaces are on shared servers. This means that you don't have your own dedicated server reserved just for your needs - more than one customer is sharing the same server. Because of this, for example, MySQL database names always start out with the name of your hostname as a prefix. Let's say your hostname is "iamconfident." When you create a new database with the name "users," it's going to be named "iamconfident_users."
Keep in mind that we'll need the username and password of the user that has administrator access to the database. This, more often than not, is the same as your cPanel login information. If you're struggling to find out your account details in order to log into your MySQL database, then contact tech support and ask for help. If you are running your own web server, then it's appropriate to assume that you are aware of this.
Now we're practically prepared for the installation process. Host the contents of the uncompressed archive to a particular folder on your web server. Let's use the following: "/public_html/bfExplorer". Now you can access it later by typing in the URL, "hostname.com/bfExplorer". You can upload the files "conventionally" with FTP clients.
There's one more thing prior to installation. The install script requires write access to the following files: "/libs/settings.lib.php" and "/files/config.php". And, of course, read access to the rest of the files. Due to the write requirements, you need to change the permissions of these two files. You do this by "chmod"-ing them to "777". FTP clients can do this by right clicking on the file, picking File Attributes, and ticking everything in.
To jump start the installation process, just visit the aforementioned link; redirect your browser to the folder where you've uploaded the files. The installation process starts right away. Pick your language, click Next, choose your database server (MySQL), type in the server name (on paid hosts this should be localhost), and set the username and password of the admin that has access to the database server.
The name of the database is the one we just created earlier, "hostname_users." The prefix of the table is already pre-set to "bfe_", so leave it that way. It's not going to overwrite any of the previous tables (if the database isn't empty), and you can use the database later on for other applications that require a database because there won't be any conflicts. This is the beauty of prefixes. Tick the box "create tables." You need them!
Go to the next step and type in your directory to mount. This should be auto-detected, but do a second check. On paid hosts that use a shared server, this should be something along the lines of "/home/hostname/public_html". Move on to the next step. Recheck your settings and click on Install. Now you can see the progress of the install. At the end, pay attention to whether there are any "Failed" steps instead of "Done."
As you can see from the above screen shot, it has passed everything (status is a green "Done" for each specific step). In case of failure, which you shouldn't get, it's written in a red "Failed" message. Now comes a part that you cannot neglect! You absolutely need to rename (I don't advocate deleting) the install folder to something like "install_backup," because otherwise the installation process always wants to start.
After redirecting your browser to www.hostname.com/bfExplorer, you should get the following little PHP-generated login window on the center of an HTML page. Please be aware that the username and password are both "admin" at first. Don't forget to change this password as soon as you have logged in!
Fortunately, you should log in without problems. Next, you will be welcomed by a simple, yet powerful MS Windows Explorer-like designfile manager. BfExplorer supports viewing and editing files, and GeSHi to highlight the source code of known languages; thanks to FCKEditor, it also sports a WYSIWYG-based HTML editor. It is able to provide compression and shell functionality. In short, it's extremely useful!
In the next section, we'll see how to configure bfExplorer.