I can't get PHP to respond to <? or <?php commands on this system.
The Windows is stable and on a corp intranet. I thought I'd try an internal webpage with scripting capabilities for distributing support files. I didn't want to go back into that pile of blistering hell known as IIS and ASP [red](shudder)[/red], so I thought I'd give PHP a try.
I obtained the latest Apache for Win32 and installed it. It works as expected by default. My httpd.conf modifications were minimal.
I went to and noted that installing PHP would be a little tricky, what with all the disclaimers. It was especially worrying that both PHP 4 and 5 claimed that working with Apache 2 was "experimental".
At first I tried the latest PHP 5, and in order to avoid the CGI version, I did a manual install by following install.txt from the Win32 zip download. I wanted to load it as an Apache module. I made my php.ini modifications and plopped it into C:\Windows; plopped the minimum 2 DLLs (php4ts.dll and php4apache2.dll) into C:\Windows\System32; then added to Apache's httpd.conf:
[blue][tt]#
# PHP 5 settings
#
LoadModule php5_module c:\windows\system32\php5apache2.dll
AddType application/x-httpd-php .php[/tt][/blue]
The Apache monitor saw PHP as a module, but this code:
[blue][tt]<BR>
<?php phpinfo(); ?>
<BR>
<?php
echo "Hello World";
?>[/tt][/blue]
... generated nothing.
I removed PHP 5 and installed PHP 4 essentially the same from the install.txt instructions, but obtained the same results.
I can run "php.exe -i" and see that it runs fine. [green]But why doesn't Apache run it as a server module?[/green]
The Windows is stable and on a corp intranet. I thought I'd try an internal webpage with scripting capabilities for distributing support files. I didn't want to go back into that pile of blistering hell known as IIS and ASP [red](shudder)[/red], so I thought I'd give PHP a try.
I obtained the latest Apache for Win32 and installed it. It works as expected by default. My httpd.conf modifications were minimal.
I went to and noted that installing PHP would be a little tricky, what with all the disclaimers. It was especially worrying that both PHP 4 and 5 claimed that working with Apache 2 was "experimental".
At first I tried the latest PHP 5, and in order to avoid the CGI version, I did a manual install by following install.txt from the Win32 zip download. I wanted to load it as an Apache module. I made my php.ini modifications and plopped it into C:\Windows; plopped the minimum 2 DLLs (php4ts.dll and php4apache2.dll) into C:\Windows\System32; then added to Apache's httpd.conf:
[blue][tt]#
# PHP 5 settings
#
LoadModule php5_module c:\windows\system32\php5apache2.dll
AddType application/x-httpd-php .php[/tt][/blue]
The Apache monitor saw PHP as a module, but this code:
[blue][tt]<BR>
<?php phpinfo(); ?>
<BR>
<?php
echo "Hello World";
?>[/tt][/blue]
... generated nothing.
I removed PHP 5 and installed PHP 4 essentially the same from the install.txt instructions, but obtained the same results.
I can run "php.exe -i" and see that it runs fine. [green]But why doesn't Apache run it as a server module?[/green]