PHP Problem

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

Moderators: Developers, Moderators

Post Reply
jtcheah
Posts: 2
Joined: Tue Nov 29, 2005 12:38 am

PHP Problem

Post by jtcheah »

It's been a while since I touched Linux, I need to get CACTI up and running quick. When I login to the http://localhost/cacti. I get a directory listing, and all the php files will show up as text when I click on them.

I forced PHP-5.1 to use --with-mysql option but doesn't seem to work when I run the php -m command but don't see any instance of mysql.

Could someone help. I'm currently running RHAT 9 on VMWARE.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Better upgrade to 5.1.1 or downgrade to either 4.3.11 or 5.0.4.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
hosierd
Posts: 19
Joined: Wed Jun 09, 2004 10:55 am
Location: Rockville, Maryland

php problem

Post by hosierd »

TheWitness wrote:Better upgrade to 5.1.1 or downgrade to either 4.3.11 or 5.0.4.

TheWitness
Is that the only answer?

I'm having the same problem on a new install. running php -m & -v yields:

PHP 4.3.4 (cli) (built: Dec 10 2005 06:02:58)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
blowfish:/etc # php -m
[PHP Modules]
bcmath
bz2
calendar
ctype
curl
dba
dbase
domxml
exif
filepro
ftp
gd
gettext
gmp
iconv
imap
ldap
mbstring
mcal
mcrypt
mhash
mime_magic
mysql
odbc
openssl
overload
pcre
pgsql
posix
qtdom
readline
session
shmop
snmp
sockets
standard
swf
sysvsem
sysvshm
tokenizer
wddx
xml
xslt
yp
zlib

[Zend Modules]

PHP 4.3.4 (cli) (built: Dec 10 2005 06:02:58)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

So the mysql module is loaded but the index.php script is being run.

Older prototyped box has same version of PHP 4.3.4 running and it works.

Main difference is prototype box is running cacti 0.8.6c as opposed to the 0.8.6h that is on the new production server that only yields dir listings.
hosierd
Posts: 19
Joined: Wed Jun 09, 2004 10:55 am
Location: Rockville, Maryland

php problem solved

Post by hosierd »

Solved the problem.

First tried other suggestion found in forums to add index.php as a defualt doc type in apace. That just led to the doc being downloaded by the browser.

Found the apache2_php4 module was not loaded.

Edit /etc/sysconfig/apache2 file. Under APACHE_MODULES added 'php4'

Restarted apache2 and I'm now able to access th login page.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

You beat me to it... but isn't there a php5 module?
hosierd
Posts: 19
Joined: Wed Jun 09, 2004 10:55 am
Location: Rockville, Maryland

Post by hosierd »

knobdy wrote:You beat me to it... but isn't there a php5 module?
There probably is.

Just thinking that others may have the same issue where Apache2 is not configured to load either the php4 or php5 module.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest