First I am a newbie to php, apache and mysql - I'm not new to
programming etc. I seriously want to learn this. I'm specifically
chosing this environment in order to have the option to move to linux
later on.
I am learning (teaching my self) to run a combination of php, apache
and mysql (versions are php 4.3.2, apache 2.0.47, mysql 4.0.14) My os
is windows 2000 pro.
I have gone through a systematic installation procedure trying
to elininated various problems and ended with a (mostly) working
installation.
My conclusions so far are
1) that a standard win-installation installs a cgi-version of php.
2) php4 does not work as a module on apache under windows.
3) an array of functions do not work in the cgi-version.
4) The "compiled in" note on some functionality does not mean this
functionality is available by default in the cgi-version of php, how
it is enabled is unclear to me.
I would be very happy if someone could tell me if any of these are
true.
My long and sad story
I have been through lots of news group messages recently, and searched
the php and apache sites. I have seen several question about this, and
a few suggestions, but apparently I'm not capable of reading /
understanding those answers (most answers suggest different compiling
settings which is irrelevant to a window user).
Initially I tried to install php from the zip-binaries (you
copy all files to a suitable location, and edit the php.ini and
httpd.conf yourself) I followed instructions to run php as a module in
apache:
LoadModule php4_module "C:/php/sapi/php4apache2.dll"
Results in the well known error: Cannot load
C:/PHP/sapi/php4apache2.dll into server: The specified module could
not be found.
Of course the path is valid, and I have tried with forward and
backward slahes.
I tried the exact same on the php5beta (I changed folder names
so php5 was in the same location) the only change whatsoever was
(apart from the entire php5 substituted for php4):
LoadModule php5_module "C:/php/sapi/php4apache2.dll"
Now it loaded without error. In stead I got an error on calling
mysql_connect() - Fatal error Call to undefined function
mysql_connect. Ok php5 does not yet support mysql. It shows though
that the loadmudule syntaks in the ini-files apparently is ok and this
can not be the reason for php4 failing to load in apache.
Now I have made a standard installation of all products (from binary
install .exe programs) and put all programs in standard folders etc.
This leads to a situation where everything seems to work. But
now I get errors calling fx apache_request_headers(): Fatal error Call
to undefined function apache_request_headers. The same result with
getallheaders().
Finn<!-- ~MESSAGE_AFTER~ -->