No post-install screens in RHEL 6.5 install?

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

Moderators: Developers, Moderators

Post Reply
bbchang
Posts: 3
Joined: Mon Jul 21, 2014 12:04 am

No post-install screens in RHEL 6.5 install?

Post by bbchang »

I'm getting no post-install steps (actually no login page) after going through the steps at http://www.cacti.net/downloads/docs/htm ... _unix.html. What am I missing here? Please read my description of what I've done:

I did a clean install of cacti 0.8.8b, on RHEL 6.5 stock (i.e. what comes on the ISO, no updates). I ran yum to install prerequisites as follows:

Code: Select all

yum -y install httpd php php-mysql mysqld mysql-server net-snmp rrdtool php-cli net-snmp-utils php-pear php-common php-gd php-devel php-mbstring net-snmp-utils php-snmp net-snmp-libs 
and followed the instructions for install at:
http://www.cacti.net/downloads/docs/htm ... _unix.html

with the exception of in /etc/php.ini:

Code: Select all

extension_dir = "/usr/lib64/php/modules"
PHP works:

Code: Select all

[root@localhost conf.d]# php -v
PHP 5.3.3 (cli) (built: Dec  5 2013 07:09:40)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
However, when I go to http://localhost/cacti on the server, I get the generic initial page that I'd get after logging in, i.e. I don't get prompted for a username/password. However, it looks very barebones, and only shows:

Code: Select all

You are now logged into Cacti. You can follow these basic steps to get started.
Create devices for network
Create graphs for your new devices
View your new graphs
And when I click on any of those links, I get HTML pages that show the actual PHP code in the page. In certain sections, it shows buttons, but for the most part, it shows text. It seems to me the browser is interpreting the PHP code as HTML. For instance, /cacti/graphs_new.php yields (only first lines shown):

Code: Select all

0) { $selected_graphs["cg"]{$_POST["cg_g"]}{$_POST["cg_g"]} = true; } }elseif (preg_match('/^sg_(\d+)_([a-f0-9]{32})$/', $var, $matches)) { $selected_graphs["sg"]{$matches[1]}{$_POST{"sgg_" . $matches[1]}}{$matches[2]} = true; } } if (isset($selected_graphs)) { host_new_graphs($_POST["host_id"], $_POST["host_template_id"], $selected_graphs); exit; } header("Location: graphs_new.php?host_id=" . $_POST["host_id"]); } if (isset($_POST["save_component_new_graphs"])) { host_new_graphs_save(); header("Location: graphs_new.php?host_id=" . $_POST["host_id"]); } } /* --------------------- Misc Functions --------------------- */ function draw_edit_form_row($field_array, $field_name, $previous_value) { $field_array["value"] = $previous_value; draw_edit_form( array( "config" => array( "no_form_tag" => true, "force_row_color" => "F5F5F5" ), "fields" => array( $field_name => $field_array ) ) ); } /* ------------------- Data Query Functions ------------------- */ function host_reload_query() { /* ================= input validation ================= */ input_validate_input_number(get_request_var("id")); input_validate_input_number(get_request_var("host_id")); /* ==================================================== */ 
This is my php.conf file that Apache uses:

Code: Select all

[root@localhost conf.d]# cat php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
<IfModule prefork.c>
  LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
  LoadModule php5_module modules/libphp5-zts.so
</IfModule>

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddHandler php-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
[root@localhost conf.d]# pwd
/etc/httpd/conf.d
Any thoughts on why it's not giving the expected output, e.g. the post-install steps, in the browser? I tried this in both Chrome and IE 8.
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: No post-install screens in RHEL 6.5 install?

Post by cigamit »

It mostly seems like PHP is not working properly for you. You may create a test php script

Code: Select all

<?php
phpinfo();
and check it via a web browser to ensure that it is working.
bbchang
Posts: 3
Joined: Mon Jul 21, 2014 12:04 am

Re: No post-install screens in RHEL 6.5 install?

Post by bbchang »

I tried that; it returns a blank page in the browser. However, running it from the command line looks fine. Thoughts?

Code: Select all

[root@localhost cacti]# php /var/www/html/cacti/test.php | head -20
phpinfo()
PHP Version => 5.3.3

System => Linux ga-monarcmsdc01 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64
Build Date => Dec  5 2013 07:09:14
Configure Command =>  './configure'  '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/lib64/mysql/mysql_config' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/usr' '--enable-fastcgi' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-sqlite3=shared,/usr' '--enable-json=shared' '--enable-zip=shared' '--without-readline' '--with-libedit' '--with-pspell=shared' '--enable-phar=shared' '--with-tidy=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr' '--enable-fileinfo=shared' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-enchant=shared,/usr' '--with-recode=shared,/usr'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
Scan this dir for additional .ini files => /etc/php.d
Additional .ini files parsed => /etc/php.d/curl.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/gd.ini,
/etc/php.d/json.ini,
/etc/php.d/mbstring.ini,
/etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/pdo.ini,
/etc/php.d/pdo_mysql.ini,


bbchang
Posts: 3
Joined: Mon Jul 21, 2014 12:04 am

Re: No post-install screens in RHEL 6.5 install?

Post by bbchang »

OK, followed the instructions at http://ubuntuforums.org/showthread.php?t=2173169 and added the lines to /etc/httpd/conf.d/php.ini, restarted httpd and refreshed my browser; works now. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest