Can't access cacti after patching

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

leo
Posts: 3
Joined: Fri Jan 13, 2006 1:00 pm

Can't access cacti after patching

Post by leo »

Hi there,

Just after patching cacti following all the instructions at the website, I ended up not being able to access the system anymore. I just get a blank page at the browser and the following errors appears at the error.log from apache:

PHP Warning: main(/var/www/html/cacti/lib/database.php) [<a href='function.main'>function.main</a>]: failed to open stream: Permission denied in /var/www/html/cacti/include/config.php on line 150
PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening '/var/www/html/cacti/lib/database.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/cacti/include/config.php on line 150
PHP Fatal error: Call to undefined function db_connect_real() in /var/www/html/cacti/include/config.php on line 157

Any ideas?

Leo
mdneal
Posts: 14
Joined: Mon Nov 28, 2005 8:42 am

Post by mdneal »

I just received the same messages after installing the 0.8.6h patches.

I could log on to CACTI before the patches, but not after the patches.

Any ideas?

Mark
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Are you running any addon's we should know about?

What patches did you apply?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
mdneal
Posts: 14
Joined: Mon Nov 28, 2005 8:42 am

Post by mdneal »

I do not have any add-ons.

Hhere are the patch statements.

wget http://www.cacti.net/downloads/patches/ ... ssue.patch
wget http://www.cacti.net/downloads/patches/ ... a_id.patch
wget http://www.cacti.net/downloads/patches/ ... ssue.patch
wget http://www.cacti.net/downloads/patches/ ... rict.patch
patch -p1 -N < fix_search_session_clear_issue.patch
patch -p1 -N < fix_sql_syntax_related_to_default_rra_id.patch
patch -p1 -N < nth_percentile_empty_return_set_issue.patch
patch -p1 -N < mysql_5x_strict.patch
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Two things, make sure that the permissions on the files in the cacti directory allow the web server to access them.

Also, make sure that mysql is running.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
mdneal
Posts: 14
Joined: Mon Nov 28, 2005 8:42 am

Post by mdneal »

The file permissions looked good and MySQL was running.

I attempted to rename my old Cacti 0.8.6g files and I had the same problem.

I finally restored my old Cacti 0.8.6g files from a back up and 0.8.6g is working again.

Mark
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

I fixed this issue by reapplying the permissions to the cacti directory for the IUSR user. I also selected advanced and checked the box next to "Replace permission entries on all child objects with objects shown here that apply to child objects."

Hope this helps.
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Has to be permissions issue. Probably those files that where patched had the permissions of the user that patched them. Then the webserver was unable to read those files.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

This is a problem with the Cygwin "patch" program. It screw's up permissions. The more recent version of "patch" I thought fixed this. So not knowing what version you are running, I can't be 100% certain.

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?
mdneal
Posts: 14
Joined: Mon Nov 28, 2005 8:42 am

Thanks to all

Post by mdneal »

I went back to the CACTI 0.8.6g version to correct the problem.

My CYGWIN version is from rrdtool-cygwin.1.2.9.zip
lsteffek
Posts: 1
Joined: Mon Jan 23, 2006 2:47 pm

Post by lsteffek »

I am having the same problem as described by the other users. I am using Cacti 0.8.6h on Fedora FC4. My installation consists of the default installation files and the patches for this version. I have confirmed that mysql is running. In addition, I do see that the poller is running with out any errors. Does anyone have any suggestions?
tobes
Posts: 8
Joined: Thu Jan 26, 2006 4:48 am

Post by tobes »

I am running on 2003 svr and had the same problem after applying the patches.

Re-applying permissions as mentioned previously did the trick.

T
User avatar
proohu01
Posts: 45
Joined: Mon Dec 20, 2004 3:13 am
Location: The Netherlands

oeps!

Post by proohu01 »

We are having the same problem after we applied all the patches for 0.8.6h.

We are using:
W2K3
Apache 2.0.54.0
PHP 5
MySQL 4.1.14
Cygwin 1005.18.0.0
Catid 0.8.6g

I don't think this has anything to do with permissions on the filesystem.
I did make a backup but I don't want to revert to restoring that yet....

... does anyone know what the problem might be?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

One of the patches provided to 0.8.6h broke some user auth and import functions and it will be re-released. Is this where your problems reside?

When you say "access" what do you mean?

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?
User avatar
proohu01
Posts: 45
Joined: Mon Dec 20, 2004 3:13 am
Location: The Netherlands

Post by proohu01 »

The error I get when trying to access the Cacti page is:

Code: Select all

Warning: main(F:\cacti\lib/database.php) [function.main]: failed to open stream: Permission denied in F:\cacti\include\config.php on line 170

Warning: main() [function.include]: Failed opening 'F:\cacti\lib/database.php' for inclusion (include_path='.;C:\php5\pear') in F:\cacti\include\config.php on line 170

Fatal error: Call to undefined function db_connect_real() in F:\cacti\include\config.php on line 177
B.t.w. I am also using Plugin Architecture v0.9
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests