473,379 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

apache2 php4 - browser showing source ??

I downloaded a GUI for nagios that uses PHP but when I point the
browser at the PHP file, it shows me the source of .php file instead of
executing it,

if i use command line 'php filname.php' then I see exepected result but
why can I not do that via web??

# /usr/local/bin/php -v
PHP 4.4.0 (cli) (built: Jul 21 2005 11:55:49)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

# /usr/local/apache2/bin/httpd -v
Server version: Apache/2.0.53
Server built: Apr 11 2005 15:38:12

# grep php /usr/local/apache2/conf/httpd.conf
LoadModule php4_module modules/libphp4.so
DirectoryIndex index.html index.html.var index.php
AddHandler php4-script php
AddType text/html php
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
<Files ~ "\.(cgi|shtml|phtml|php?)$">

# grep -i scriptalias /usr/local/apache2/conf/httpd.conf
ScriptAlias /nagiosweb /usr/local/apache2/htdocs/nagiosweb/nagiosweb

# ls -l /usr/local/lib/php.ini
-rw-r--r-- 1 root other 39485 Jul 28 12:24
/usr/local/lib/php.ini

# ls -l /usr/local/apache2/modules/libphp4.so
-rwxr-xr-x 1 webusr webusr 11798444 Jul 28 12:18
/usr/local/apache2/modules/libphp4.so*

Jul 28 '05 #1
1 3669
On 28 Jul 2005 10:52:09 -0700, ne******@yahoo.com wrote:
# grep php /usr/local/apache2/conf/httpd.conf
LoadModule php4_module modules/libphp4.so
DirectoryIndex index.html index.html.var index.php
AddHandler php4-script php
AddType text/html php
AddType application/x-httpd-php .php .phtml


You've got three conflicting settings here - is php text/html,
application/x-httpd-php, or handled by php4-script?

The final one is the typical one for PHP an Apache module (the usual and
recommended config). I'd remove the others, although since this is the output
of grep it's out of context so it depends on what else is in that configuration
file.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 28 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Aldo Polli | last post by:
Hi, I have this error when I start apache2 with php4 Syntax error on line 233 of /mypath/apache2/conf/httpd.conf: Cannot load /mypath/apache2/modules/libphp4.so into server: dynamic linker:...
1
by: Chris Haynes | last post by:
Hello all, I am attempting to install Apache 2.0.47 and php4.3.3 on slackware8.1. I am pretty new to linux and this is something of a learning experience and so I was anticipating a few problems...
6
by: Greg Bryant | last post by:
PHP Newbie question: I installed the above, and if I point directly to a ..php file (i.e. http://localhost/phpinfo.php, I get the php script executed properly. If I put a <?php ... ?> tag in...
1
by: FL | last post by:
Hi, I'm tring to *test* php5 beta2 as module with Apache 2.0.48 and win2k (I know, I'm nuts :o) First, there is no php5apache2.dll in the beta2 package but a php4apache2.dll (php.net doc...
5
by: Ad Astra | last post by:
I am completely new to PHP and am finding installation the most difficult part to understand and implement. Could someone please review the rather long missive below and assist me? I have...
4
by: Mxsmanic | last post by:
The require() I'm using in a PHP script has stopped working after I moved from PHP4 and Apache 1.3.x to PHP5 and Apache 2.x. Now I get messages like this: Warning:...
3
by: masterx | last post by:
I developed and maintained a site for someone using Apache 1.3 and PHP 4.0.3 and used to be able to reference a page without explicitly specifying the .php extension. ie....
1
by: nsteele84 | last post by:
Hi I have just set up my apache webserver with PHP4, openssl, modssl, mysql etc. Everything works fine on the non ssl side but when I try to open a php page on the ssl side the browser displays...
1
by: Randell D. | last post by:
Folks, I consider myself well versed with Apache 1.3 and PHP4 - I found drupal and wanted to try it out - I had problems getting it working with Apache2/PHP5/MySQL5 so I downgraded... Note: I...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.