Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache 2.0 and PHP 5.0 on Windows

Status
Not open for further replies.

gwinn7

Programmer
Feb 10, 2001
1,004
US
After installing and accepting the defaults for Apache 2.0 and PHP 5.0 on my Windows 2000 Server, PHP does not seem to function at all. I followed the instructions in the readme for configuring Apache 2.0 with PHP, but I get a blank page when I run the phpinfo() function. I think the install I have only includes the CGI exe for PHP, which I thought I configured the httpd.conf file correctly.

<? phpinfo(); ?>

I am not sure what is wrong as I have read materials on this. Could someone provide assistance or some sort of checklist to run through?

Gary
gwinn7
A+,L+,N+,I+
 
You say "I followed the instructions...", but what *exactly* did you do?

I usually download the .ZIP file on php.net.

 
Well, I guess its too much to ask for the Win32 MSI installer to actually... Oh I don't know....maybe ... WORK! Why did they even post it if it doesn't work?! Argh!

Life goes on...

So, late last night I downloaded the .ZIP and did the manual installation instructions. Apache now recognizes the PHP install, but still the same problem occurs. I was up late chatting with 'rycamor' about the problem, but at this point, I am stumped.

Again, once I click the link to the PHP page, the script displays instead of the result of the script.

Ideas?

Gary
gwinn7
A+,L+,I+,N+
 
Oh, btw, the script I used was actually...

<?php

phpinfo();

?>

Gary
gwinn7
 
gwinn7,

1) the .msi file on PHP site is well suited for installation in a IIS server environment rather than Apache, so there's definitively a reason for its existence.

2) if you get back from Apache the script itself as text instead of its execution, most probably Apache does't know how to treat .php files, so something is still wrong with your setup. Maybe what is missing is simply an Apache restart (Start->Apache HTTP Server 2.0.xx->Control Apache server->Restart). Look that the arrow in the icon near the clock is green (not red).

HTH
 
OK, my sincere thanks you both! Those instructions on the "devsite.net" were terrific and I did use them.

However, it does appear that I did correctly install of PHP, when I did it manually the first time.

BUT, it seems the problem was something a little more trivial, and of course, embarrassment engulfs me, but here is what went wrong...

I forgot that the link I used bypasses the PHP processing engine and treats it as text. I will explain...

<a href='C:/Program Files/Apache Group/Apache2/htdocs/phpinfo.php'>PHP Information</a>

You guys probably already knew this as a DUH, but if one references the file with the preceding "C:/", Apache will treat it as you are opening the file as text. However if...

<a href='yourock.php'>PHP Information</a>

This link will work. Or even...

<a href=' information</a>

So, pardon the obvious, but if a person, like myself, has this trouble, they can hopefully, find this thread, and avoid wasted time.

Thanks so much for coming to my aid. I hope to return the favor someday, if I can.

Gary
gwinn7
A+,L+,N+,I+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top