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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get PHP to work with Apache

Status
Not open for further replies.

theom

Programmer
Feb 22, 2001
28
0
0
NL
Hi,
I am a newbee in this forum, as I just started with PHP.
I have installed Apache at home, for testing purposes only. It works like a dream, but I have problems getting PHP to work.
I downloaded the PHP distribution, and installed it manually, following the instructions in the installation manual. I checked and double checked everything, but any PHP code is not executed at all. When I view the source of the resulting HTML page, I still see the PHP code. Acc. to the installation notes, this is a problem with the server configuration, but I cannot figure out which problem.
I have W98 SE, Apache 1.3.20 and PHP 4.2.0 (installed as a module). Pathsettings are correct, dll's are in the proper directories. When I start Apache, I see the folloing message in the command window:

Apache/1.3.20 (Win32) PHP/4.2.0 running ...

Obviously the module is found by Apache and started correctly. Anybody has an idea why PHP code is not passed to the webserver?

Thanks,
Theom
 
I had similar problems, but they are now resolved. Check my other posts. Look up "gwinn7" under the "handle" category. It should have some helpful information for you.

Gary
gwinn7
 
Thanks, I found it.
Problem lies in the AddType directive:

AddType application/x-httpd-php .php

is the original line as indicated in the installation notes. I have added another extension, and now it works OK:

AddType application/x-httpd-php .php .html

Thanks.


 
*point of interest:

If you publish a web site using PHP and use one of the many web hosts available,(free or low cost) chances are your php code will NOT run unless you give your PHP pages a .php or .php3 extension.
Some hosts will allow you advanced server capabilities but from what I gather these are few and far between.
***************************************
Party on, dudes!
[cannon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top