Click to See Complete Forum and Search --> : running php documents
aztek
02-03-2001, 07:34 PM
I have just installed php 4 and apache 1.3 on my windows 98 box. I am pretty sure I have made all the proper modifications to php.ini and httpd.conf. When i try to access a php document, for example http://localhost/test.php, it attempts to download the file. What should I do.
-aztek
aztek
02-03-2001, 07:48 PM
I reinstalled apache and now when try to run a php document it displays the page as a blank one. I can't even get a hello world to run.
-aztek
aztek
02-03-2001, 07:52 PM
It is attempting to download pages again. I give up!
I had the same problem and this is what I did to fix it... right or wrong, it worked.
Check your httpd.conf file to see if apache is seeing these lines:
#location of your .exe, note: "/"
Action application/x-httpd-php /php/php.exe
#Add your extensions
AddType application/x-httpd-php .php .php3 .php4
AddType application/x-httpd-php-source .phps
#depending on what you plan to use:
DirectoryIndex index.html index.htm index.php index.cgi index.php3 index.php4
solution=
-----------
insert this line at apache/conf/httpd.conf:
------------------------------------------
ScriptAlias /php/ "c:/php/"
Action application/x-httpd-php "/php/php.exe
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .phtml
------------------------------------------
DirectoryIndex index.html index.htm index.php index.cgi index.php3
I actually have all that in one place or another in the .conf file with one exception being this:
AddType application/x-httpd-php .php .php3 .php4
I guess I have never seen anything to clarify whether they need to be on separate lines or if they can be on one line.
This seems to work ok.
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.