PHP
  Home arrow PHP arrow Page 2 - Setting Up a Web-Based File Manager: P...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Developerworks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Setting Up a Web-Based File Manager: PHPfileNavigator2
By: Barzan "Tony" Antal
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2008-04-22

    Table of Contents:
  • Setting Up a Web-Based File Manager: PHPfileNavigator2
  • Installing pfn2
  • Configuring and Using pfn2
  • Final Words

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Route your faxes to your email inbox. Private, secure fax numbers available from CallWave. Choose your fax number.

    Setting Up a Web-Based File Manager: PHPfileNavigator2 - Installing pfn2
    (Page 2 of 4 )

    As always, the first thing to do is visit pfn2’s official site (here). Then we download the latest version (at the time of writing, it is 2.3.3) in the appropriate language. In my case, that is English. You should also check out the documentation written by the author himself (here). That’s right. By now you should have already downloaded pfn2.

    Extract its contents and direct them to a specific folder on your local machine. Upload it to a particular directory on your web server. Let’s say you upload it to “hostname.com/pfn-2.3.3/”. Find the file named “/data/conf/default-example.inc.php” in pfn2’s directory. Rename it “default.inc.php”. This is required to start the installation process. Another thing we need to set is the necessary permissions: read, write, and execution rights.

    The following directories require the aforementioned permissions: “data/servidor/”, “data/conf/”, as well as the file named “data/conf/basicas.inc.php”. If you run your own server, then you “chmod 700,” but you can’t do this with paid hosting, which runs on a shared server system. Instead you should “chmod 777” (full access: rwxrwxrwx) these two directories and that one file. Then you can move on.

    It’s time for us to find out the required server-side information before proceeding. You’ll see that as soon as we start the installation process, the script checks the server requirements. If it can continue, then it’s going to ask you for the necessary user information. So just redirect your browser to the path you’ve extracted -- pfn-2.3.3.

    The script automatically launches at first. We’re going to need the following MySQL connection data: host (generally it is localhost), name (the name of a database; it can be the same one we created during the first part of this series because, due to prefixes, we won’t have conflicts), user (admin rights), password, and the prefix. The username is required to have modification rights to the database.

    A problem can stem from the MySQL username. Some paid hosting services don’t explicitly state this and since you can work with your database from your cPanel administration control panel, “amateur admins” run into a dilemma when this kind of information is asked of them. However, in general, the username and password for the user with full control rights in the database is the same as the cPanel login.

    As far as the prefix goes, leave that field intact on “pfn_” since it won’t cause conflicts. Chances are pretty low (almost none) that your database already has some tables with the prefix “pfn_”. Then comes the Administrator Data part – you need to type in the name of the administrator, its username, password, and e-mail address.

    The e-mail address is required for advanced security features because pfn2 is able to detect unauthorized attempts and other abuses of the system. The system can then inform the administrator by sending him/her the wrong access alerts.

    You also need to set up a main data root. The name for the main root can be anything. The Absolute Path requires the full path to the main root directory, such as “/home/hostname/public_html/files/” (usually with paid hosting on shared servers) or “/var/www/html/files/” (with your own server). Then you set the Web Path, which is the path for web access (“/files”). The host is useful when managing multiple domains because you can associate different roots.

    On phase 1 – Introduction – pick your language and select “fresh install.” Proceed to the second step. Now the script has tested the necessary permissions. If this step is passed, then you can move on to the third one. If one of them failed, then go back and re-set the file attributes for that directory and/or file. Step three checks the server requirements, such as PHP, MySQL, GD, Zlib, etc.

    It’s worthwhile to mention that by default PHP has 2M on the following variables: “upload_max_filesize” and “post_max_size”. This means that the maximum amount that can be uploaded (via HTML POST) through the PHP server is 2MB. If the server is your own, then changing the values of these variables in “php.ini” isn’t hard at all.

    However, if you are on a paid hosting service on a shared system, then you don’t have access to the “php.ini”. On earlier versions of PHP you could use “.htaccess” directives to change these values, but lately this doesn’t work anymore. Your best bet is to contact the technical support for your hosting company and explain your need to have a higher limit for those two variables.

    A while ago I faced the same situation. I contacted tech support and they were very friendly. We sorted out the problem. They only increased the limit to 16M (that is, 16MB) because this was their policy for shared servers. Nevertheless, 16MB should suffice when hosting via a web-based file manager. When you need to host larger files, you’ll do it via a FTP client anyway, so it’s fine.

    Back to the installation process. The next two steps are pretty straightforward and you can just monitor the progress of the setup. Once it has successfully finished, don’t forget to rename the “instalar” folder, located in pfn2’s directory, to something along the lines of “instalar_backup” or something. If you fail to do this, then the installation process wants to start each time you visit pfn2.

    Now you should fire up your web browser and type in the link for pfn2. It should be something like “hostname.com/pfn-2.3.3”. The login screen should pop up. On the next page, we are going to cover how to configure with some tips and tricks!

    More PHP Articles
    More By Barzan "Tony" Antal


       · Thanks for tuning in and reading the 2nd/final half of this two-part...
     

       

    PHP ARTICLES

    - Setting Up a Web-based Image Hosting Service
    - Comparing Files and Databases with PHP Bench...
    - Setting Up a Web-Based Image Gallery
    - Using Timers to Benchmark PHP Applications
    - Benchmarking Applications with PHP
    - Setting Up a Web-Based File Manager: PHPfile...
    - Developing a Modular Class For a PHP File Up...
    - Setting Up a Web-Based File Manager: bfExplo...
    - Defining a Custom Function for File Uploader...
    - Parsing Child Nodes with the DOM XML extensi...
    - Creating an Error Handling Module for a PHP ...
    - Accessing Attributes and Cloning Nodes with ...
    - Retrieving Information on Selected Files wit...
    - Handling HTML Strings and Files with the DOM...
    - Building File Uploaders with PHP 5

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway