Avatar of wfaleiro
wfaleiroFlag for India

asked on 

Displaying php pages with Apache

Hi,
I have downloaded the source for Apache 1.3 and php 4.2 and compiled the same. I am trying to display a php page in via the web server. But when I type http://localhost/test.php, it shows the contents of the php file instead of executing the script.
The following entry is present in my httpd.con file
LoadModule php4_module        libexec/libphp4.so

Any help will be appreciated.

--Walter
Apache Web Server

Avatar of undefined
Last Comment
caterham_www
Avatar of caterham_www
caterham_www
Flag of Germany image

> it shows the contents of the php file instead of executing the script.

Did you add

AddHandler application/x-httpd-php .php

too?
Avatar of wfaleiro
wfaleiro
Flag of India image

ASKER

Hi,
I added AddHandler application/x-httpd-php .php and if I type localhost/test.php in my browser the page is displayed correctly.

My Document root is /usr/local/apache/htdocs and I have a folder phplicensewatcher under that.

If I type localhost/phplicensewatcher/config.php in my browser it gives me the error requested URL not found.

Do I need to add anything referencing the subdirectory phplicensewatcher in the httpd.conf file?

--W
ASKER CERTIFIED SOLUTION
Avatar of caterham_www
caterham_www
Flag of Germany image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Apache Web Server
Apache Web Server

The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.

21K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo