Problems with PHP and cmd.php
Moderators: Developers, Moderators
I kind of doubt the 'cmd.php' script could cause a seg fault, so it is most likely the php binary or the snmp support like you mentioned. When you get the seg fault, does 'cmd.php' automatically quit? If anything, I would try and recompiling your php binary to see if that helps. Also, try NOT compling in SNMP support if you are currently doing that. See if that helps at all.
-Ian
-Ian
supertux: what version of PHP/MySQL/OS are you currently using? The error you are getting almost looks like it was generated by MySQL. Either way like I said before, 'cmd.php' cannot segfault since it is not a compiled program. Therefore it has to either be a spawned process or the PHP binary causing it.
Also, does it segfault right away, or does it update a few data sources first (check the log to be sure)?
Curious to see what you come up with.
-Ian
Also, does it segfault right away, or does it update a few data sources first (check the log to be sure)?
Curious to see what you come up with.
-Ian
Hi,
I'm also having errors when I do php cmd.php. The following is the result.
PHP Warning: Undefined variable: database in /www/htdocs/cacti-0.6.6/include/database.php on line 17
PHP Warning: Undefined variable: do_not_read_config in /www/htdocs/cacti-0.6.6/include/config.php on line 37
PHP Warning: Undefined variable: do_not_read_config in /www/htdocs/cacti-0.6.6/include/config.php on line 37
PHP Warning: Undefined variable: do_not_read_config in /www/htdocs/cacti-0.6.6/include/config.php on line 37
PHP Warning: Undefined variable: database in /www/htdocs/cacti-0.6.6/include/database.php on line 17
What does this mean? Thanks.
I'm also having errors when I do php cmd.php. The following is the result.
PHP Warning: Undefined variable: database in /www/htdocs/cacti-0.6.6/include/database.php on line 17
PHP Warning: Undefined variable: do_not_read_config in /www/htdocs/cacti-0.6.6/include/config.php on line 37
PHP Warning: Undefined variable: do_not_read_config in /www/htdocs/cacti-0.6.6/include/config.php on line 37
PHP Warning: Undefined variable: do_not_read_config in /www/htdocs/cacti-0.6.6/include/config.php on line 37
PHP Warning: Undefined variable: database in /www/htdocs/cacti-0.6.6/include/database.php on line 17
What does this mean? Thanks.
Hi raX,
Those two settings are enabled or turned 'On' in my php.ini file. Any other ideas? Thanks.
sancho
Those two settings are enabled or turned 'On' in my php.ini file. Any other ideas? Thanks.
sancho
On 2002-03-18 10:19, raX wrote:
Undefined variable errors are usually due to not having these settings in your php.ini file:
register_globals = On
register_argc_argv = On
Also, make note that some php binaries use seperate php.ini files from the apache module version of php (debian is one example of this).
-Ian
Hi,
Another thing that I'm getting whenever I add Interfaces using the 'SNMP Interface' setting is this:
Interface Number Description Speed Hardware Address IP Address
0 Invalid object identifier: interfaces.ifTable.ifEntry.ifDescr.INTEGER: Error in packet. Reason: There is no such variable name in this MIB. This name doesn't exist: .ccitt.0 Error in packet. Reason: There is no such variable name in this MIB. This name d 2.3E-05 mbit Invalid object identifier: interfaces.ifTable.ifEn
This is all I get every time I try to add a host and community for a device that I would like to graph.
Thanks.
sancho
Another thing that I'm getting whenever I add Interfaces using the 'SNMP Interface' setting is this:
Interface Number Description Speed Hardware Address IP Address
0 Invalid object identifier: interfaces.ifTable.ifEntry.ifDescr.INTEGER: Error in packet. Reason: There is no such variable name in this MIB. This name doesn't exist: .ccitt.0 Error in packet. Reason: There is no such variable name in this MIB. This name d 2.3E-05 mbit Invalid object identifier: interfaces.ifTable.ifEn
This is all I get every time I try to add a host and community for a device that I would like to graph.
Thanks.
sancho
raX,
What I did is I replaced my php.ini from the provided one and things worked out. This can be weird at times, I guess . Now, I'm having problems with SNMP data. My post is above. Thanks.
sancho
What I did is I replaced my php.ini from the provided one and things worked out. This can be weird at times, I guess . Now, I'm having problems with SNMP data. My post is above. Thanks.
sancho
<font size=-1>[ This Message was edited by: sancho on 2002-03-18 17:00 ]</font>On 2002-03-18 16:32, sancho wrote:
Hi raX,
Those two settings are enabled or turned 'On' in my php.ini file. Any other ideas? Thanks.
sancho
On 2002-03-18 10:19, raX wrote:
Undefined variable errors are usually due to not having these settings in your php.ini file:
register_globals = On
register_argc_argv = On
Also, make note that some php binaries use seperate php.ini files from the apache module version of php (debian is one example of this).
-Ian
It seems as if both of you are using PHP 4.0.6 on SuSE Linux 7.3. I doubt your linux distribution is causing it, but the same version of PHP with the same SuSE version may. I highly recommend that you grab the latest copy of PHP and compile a binary (./configure --with-mysql && make). You can also compile in SNMP support at this stage if you want also.
sancho: Your problem seems to be with net-snmp not being able to locate all of its nessesary MIB's.
I am going to make an interm release tonight or tomorrow to address some of these issues and will fix your problem. I am going to assume that you are using builtin SNMP support since your errors were spit back to the browser. You could probably download and install a new copy of net-snmp, then re-compile PHP to fix this.
Ian
sancho: Your problem seems to be with net-snmp not being able to locate all of its nessesary MIB's.
I am going to make an interm release tonight or tomorrow to address some of these issues and will fix your problem. I am going to assume that you are using builtin SNMP support since your errors were spit back to the browser. You could probably download and install a new copy of net-snmp, then re-compile PHP to fix this.
Ian
raX,
I'm using ucd-snmp. I don't hink I compile snmp in php, but I could be wrong. I'll try na do what you suggested. Thanks.
sancho
I'm using ucd-snmp. I don't hink I compile snmp in php, but I could be wrong. I'll try na do what you suggested. Thanks.
sancho
sancho: Your problem seems to be with net-snmp not being able to locate all of its nessesary MIB's.
I am going to make an interm release tonight or tomorrow to address some of these issues and will fix your problem. I am going to assume that you are using builtin SNMP support since your errors were spit back to the browser. You could probably download and install a new copy of net-snmp, then re-compile PHP to fix this.
Ian
You are right; cacti would be using the ucd-snmp binary from the frontend. I almost forget that I have to yet to update this code to use the snmpget() function in PHP. Regardless, if a re-compile/re-install of ucd-snmp does not help; the next version surely will with numeric OID's instead of relying on ucd's MIB files.
-Ian
-Ian
[quote]
On 2002-03-22 07:52, supertux wrote:
raX,
It´s fixed. Somehow the version of PHP shipped with SuSE 7.3 has a problem with the builtin SNMP functions. I downloaded and installed the latest version (php-4.1.2) from php.net which fixed the problem.
I have now done extensive tests with cacti using SuSE 7.2 and all functions now work on 7.3, so I think SuSE can now also be added to the list of supported OS´s.
Regards
Max
On 2002-03-22 07:52, supertux wrote:
raX,
It´s fixed. Somehow the version of PHP shipped with SuSE 7.3 has a problem with the builtin SNMP functions. I downloaded and installed the latest version (php-4.1.2) from php.net which fixed the problem.
I have now done extensive tests with cacti using SuSE 7.2 and all functions now work on 7.3, so I think SuSE can now also be added to the list of supported OS´s.
Regards
Max
-
- Posts: 1
- Joined: Tue Aug 20, 2002 6:49 am
- Location: Watford
- Contact:
Failed to open byte range locking database
I'm running a brand new (1st time) installation of cacti 0.6.8 on a vanilla redhat-7.2 box fully sync'd to rhn.
When running cmd.php I get the following error (and no graphs)
bash-2.05$ php cmd.php
Failed to open byte range locking database
ERROR: Failed to initialise locking database
X-Powered-By: PHP/4.0.6
Content-type: text/html
Any ideas?
When running cmd.php I get the following error (and no graphs)
bash-2.05$ php cmd.php
Failed to open byte range locking database
ERROR: Failed to initialise locking database
X-Powered-By: PHP/4.0.6
Content-type: text/html
Any ideas?
Who is online
Users browsing this forum: No registered users and 2 guests