|
Home > Archive > Web Servers on Unix and Linux > June 2004 > Settibng up PHP as a module in Apache
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Settibng up PHP as a module in Apache
|
|
| Freeserve news 2004-05-31, 4:54 pm |
| Hi!
I have set up Apache 1.3.31 on Win2k. I then downloaded php 4.3.6. and
copied the relevant modules (php4apache.dll and php4ts.dll) to "C:\Program
files\PHP\". I moved "php.ini" to "C:\WINNT\". I added the following lines
to Apache's httpd.conf file as instructed by php install file...
LoadModule php4_module "C:/Program Files/PHP/php4apache.dll"
AddModule mod_php4.c
AddType application/x-httpd-php .php
....with similar blocks of text.
When I start Apache in console I get a nice "Apache/1.3.31 <Win32> PHP/4.2.6
running..."
All fine so far. So I save a php test page in htdocs of the Apache
directory, but opening the file in MSIE gives me a blank screen and just the
html and <?php phpinfo(); ?>. Same problem with Mozilla. Pointing either
browser at the file by typing in the URL prompts me to download a file.
Apache appears to be working as the URL http://localhost gives me the Apache
info page. Also, running the php test page through php.exe on the command
line produces the correct html (I understand that the .exe file is not being
used by Apache).
The php documentation tells me that the problem is with the configuration of
the server (Apache), that Apache isn't requesting that php process the file.
I have found similar problems in php and Apache FAQs and documentation but
they all relate to platform- or language-specific problems inapplicable to
me. Also, in this very newsgroup many people have had problems, but these
relate to using Apache 2.* with PHP. Without an error message, it's
difficult to know how to proceed!
If anyone has experienced this problem, please could they point me in the
right direction? A friend says he had a similar problem and that he edited
httpd.conf.
Apache was installed in its default directory (C:\Program Files\Apache
Group\Apache\"). I had previously installed Apache 2.something but, after
downloading php and reading the intall information, I discovered that PHP
has problems with Apache 2 onwards so I uninstalled it and deleted all of
the files it left behind. Could it have left something in my registry?
Thanks in advance for any help you can give me!
~Matt
| |
| johannes m.r. 2004-05-31, 4:54 pm |
| Hello Matt,
Excuse my stupid question - but is the extension of the php test page
you're trying to load .php?
Regards and good success,
johannes
| |
| johannes m.r. 2004-05-31, 4:54 pm |
| Hello Matt,
Excuse my stupid question - but is the extension of the php test page
you're trying to load .php?
Regards and good success,
johannes
PS: You're in the .www.server.unix group though probably
comp.infosystems.www.servers.ms-windows would have been better 
| |
| Freeserve news 2004-06-01, 5:03 pm |
| > Excuse my stupid question - but is the extension of the php test page
".php"
Yep. I wish that was the problem! Thanks for your suggestion though.
(I've tried adding .php3 as a mime type adn calling my test file
"test.php3", but that didn' help.
> PS: You're in the .www.server.unix group though probably
> comp.infosystems.www.servers.ms-windows would have been better 
I can't believe I didn't spot that! [Frantically searching for large hole
to swallow me up!] I followed the advice from Apache.org, and they assume
the use of Unix/Linux. Sorry! I'll try posting there.
Thanks for your input!
Matt
|
|
|
|
|