Re: Problem: direct download of php pages
John Meyer <[email protected]>
| Newsgroups | gmane.comp.php.windows |
|---|---|
| Message-ID | <[email protected]> |
Niel Archer wrote: >> 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. > Of course, it always helps to restart the *insertfavoriteswear* server after you've installed PHP. Thanks for the advice. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php