RE: [PHP] installing php on apache

From: Date: Sun, 08 Jul 2001 16:31:34 +0000
Subject: RE: [PHP] installing php on apache
References: 1  Groups: php.general php.install php.windows 
Request: Send a blank email to php-general+get-56771@lists.php.net to get a copy of this message
The key here is this line: AddType application/x-httpd-php .php What this means, to apache, is that it will only send to the php binary files that end in .php. Two options: first, if you are going to have php in almost all files, you can just add .html to this line after .php. Second, rename any files that have php in them to .php files, and instruct Apache to look for index.php files (I forget where this is... I believe it's towards the bottom of the default httpd.conf file) Another thing that I noticed when I was trying to install php and apache in windows was that it is very easy to put in both sets of descriptions... the one for the module and the one for the binary, so just be sure you didn't do that => Ben -----Original Message----- From: Michael Duxbury [mailto:M.R.Duxbury@btinternet.com] Sent: Sunday, July 08, 2001 5:37 AM To: php-windows@lists.php.net; php-install@lists.php.net; php-general@lists.php.net Subject: [PHP] installing php on apache I am trying in vain to get php running. I have win98 and apache1.3.6 server running. I unzipped the php-4.0.6-Win32 into c:\php I then downloaded php406-installer and I ran that, did a standard install. I was told that the installer hadn't edited my httpd.conf file for apache and i would have to do this with accordance with the php\install.txt file. Which has the following instructions:- If you unzipped the PHP package to C:\PHP\ as desribed above, you need to insert these lines to your Apache conf file to set up the CGI binary: ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php.exe" So this I did, so my httpd.conf file within apache looks like this:- # For example, the PHP3 module (not part of the Apache distribution) # will typically use: # #AddType application/x-httpd-php3 .phtml #AddType application/x-httpd-php3-source .phps ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php Action application/x-httpd-php "c:/php/php.exe" But I shutdown and restart apache and try to run load a .html file in my browser <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> <?php echo "Hello World<p>"; ?> </body> </html> But nothing happens. I have tried to be as verbose as possible in the hope that someone can help me out here. Thankyou. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#56771) next »