No announcement yet.

http://server.domain/oreon/ shows only code

  • Filter
  • Time
  • Show
Clear All
new posts

  • http://server.domain/oreon/ shows only code

    Hi guys

    I'm on the verge of a mental breakdown trying to get this to work, I remember a long time ago I got it working on Solaris no problem but unfortunately I no longer have the server.

    Anyway, everything has gone fine right up to the point where I am to navigate to the web page to finish the setup:

    When I goto this page all I get is the actual code on the screen for the php file, i.e:


    <? /** Oreon is developped with GPL Licence 2.0 : Developped by : Julien Mathis - Romain Le Merlus - Christophe Coraboeuf The Software is provided to you AS IS and WITH ALL FAULTS. OREON makes no representation and gives no warranty whatsoever, whether express or implied, and without limitation, with regard to the quality, safety, contents, performance, merchantability, non-infringement or suitability for any particular or intended purpose of the Software found on the OREON web site. In no event will OREON be liable for any direct, indirect, punitive, special, incidental or consequential damages however they may arise and even if OREON has been previously advised of the possibility of such damages. For information : [email protected] */ // configuration include_once ("../class/Session.class.php"); include_once ("DB-Func.php"); Session:tart(); ini_set("track_errors",true); if (file_exists("installoreon.conf.php")) { include_once ("installoreon.conf.php"); } // Pear Modules Management if (file_exists("pear_module.conf.php")) { include_once ("pear_module.conf.php"); } $DEBUG = 0; $msg = NULL; $return_false = NULL; $pear_path = $conf_installoreon['pear_dir']; if (isset($_POST["step"]) && $_POST["step"] == 4 && isset($_POST["Recheck"])) $_POST["step"] = 3; if (isset($_POST["step"]) && $_POST["step"] == 5 && isset($_POST["Recheck"])) $_POST["step"] = 4; if (isset($_POST["step"]) && $_POST["step"] == 7 && isset($_POST["Recheck"])) $_POST["step"] = 6; if (isset($_POST["step"]) && $_POST["step"] == 10 && isset($_POST["Recheck"])) $_POST["step"] = 9; /* if (isset($_POST["install_missing_pear_module"]) && isset($_POST["pear_module"]) && $_POST["step"] == 5) { / $_POST["step"] = 4; exec('sudo pear install '. $pear_module["$package_file"]); }*/ if (isset($_POST["goto"]) && !strcmp($_POST["goto"], "Back")) $_POST["step"] -= 2; if (isset($_POST["step"]) && $_POST["step"] == 6 && isset($_POST["pwdOreonDB"]) && strcmp($_POST["pwdOreonDB"], $_POST["pwdOreonDB2"])){ $_POST["step"] = 5; $passwd_error = "Password not confirmed correctly."; } if (isset($_POST["step"]) && $_POST["step"] == 7 && isset($_POST["oreonpasswd"]) && strcmp($_POST["oreonpasswd"], $_POST["oreonpasswd2"])){ $_POST["step"] = 6; $passwd_error = "Password not confirmed correctly."; } if (!isset($_POST["step"])) include("./steps/step1.php"); else if (isset($_POST["step"]) && $_POST["step"] == 1) include("./steps/step2.php"); else if (isset($_POST["step"]) && $_POST["step"] == 2) include("./steps/step3.php"); else if (isset($_POST["step"]) && $_POST["step"] == 3) include("./steps/step4.php"); else if (isset($_POST["step"]) && $_POST["step"] == 4) include("./steps/step5.php"); else if (isset($_POST["step"]) && $_POST["step"] == 5) include("./steps/step6.php"); else if (isset($_POST["step"]) && $_POST["step"] == 6) include("./steps/step7.php"); else if (isset($_POST["step"]) && $_POST["step"] == 7) include("./steps/step8.php"); else if (isset($_POST["step"]) && $_POST["step"] == 8) include("./steps/step9.php"); else if (isset($_POST["step"]) && $_POST["step"] == 9) include("./steps/step10.php"); else if (isset($_POST["step"]) && $_POST["step"] == 10) include("./steps/step11.php"); else if (isset($_POST["step"]) && $_POST["step"] == 11) include("./steps/step12.php"); else if (isset($_POST["step"]) && $_POST["step"] == 12) include("./steps/step13.php"); ini_set("track_errors",false); exit(); ?>


    Now I'm pretty sure this is a php 4 thing, so to show you what I used to compile php:

    bash-2.05# ./configure --with-libiconv-prefix=/usr/local --with-png=/usr/local --with-freetype=/usr/local --with-fontconfig=/usr/local --with-jpeg=/usr/local --with-xpm=/usr/local --with-includedir=/usr/local/include --prefix=/usr/local/apache2 --enable-gd-native-ttf

    There were no issues here.

    In my httpd.conf:

    # LoadModule foo_module modules/
    #LoadModule php5_module modules/
    LoadModule php4_module modules/
    #AddModule mod_php5.c

    <IfModule dir_module>
    DirectoryIndex index.html index.php index.php4 index.php3 index.cgi index.htm

    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-java-jnlp-file .jnlp
    AddType application/x-httpd-php .php .php3 .php4 .phtml
    AddType application/x-httpd-php-source .phps

    #AddHandler cgi-script .cgi
    AddHandler php-script .php4
    Action php-script /cgi-bin/php4
    AddType text/html php

    AddType application/x-java-jnlp-file .jnlp
    Alias /oreon/ /usr/local/oreon/www/
    <Directory "/usr/local/oreon/www">
    Options None
    AllowOverride AuthConfig Options
    Order allow,deny
    Allow from all

    Can someone tell me whats going on?

    You would save me from a very torturous day!


  • #2
    Has no-one got any ideas?

    I'm sure it must be a simple solution but I cant think of what at the moment.

    Any help is appreciated, thanks


    • #3
      It's look strange :?
      AddType text/html php
      StatusMap Module - NDO Tools Module - ImportCSV Module - SNMP-UI Module - PDFReports Module
      Dons Paypal


      • #4
        Originally posted by wistof
        It's look strange :?
        AddType text/html php
        lol, yes - not sure where that came from or how I missed it, but removing it fixed the issue.

        Thank you wistof

        All is working well now, I followed your setup guide and was able to upload all of my Nagios config files.

        The only issues I'm having now is trying to get perfparse to work on Solaris, it was easy on CentOS!

        Thanks again for your help wistof, it is appreciated