Apache Errors before Install

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

Moderators: Developers, Moderators

Post Reply
Beta2k
Posts: 14
Joined: Mon Oct 20, 2008 5:21 am

Apache Errors before Install

Post by Beta2k »

hi!
i am trying to install cacti. i copied the extracted cacti into apache/htdocs. i also created the db+cacti.sql. when i try to access it via: http://servername/cacti/install i get following error:

Code: Select all

Notice: Undefined index: user in /usr/local/groundwork/apache2/htdocs/cacti/lib/auth.php on line 34
i still can make the install-wizard but when i try to finish i get a bunch of error messages like:

Code: Select all

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/groundwork/apache2/htdocs/cacti/lib/auth.php:34) in /usr/local/groundwork/apache2/htdocs/cacti/include/auth.php on line 29
so there obviously is something wrong :(
any suggestions?

EDIT:
apaches error log is saying:

Code: Select all

[Mon Oct 20 13:07:57 2008] [error] [client 217.29.146.13] PHP Notice:  Undefined index:  user in /usr/local/groundwork/apache2/htdocs/cacti/lib/auth.php on line 34
[Mon Oct 20 13:07:57 2008] [error] [client 217.29.146.13] PHP Warning:  Cannot modify header information - headers already sent by (output started at /usr/local/groundwork/apache2/htdocs/cacti/lib/auth.php:34) in /usr/local/groundwork/apache2/htdocs/cacti/include/auth.php on line 29
Christian
Posts: 46
Joined: Thu Feb 14, 2008 4:24 am
Location: Oelde/Gütersloh, NRW, Germany

0.8.7b fresh install broken

Post by Christian »

Hi,

I just did a fresh install of 0.8.7b and got the following errors, too:

Code: Select all

Notice: Undefined index: user in /var/www/cacti-0.8.7bo/lib/auth.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti-0.8.7bo/lib/auth.php:34) in /var/www/cacti-0.8.7bo/include/auth.php on line 29
cacti: 0.8.7g
spine: 0.8.7g
plugins:
specs: 2xIntel Xeon @ 2.40GHz | 6GiB RAM | CentOS 5.5 | PHP 5.1.6 | MySQL 5.0.77 | RRDTool 1.4.4 | Apache/2.2.3
mcbeath
Posts: 1
Joined: Mon Oct 20, 2008 12:19 pm

Post by mcbeath »

I have the same problem.

If one of us , can intall this version of cacti please report in this treath

Excuse my bad English :D
Beta2k
Posts: 14
Joined: Mon Oct 20, 2008 5:21 am

Post by Beta2k »

i turned this on in my php.ini:

Code: Select all

output_buffering = On
it seems to work for now... at least i could install it. i dont get the error messages.
but at the top of each page i still get:

Code: Select all

Notice: Undefined index: user in /usr/local/groundwork/apache2/htdocs/cacti/lib/auth.php on line 34
any solution?
Christian
Posts: 46
Joined: Thu Feb 14, 2008 4:24 am
Location: Oelde/Gütersloh, NRW, Germany

Post by Christian »

How about you post the version of php, apache, mysql and so on you are using? I'm suspecting some kind of compatibility issue with the version or configuration we're using.
I also have problems running version 0.8.7a: As soon as I install the plugin archtitecture cacti stops working, all paths get messed up.
Yes, I used the correct version of the plugin architecture (1.4) for Cacti version 0.8.7a.
Great to hear by the way that I'm not the only one with this problem.
Last edited by Christian on Tue Oct 21, 2008 2:28 am, edited 1 time in total.
cacti: 0.8.7g
spine: 0.8.7g
plugins:
specs: 2xIntel Xeon @ 2.40GHz | 6GiB RAM | CentOS 5.5 | PHP 5.1.6 | MySQL 5.0.77 | RRDTool 1.4.4 | Apache/2.2.3
Beta2k
Posts: 14
Joined: Mon Oct 20, 2008 5:21 am

Post by Beta2k »

oh that would have been smart from me :)
the odd thing is, that i ran (the same version of) cacti already on exact this machine! i just restored an image before cacti was installed and wanted to retry it.. i have no idea what has changed, because i get this error now..

apache: Server version: Apache/2.2.9 (Unix)
mysql: mysql Ver 14.12 Distrib 5.0.51a, for pc-linux-gnu (i686) using readline 5.0
PHP: PHP 5.2.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 23 2008 23:35:28)
Christian
Posts: 46
Joined: Thu Feb 14, 2008 4:24 am
Location: Oelde/Gütersloh, NRW, Germany

Post by Christian »

Setting

Code: Select all

output_buffering = On
helps a bit, but I don't think that this is the way to go.
PIA destroying my installation was my fault, by the way. Just forgot to adjust $config['url_path'] :lol:

Our versions don't seem to match at all. I could try restarting the machine to reset all services. I don't have any other ideas at the moment.
Last edited by Christian on Tue Oct 21, 2008 2:51 am, edited 1 time in total.
cacti: 0.8.7g
spine: 0.8.7g
plugins:
specs: 2xIntel Xeon @ 2.40GHz | 6GiB RAM | CentOS 5.5 | PHP 5.1.6 | MySQL 5.0.77 | RRDTool 1.4.4 | Apache/2.2.3
Beta2k
Posts: 14
Joined: Mon Oct 20, 2008 5:21 am

Post by Beta2k »

yeah i also thought that this is not the way to go. sadly :(
as i already said: i already installed this very version of cacti on this very machine ... and i changed nothing. just restored a backup before i initially installed cacti. this is what annoys me, because theoretically nothing changed (because i used the image..)


what do you mean with that?
PIA destroying my installation was my fault, by the way. Just forgot to adjust $config['url_path']
Christian
Posts: 46
Joined: Thu Feb 14, 2008 4:24 am
Location: Oelde/Gütersloh, NRW, Germany

Post by Christian »

Beta2k wrote: what do you mean with that?
PIA destroying my installation was my fault, by the way. Just forgot to adjust $config['url_path']
When installing the plugin architecture you've to configure something in global.php. I forgot it :roll:
cacti: 0.8.7g
spine: 0.8.7g
plugins:
specs: 2xIntel Xeon @ 2.40GHz | 6GiB RAM | CentOS 5.5 | PHP 5.1.6 | MySQL 5.0.77 | RRDTool 1.4.4 | Apache/2.2.3
joviber
Posts: 2
Joined: Wed Oct 22, 2008 5:50 am

Post by joviber »

Hi,

I think is a bug of the new version 0.8.7b.

I also get the same answer when I try to acces to cacti for the first time.

Error:

Undefined index: user in /usr/share/cacti/lib/auth.php on line 34

-> $user = $_REQUEST['user'];

That is different from previus version, the are trying to get the user from a GET, POST or cookie.

The code should be something like this:

if(isset( $_REQUEST['user'])) {
$user = $_REQUEST['user'];

Just for trying, changing anything, check this:

http://localhost/cacti/index.php?user=admin

What do you think?
Beta2k
Posts: 14
Joined: Mon Oct 20, 2008 5:21 am

Post by Beta2k »

joviber wrote:Just for trying, changing anything, check this:

http://localhost/cacti/index.php?user=admin

What do you think?
seems like you are right!
how can i change it, so that it works everytime?
joviber
Posts: 2
Joined: Wed Oct 22, 2008 5:50 am

Post by joviber »

I have installed version 0.8.7a with its secure fixes, for me is ok.

In the future I will try with version c.
Christian
Posts: 46
Joined: Thu Feb 14, 2008 4:24 am
Location: Oelde/Gütersloh, NRW, Germany

Post by Christian »

Filling the $user variable with actually something useful is nice, but it's not really necessary.
I'd rather know why we have to turn on ouput buffering in php.ini. Sounds like a messed up code to me if it only runs with this option turned on.
cacti: 0.8.7g
spine: 0.8.7g
plugins:
specs: 2xIntel Xeon @ 2.40GHz | 6GiB RAM | CentOS 5.5 | PHP 5.1.6 | MySQL 5.0.77 | RRDTool 1.4.4 | Apache/2.2.3
Mikf
Posts: 47
Joined: Fri Aug 13, 2004 11:35 am
Location: Paris, France

Post by Mikf »

the version www.cacti.net is not the same that the version from sourceforge.net
on sourceforge.net there is not the "Notice: Undefined index:" problem
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest