Results 1 to 11 of 11
  1. #1

    How to setup the apache server to allow http downloading?

    I installed apache, mysql, php on my windows vista laptop, and want to test http downloading. This means when selecting a file (for example, contact.php) from a page, and then click download, it will be downloaded to my desktop.

    Do we need to install any other softwares to do that?

  2. #2
    Join Date
    Mar 2003
    Location
    WebHostingTalk
    Posts
    16,966
    Moved > Technical & Security Issues .
    Specially 4 You
    .
    JoneSolutions.Com ( Jones.Solutions ) is on the net 24/7 providing stable and reliable web hosting solutions and services since 2001

  3. #3
    pages ending .php will not be downloaded, they will be processed by php and displayed to the user

    If you really are wanting .php pages to actually download to the user then you need to remove the handler line from httpd.conf (or php.conf depending on your configuration).
    Accelerated Hosting - From Constant Internet
    Automatically serving your website from the nearest server
    Get hosted on our global network! America / Europe / Asia

  4. #4
    Each web hosting company offers a file manager, and in the file manager, you can download any kind of files.

    I developed a tree menu and showing the file lists of the root folder, and now after highlighting a special file or folder, and click download button, I want the file to be downloaded.

    Do we need to change any configurations or install any special softwares?

  5. #5
    if you have php installed and working fine, then contact.php will be processed and displayed on your browser, you will not be able to download it. The easiest way to make php files download is to unload the php module from your apache.
    Windows VPS | Linux Hybrid Server | 99.9% Uptime
    http://www.odishahosting.com ( USA DC)
    http://www.odishahosting.in ( INDIA DC)

  6. #6
    Can anybody help me for this?

    I'm now developing a file manager for my website, and when selecting the php, html files and click the download button, I want these files to be downloaded. Each web hosting provider offers a file manager with this kind of function, I want my own.

    How to do it by php and how to setup the server?

  7. #7
    Join Date
    Mar 2009
    Location
    /usr/bin/perl
    Posts
    971
    Found lots of PHP file managers with one simple google query

    http://www.google.com/search?client=...UTF-8&oe=UTF-8

    Personally I would use ftp or sftp, but hopefully one of these php ones will meet your requirements.

    By the way, if you're shying away from ftp because you want to download from your browser, note that on most browsers these days you can use the ftp protocol like so ftp://yourhost.domain.tld/

  8. #8
    Quote Originally Posted by jarrodsl View Post
    Found lots of PHP file managers with one simple google query

    http://www.google.com/search?client=...UTF-8&oe=UTF-8

    Personally I would use ftp or sftp, but hopefully one of these php ones will meet your requirements.

    By the way, if you're shying away from ftp because you want to download from your browser, note that on most browsers these days you can use the ftp protocol like so ftp://yourhost.domain.tld/
    Sorry, I want to develop my own php file manager, and want to know how to achieve the http download.

  9. #9

  10. #10
    Join Date
    Nov 2003
    Location
    Marylebone, London, UK
    Posts
    526
    typically a 'file manager' would let you edit a file by loading
    the contents into a 'textarea' box in a form. this is relatively
    trivial. you could then save this to local disk perhaps.
    there's lots of free php control panels, some may have
    'file managers' so you could get them and read the source code.

    examples are: syscp, webcp, baifox, ISPConfig, dtc, ispcp
    and probably some more too. use google to find them.

  11. #11
    Join Date
    Nov 2009
    Location
    Ottawa, ON
    Posts
    12
    I would suggest using a single download script (e.g. download.php) and passing the path to download using either a query string parameter or extra path info. Then use readfile() to return the data to the user.

    You will need to make sure you have proper access control checking and that you set the HTTP headers appropriately. There are several headers you need to pay attention to, including Content-Type, Content-Disposition, and Last-Modified.

Similar Threads

  1. Apache Down with 503 Error / Http requests get redirected / Is server hacked?
    By hostchamp in forum Hosting Security and Technology
    Replies: 3
    Last Post: 06-05-2009, 06:07 AM
  2. Free torrent downloading (to http)
    By IPv6 in forum Web Hosting Lounge
    Replies: 2
    Last Post: 04-06-2008, 03:43 PM
  3. Downloading from an http address in SSH
    By 6dhosting.com in forum Dedicated Server
    Replies: 11
    Last Post: 06-10-2004, 07:00 AM
  4. Need help downloading Apache Web server
    By PurePurple in forum Running a Web Hosting Business
    Replies: 6
    Last Post: 09-11-2003, 10:01 PM
  5. Help - Apache Tomcat/4.03 HTTP Status 500 - Internal Server Error
    By sweet9 in forum Hosting Security and Technology
    Replies: 0
    Last Post: 08-27-2003, 02:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •