LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-12-2009, 01:39 AM   #16
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51

I am trying to install latest PHP but am not finding teh right way to perform the same.
 
Old 01-12-2009, 01:43 AM   #17
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Could you please post the modified php.conf?
Do you have any error in error_log?
 
Old 01-12-2009, 01:54 AM   #18
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
the php.conf file :
Code:
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php4_module modules/libphp4.so
AddHandler php4-script .php
AddType text/html .php

#
# Cause the PHP interpreter to handle files with a .php extension.
#
# AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
~
~
~
Code:
[root@bl ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not determine the server's fully qualified domain name, using 10.14.236.97 for ServerName
                                                           [  OK  ]
[root@bl ~]# vi /etc/httpd/conf.d/php.conf
the error_log file:
Code:
[root@bl06dl380g5 logs]# tail -f error_log
[Mon Oct 20 16:47:49 2008] [notice] caught SIGTERM, shutting down
[Mon Oct 20 16:47:49 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Oct 20 16:47:49 2008] [notice] Digest: generating secret for digest authentication ...
[Mon Oct 20 16:47:49 2008] [notice] Digest: done
[Mon Oct 20 16:47:49 2008] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Mon Oct 20 16:47:49 2008] [notice] LDAP: SSL support unavailable
PHP Warning:  Unknown(): Unable to load dynamic library '/etc/php.d/msql.so' - /etc/php.d/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/etc/php.d/snmp.so' - /etc/php.d/snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/etc/php.d/ldap.so' - /etc/php.d/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/etc/php.d/mysql.so' - /etc/php.d/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/etc/php.d/snmp.so' - /etc/php.d/snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0
[Mon Oct 20 16:47:49 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Mon Oct 20 16:47:49 2008] [notice] Apache/2.0.52 (Red Hat) configured -- resuming normal operations
The Above log is when I restart the apache
 
Old 01-12-2009, 03:29 AM   #19
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
You forgot to uncomment the 2 AddType...
Uncomment them like this please:
Code:
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php4_module modules/libphp4.so
AddHandler php4-script .php
AddType text/html .php

#
# Cause the PHP interpreter to handle files with a .php extension.
#
#!!!! THERE !!!!
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#!!!! THERE !!!!

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
This should solve your problem.
 
Old 01-12-2009, 03:43 AM   #20
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Tried removing the comments..but ..Same Problem persist...pls Help
 
Old 01-12-2009, 07:42 AM   #21
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Did you restart apache?
 
Old 01-12-2009, 11:03 PM   #22
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Yes..Now I have Installed PHP 5.0 but the same problem persists.
I am totally confused !!!
whats wrong its going on.
I tried putting a PHP Script inside /var/www/html/cacti/test.php
as:
Code:
<?php
echo "hi";
?>
And it opens in browser as "hi"

But why its not displaying anything now for cacti.
Even the logs are not displaying any error.

Can you please help me with the overall steps I am missing.
 
Old 01-13-2009, 01:33 AM   #23
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
So it is not displaying anything? It does not display the php source anymore so?
Is the page just white? Can you post the source of the page from the browser?
Does it say it is downloading something or is it finished?
You need to tell me exactly what is happening.
 
Old 01-13-2009, 01:35 AM   #24
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8"></HEAD>
<BODY></BODY></HTML>
 
Old 01-13-2009, 01:36 AM   #25
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
I really dont know where the php hanging at?
 
Old 01-13-2009, 01:40 AM   #26
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Actually it looks like it is not hanging.
In the source, you see </HTML>
It means that the page has been fully transfered. It is just that cacti transmited an empty page, but it did transmit a page.
What is the address displayed in the address bar?
 
Old 01-13-2009, 01:41 AM   #27
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
http://10.14.236.97/cacti/index.php
 
Old 01-13-2009, 01:45 AM   #28
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
I tried putting free.php editing:
Code:
<?php
echo "hi";
?>
on inside cacti directory to see if it works !!
And it is working:
Code:
http://10.14.236.97/cacti/free.php
displays
Code:
hi
 
Old 01-13-2009, 03:17 AM   #29
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Does index.php still have the same content you posted ealier?
Could you please post include/auth.php?

Last edited by Agrouf; 01-13-2009 at 03:18 AM.
 
Old 01-13-2009, 03:38 AM   #30
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Code:
<?php
/*
 +-------------------------------------------------------------------------+
 | Copyright (C) 2004-2008 The Cacti Group                                 |
 |                                                                         |
 | This program is free software; you can redistribute it and/or           |
 | modify it under the terms of the GNU General Public License             |
 | as published by the Free Software Foundation; either version 2          |
 | of the License, or (at your option) any later version.                  |
 |                                                                         |
 | This program is distributed in the hope that it will be useful,         |
 | but WITHOUT ANY WARRANTY; without even the implied warranty of          |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
 | GNU General Public License for more details.                            |
 +-------------------------------------------------------------------------+
 | Cacti: The Complete RRDTool-based Graphing Solution                     |
 +-------------------------------------------------------------------------+
 | This code is designed, written, and maintained by the Cacti Group. See  |
 | about.php and/or the AUTHORS file for specific developer information.   |
 +-------------------------------------------------------------------------+
 | http://www.cacti.net/                                                   |
 +-------------------------------------------------------------------------+
*/

include("./include/global.php");

/* check to see if this is a new installation */
if (db_fetch_cell("select cacti from version") != $config["cacti_version"]) {
        header ("Location: install/");
        exit;
}

if (read_config_option("auth_method") != 0) {
        /* handle change password dialog */
        if ((isset($_SESSION['sess_change_password'])) && (read_config_option("webbasic_enabled") != "on")) {
                header ("Location: auth_changepassword.php?ref=" . (isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "index.php"));
                exit;
        }

        /* don't even bother with the guest code if we're already logged in */
        if ((isset($guest_account)) && (empty($_SESSION["sess_user_id"]))) {
  $guest_user_id = db_fetch_cell("select id from user_auth where username='" . read_config_option("guest_user") . "' and realm = 0 and enabled = 'on'");

                /* cannot find guest user */
                if (!empty($guest_user_id)) {
                        $_SESSION["sess_user_id"] = $guest_user_id;
                }
        }

        /* if we are a guest user in a non-guest area, wipe credentials */
        if (!empty($_SESSION["sess_user_id"])) {
                if ((!isset($guest_account)) && (db_fetch_cell("select id from user_auth where username='" . read_config_option("guest_user") . "'") == $_SESSION["sess_user_id"])) {
                        kill_session_var("sess_user_id");
                }
        }

        if (empty($_SESSION["sess_user_id"])) {
                include("./auth_login.php");
                exit;
        }elseif (!empty($_SESSION["sess_user_id"])) {
                $realm_id = 0;

                if (isset($user_auth_realm_filenames{basename($_SERVER["PHP_SELF"])})) {
                        $realm_id = $user_auth_realm_filenames{basename($_SERVER["PHP_SELF"])};
                }

                if ((!db_fetch_assoc("select
                        user_auth_realm.realm_id
                        from
                        user_auth_realm
                        where user_auth_realm.user_id='" . $_SESSION["sess_user_id"] . "'
                        and user_auth_realm.realm_id='$realm_id'")) || (empty($realm_id))) {

                        ?>
                        <html>

<head>
                                <title>Cacti</title>
                                <link href="include/main.css" rel="stylesheet">
                        </style>
                        </head>

                        <br><br>

                        <table width="450" align='center'>
                                <tr>
                                        <td colspan='2'><img src='images/auth_deny.gif' border='0' alt='Access Denied'></td>
                                </tr>
                                <tr height='10'><td></td></tr>
                                <tr>
                                        <td class='textArea' colspan='2'>You are not permitted to access this section of Cacti. If you feel that you
                                        need access to this particular section, please contact the Cacti administrator.</td>
                                </tr>
                                <tr>
                                        <td class='textArea' colspan='2' align='center'>( <a href='' onclick='javascript: history.back();'>Return</a> | <a href='index.php'>Login</a> )</td>
                                </tr>
                        </table>

                        </body>
                        </html>
                        <?php
                        exit;
                }
        }
}

?>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cacti installation on Debian Sarge: create cacti database error Yahweee Debian 2 08-26-2008 07:35 AM
Cacti rachadsrour Linux - Software 2 08-28-2007 09:20 AM
cacti agents Lhlalyam Linux - Server 23 07-25-2007 04:05 PM
Cacti problem #2 Braynid Linux - Newbie 2 10-05-2006 11:32 AM
Another cacti problem Braynid Linux - Newbie 8 10-05-2006 07:35 AM


All times are GMT -5. The time now is 04:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration