Re: Problem: direct download of php pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Windows XP
> 
> Apache 2.2.11
> PHP 5.2 (CGI version).
> 
> When I navigate to a page on the server, it gives me a direct download 
> dialog box.  But when I take that page and parse it directly through the 
> php-cgi program, it comes out fine.


Probably a configuration problem with your server.

If you are using a module:
Make sure Apache is told to process php pages with the proper module, as
per the set up instructions.
You should be looking for something like this:

LoadModule php5_module C:/PHP/php5apache2_2.dll
PHPIniDir C:/PHP/

AddType application/x-httpd-php .php


If you are using the (F)CGI sapi:
Same deal. Look for something like:

ScriptAlias /php/ "C:/PHP/"
AddType application/x-httpd-php .php

Action application/x-httpd-php "/php/php-cgi.exe"


Obvious you will need to change your paths appropriately for your
configuration.

Otherwise Apache will do what it's supposed to do with files it does not
know about, pass them over to the browser for it to decide.  Usually
they get displayed, but some browsers may be set up to download/save
them instead.

You may also find some helpful info in Apache's logs.


--
Niel Archer
niel.archer (at) blueyonder.co.uk



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux