Re: [PHP] new install php not working. Please help.

From: Chris Shiflett (shiflett_at_php.net)
Date: 10/30/03


Date: Thu, 30 Oct 2003 11:27:56 -0800 (PST)
To: Patrick Fowler <pfowler@wynit.com>, php-general@lists.php.net


--- Patrick Fowler <pfowler@wynit.com> wrote:
> When I try access the index.php via the web the file it tries to
> download.

Try adding this to your httpd.conf:

AddType application/x-httpd-php .php

Hope that helps.

Chris

=====
My Blog
     http://shiflett.org/
HTTP Developer's Handbook
     http://httphandbook.org/
RAMP Training Courses
     http://www.nyphp.org/ramp



Relevant Pages

  • apache2 and php4: apache does not execute php script
    ... as source code (download "save as" appears in browser). ... AddType application/x-httpd-php .php ...
    (Debian-User)
  • Re: HELP: strange php behavior downloading html
    ... problem in less than an hour, using cURL with PHP. ... Here is the function I wrote to download a uri into a file (following ... all redirects, ignoring old cookies, and passing set cookies to redirects): ...
    (comp.lang.php)
  • Re: [PHP] Pirate PHP books online?
    ... > nothing to do with PHP. ... > I claim copyright and payment for the books I write about it. ... > it's unreasonable to expect readers to pay for it. ... could offer a download for a price which would be the same as what you ...
    (php.general)
  • Re: download files from a website
    ... Downloading file from web page using PHP, ... // browser must download file from server instead of cache ... // use the Content-Disposition header to supply a recommended filename ... // force the browser to display the save dialog. ...
    (alt.php)
  • Re: Hello: not so much php, more like HTML..?
    ... I want data files to be stored somewhere apache can't get to them directly, for security, but be available for download via a PHP script ... You mean Apache CAN get them, it's just not available with a straight HTTP request. ... Now it seems that if the opened URL is say a GET type form that takes some form of file ID, and is a PHP program itself, all I need to do is a mix of http_send_filetype stuff to push the data down a new browser 'window' ... I want to ensure they get downloaded to disk,and only if the local browser recognizes them, should they get opened by a local app. ...
    (comp.lang.php)