Aloha Hugo,
My background is C/C++/SQL, but with no prior client-server experience. I have never used PHP before, and I have rarely been on a Unix system. Unfortunately, this makes much of the content of your Howto and Forum obscure to me.
I'm presently running on a Windows PC. My immediate intention is to achieve proper processing of a simple PHP file, foo.php, which I have placed in C:\wwwroot
<html>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
When Firefox is directed to this file, it renders:
Hello World
'; ?>
which (because of the dangling characters) looks like failure to me. Apparently, I have been unsuccessful in getting Hiawatha to process the PHP script.
From my reading of the Install.txt file that comes with PHP, and your Installation.txt for Hiawatha, it appears that CGI or FastCGI is required for Hiawatha to process PHP script. While I will ultimately want the speed of FastCGI, at this point it does not matter to me how I get PHP script interpretation running in Hiawatha. The "faster" (as in "the least hassle") the better right now.
Apparently C:\Program Files\Hiawatha\config\hiawatha.conf is critical for getting Hiawatha to process CGI and hence PHP. My best guess (after many failed attempts) is that some magic combination of deletions of the # symbols at the start of certain lines in hiawatha.conf might do the trick.
The log files yield no clue as to what I'm doing wrong. Here's my hiawatha.conf file:
# Hiawatha httpd.conf
#
Binding {
Port = 80
MaxKeepAlive = 30
TimeForRequest = 3,20
}
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = C:\Program Files\Hiawatha\log\system.log
CGIextension = com,exe
CGIhandler = C:\Program Files\Hiawatha\bin\ssi-cgi.exe:shtml, shtm, stm
#
# Download the PHP zip package from http://www.php.net/downloads.php
# and unzip to C:\Program Files\PHP5\
CGIhandler = C:\Program Files\PHP5\php-cgi.exe:php
# or
#FastCGIserver {
# FastCGIid = PHP5
# Extension = php
# ConnectTo = 127.0.0.1:2005
#}
Hostname = 127.0.0.1
WebsiteRoot = C:\wwwroot
StartFile = index.html
AccessLogfile = C:\Program Files\Hiawatha\log\access.log
ErrorLogfile = C:\Program Files\Hiawatha\log\error.log
ExecuteCGI = yes
#UseFastCGI = PHP5
TimeForCGI = 10
Thanks for reading through this. I know your target audience is folks that already understand all this stuff, so I appreciate any help you can give me to get me started.
Mike
Hiawatha version: 7.4
Operating System: Windows XP SP3