Configuration issues with PHP and Apache

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
sachin007_bond
Forum Newbie
Posts: 1
Joined: Wed Nov 05, 2003 3:19 pm

Configuration issues with PHP and Apache

Post by sachin007_bond »

I am having some problems configuring Apache(v1.3.28) and PHP(v4.3.4). I am trying to do this on WIN XP. The following are entries I added in the 'httpd.conf' file in Apache:

ScriptAlias /php4/ "C:/php4/"

AddType application/x-httpd-php .phtml .php
AddType application/x-httpd-php-source .phps

Action application/x-httpd-php /php4/php.exe


I have also renamed 'php.ini-dist' to 'php.ini' and moved it across to C:\Windows. Also, 'msvcrt.dll' and 'php4ts.dll' have been moved to 'C:\WINDOWS\SYSTEM''.

After this I tried creating a new php file called 'phpinfo.php' in the htdocs directory of Apache, with the following code:

<? phpinfo() ?>

Now that I try and open this page in Internet Explorer, it says 'Page cannot be found'. Is this a known issue with PHP because Apache's home page works fine. Its only the php files that fail to open.

Can anyone help.

Thanks.
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

I use the module.

Code: Select all

LoadModule php4_module "C:/PHP/sapi/php4apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
...instead of scriptalias (CGI version).
If you for some reason do not want to use the module, try adding
double quotes around /php/php.exe.

LoadModule is however recommended.
Post Reply