Browser wants to download cacti page.

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
mikesfx
Posts: 1
Joined: Mon Oct 13, 2008 12:59 pm

Browser wants to download cacti page.

Post by mikesfx »

Hi,

I am very new to Cacti. I am trying to set up Cacti on Ubuntu 6.10 with the following guide: https://help.ubuntu.com/community/Cacti ... CactiHowTo

I have done everything it asks. When I go to the host on my browser (http://ipaddress/cacti), the browser wants to download the page. I realize that this may be an issue with Apache2 not serving PHP, but I've done everything I can to resolve the issue. I've enabled the mods in Apache and installed the commons.

I also looked at the Apache2 logs and there was nothing except for my restarts while making changes and installing the packages.

Is this common? Can someone please help me out?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I've got this under /etc/http/conf.d/php.conf:

Code: Select all

#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
This is loaded by the standard httpd
Reinhard
SuperOmegaSlack
Posts: 16
Joined: Tue Jan 17, 2006 7:22 pm

Post by SuperOmegaSlack »

I just had the same problem... to get apache to render php, make sure it is loading the php module in httpd.conf:

LoadModule php5_module libexec/apache22/libphp5.so

if so, add this line:
# Cause the PHP interpreter to handle files with a .php extension.
AddHandler php5-script .php
AddType text/html .php

Also, make sure you include index.php in the directory index:
<IfModule dir_module>
DirectoryIndex index.html index.php index.xhtml
</IfModule>


To test, create a php in your web directory file and add this code:
<html>
<head>
<title> PHP Test Script </title>
</head>
<body>
<?php
phpinfo( );
?>
</body>
</html>

Load that php file in your browser and you can tell if it works.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests