Avatar of Arrismog
Arrismog

asked on 

linux apache doesnt recognize php

Hello experts

I have installed an apache web server on Linux (SuSE 10 SP3), which runs smoothly.

I recently installed (via configure-make-make install) php-5.3.6, no errors were detected.

created a small php file, info.php, which has the following:

<?php
phpinfo();
?>

When accessing via the web server, the output doesn't interpret the php file, just displaying the following:

<?php
phpinfo();
?>

What seems pretty strange is that if I invoke the command
php info.php
from the command line, it executes and interprets the php file correctly.

When restarting apache, it says that PHP is configured

[Tue May 17 19:38:33 2011] [notice] caught SIGTERM, shutting down
[Tue May 17 19:38:35 2011] [notice] Apache/2.2.17 (Unix) PHP/5.3.6 configured -- resuming normal operations

but it seems that it's not executing it correctly :(!!

Do I have to make any additional configuration on the http server? Can't seem to find what's wrong with it
Apache Web ServerLinuxPHP

Avatar of undefined
Last Comment
Arrismog
ASKER CERTIFIED SOLUTION
Avatar of jghelfman40
jghelfman40
Flag of United States of America 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
SOLUTION
Avatar of Kerem ERSOY
Kerem ERSOY

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.
Avatar of jghelfman40
jghelfman40
Flag of United States of America image

Yes, I believe that is what the module syntax I had written above will do. I haven't had to to an AddType (for html) for php to render. This works on all of my php apache systems.
Avatar of Arrismog
Arrismog

ASKER

@jghelfman40 and @KeremE:
Yes! I was missing the AddType in  the httpd.conf, that's why it wasn't recognizing *.php extensions via the web server :)!

Sirs, you made my day
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
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