Re: Problem With Apache / PHP Installation

From: Date: Mon, 08 Dec 2003 17:23:18 +0000
Subject: Re: Problem With Apache / PHP Installation
References: 1 2 3  Groups: php.general php.general 
Request: Send a blank email to php-general+get-172157@lists.php.net to get a copy of this message
Shaun schrieb:
"Ajai Khattri" <ajai@bway.net> wrote in message news:20031206203540.GA2749@bway.net...
On Sat, Dec 06, 2003 at 07:46:07PM -0000, Shaun wrote:
I have installed PHP and Apache but when i try to view a PHP file i.e. http://127.0.0.1/hello.php i get a dialog box asking me if i want to
open or
save the file? Any ideas why this is happening?
Assuming, your Apache is configured to load the php module: Your Apache is not configured to handle .php files. You need to add directives in httpd.conf for PHP files. See PHP installation docs. -- Aj. Sys. Admin / Developer
Thanks for your reply, I have added the following lines to the beginning of httpd.conf LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php But am still unable to view php files... Any ideas? hi,
did you install apache 1.x or 2.x? does http://127.0.0.1 or http://localhost show your apache-startpage? did you stop and restart apache after changing httpd.conf? did you copy php4ts.dll to one of the dirs as said in the manual? just some thoughts from me. every time i install a new envionment i make a file to '/htdocs'-dir called 'phpinfo.php' with the following: <?php
    phpinfo();
?> i call this file for testing: 'http://localhost/phpinfo.php'. this file will also be vey useful when developing new scripts. hth SVEN

« previous php.general (#172157) next »