Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"An undefined value was used as if it were already defined." #2

Closed
paperscissors opened this issue Mar 3, 2012 · 2 comments · Fixed by #5
Closed

"An undefined value was used as if it were already defined." #2

paperscissors opened this issue Mar 3, 2012 · 2 comments · Fixed by #5

Comments

@paperscissors
Copy link

Just trying this out for the first time on an Amazon Linux (more or less Centos 6) box. Got this output on the first shot:

Apache Buddy v 0.4

Gathering information...
We are checking the service running on port 80
The process listening on port 80 is /usr/sbin/httpd
The process running on port 80 is Apache/2.2.22 (Unix)
Apache has been running 0d 01h 29m 29s
The full path to the Apache config file is: /etc/httpd/conf/httpd.conf
Apache is using prefork model

Examining your Apache configuration...
Apache runs as site.com
Your max clients setting is 150

Analyzing memory use...
Your server has 7473 MB of memory
Use of uninitialized value $proc_mem_usages[0] in division (/) at
./apachebuddy.pl line 318 (#1)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.

To help you figure out what was undefined, perl will try to tell you the
name of the variable (if any) that was undefined. In some cases it cannot
do this, so it also tells you what operation you used the undefined value
in.  Note, however, that perl optimizes your program and the operation
displayed in the warning may not necessarily appear literally in your
program.  For example, "that $foo" is usually optimized into "that "
. $foo, and the warning will refer to the concatenation (.) operator,
even though there is no . in your program.

Use of uninitialized value $proc_mem_usages[0] in division (/) at
./apachebuddy.pl line 324 (#1)
Use of uninitialized value $count in division (/) at ./apachebuddy.pl line 338 (#1)

Illegal division by zero at ./apachebuddy.pl line 338 (#2)
(F) You tried to divide a number by 0. Either something was wrong in
your logic, or you need to put a conditional in to guard against
meaningless input.

Uncaught exception from user code:
Illegal division by zero at ./apachebuddy.pl line 338.
at ./apachebuddy.pl line 338
main::get_memory_usage('/usr/sbin/httpd', 'site.com', 'average') called at ./apachebuddy.pl line 1027

@cristiantx
Copy link

Did you manage to solve this?

@paperscissors
Copy link
Author

I'm noticing it works on some of my linux boxes and not others, so there's some dependency that's not available on some machines, I guess?

gustavmaskowitz pushed a commit that referenced this issue May 18, 2013
Resolution to Issue #2  Thanks! Sorry for the massive delay in getting this done. It's fundamentally unacceptable. Will repay in karma into the universe and hopefully it reaches you sir :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants