473,575 Members | 3,323 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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|p html|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

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

Jul 28 '05 #1
1 3691
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
DirectoryInd ex 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

Andy Hassall / <an**@andyh.co. uk> / <http://www.andyh.co.uk >
<http://www.andyhsoftwa re.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

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: /mypath/apache2/bin/httpd: relocation error: symbol not found: ap_pass_brigade; referenced from: /mypath/apache2/modules/libphp4.so I compile apache...
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 along the way. Now I have pretty much followed the instructions at lamps.efactory.de/e-lamps-2-0.shtml word for word, but when i try to access a...
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 html, nothing happens. No error in any Apache logs, no obvious errors in php, nothing displayed on the page. I installed as cgi, I saw an earlier...
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 mention php5apache2.dll at http://www.php.net/manual/en/install.apache2.php) I usually copy php4apache2.dll and php4ts.dll in the Apache2/modules/
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 provided it in as clear a fashion as possible. COMPONENTS * Windows XP (Home) * Apache2 server (successfully installed; located as
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: main(/includes/ReloadScript.html) : failed to open stream: No such file or directory in /usr/local/www/htdocs/main/AOLCompression.php on line 14 Fatal error: main() : Failed...
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. http://www.url.com/adminpage would open adminpage.php. However since I've upgraded to Apache 2.0.55 and PHP 4.4.1 this no longer works. Is this something that can be...
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 an empty page. I have tried both IE 6 and Firefox. I can display HTML pages, images etc from the SSL side I just cannot display anything with the...
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 did have Apache2/ PHP5 working... I confirmed this via phpinfo output... But now that I removed my original directory containing Apache/PHP, and...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.