Req #40816 [Fbk->Asn]: Add "snmptranslate" function

2011-08-30 Thread ch at westend dot com
Edit report at https://bugs.php.net/bug.php?id=40816&edit=1

 ID: 40816
 User updated by:    ch at westend dot com
 Reported by:    ch at westend dot com
 Summary:Add "snmptranslate" function
-Status: Feedback
+Status: Assigned
 Type:   Feature/Change Request
 Package:SNMP related
 Operating System:   linux
 PHP Version:5.2.1
 Assigned To:lytboris
 Block user comment: N
 Private report: N

 New Comment:

Now the following works..

  @$snmp->get(array($oid1, $oid2));
  if ($snmp->getErrno() == SNMP::ERRNO_OID_PARSING_ERROR) {
throw new Exception($snmp->getError());
  }

... but why is there only a warning? Calling get() with a OID that does not 
even parses should throw an Exception? Especially as when using OOP, one does 
not expect having to call getErrno() after every call as we did in the last 
millenium or even worse don't catch this error.

Can you wrapt this into a nice SnmpOidParsingException?


Previous Comments:

[2011-08-30 14:30:34] lytbo...@php.net

Indeed. Commited sources into PHP_5_4 branch.

--------
[2011-08-30 09:52:01] ch at westend dot com

As of SVN revision 315762 from now, the constant only appears in the tests, not 
in the class source. Running the tests yield to:

Fatal error: Undefined class constant 'ERRNO_OID_PARSING_ERROR' in 
/home/chammers/workspace/php-src-5.4/ext/snmp/tests/snmp-object-errno-errstr.php
 on line 45

Maybe it's not yet committet?


[2011-08-30 09:42:08] lytbo...@php.net

Please check that you have ERRNO_OID_PARSING_ERROR in snmp extension sources. 
This constant appeared on 27th of august.

----------------
[2011-08-30 09:21:17] ch at westend dot com

The idea sounds good but it does not seem to work. The "Invalid object 
identifier" is thrown only as PHP Warning, not set in SNMP->error:


 $ cat test.php 
 get(array($oid1, $oid2, $oid3));
printf("---\n%s (%d)\n\n", $snmp->getError(), $snmp->errno);




 $ ../php-src-5.4/sapi/cli/php -d include_path=.:/usr/share/php  test.php 
 Warning: SNMP::get(): Invalid object identifier: DOES-NOT-EXIST-MIB::FOO in  
/home/chammers/workspace/php_test/test.php on line 8
 ---
  (0)
 


[2011-08-27 08:54:31] lytbo...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.4-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Please try another approach: all methods that performs remote agent query raise 
$object->errno == SNMP::ERRNO_OID_PARSING_ERROR even before query itself, 
indicating that some of OID (and/or type for set method) was not parsed 
correctly.

Since OO API allows to set multiple OID on single method call this should help.
Mind that OID parsing is made in chunks with length of $object->max_oids.
Thus if you supply array of OIDs that is bigger than $object->max_oids and 
bogus OID will be in the end of array, this error will be raised *after* 
processing (e.g. making query) the first part.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=40816


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=40816&edit=1


Req #40816 [Fbk->Asn]: Add "snmptranslate" function

2011-08-30 Thread ch at westend dot com
Edit report at https://bugs.php.net/bug.php?id=40816&edit=1

 ID: 40816
 User updated by:    ch at westend dot com
 Reported by:    ch at westend dot com
 Summary:Add "snmptranslate" function
-Status: Feedback
+Status: Assigned
 Type:   Feature/Change Request
 Package:SNMP related
 Operating System:   linux
 PHP Version:5.2.1
 Assigned To:lytboris
 Block user comment: N
 Private report: N

 New Comment:

As of SVN revision 315762 from now, the constant only appears in the tests, not 
in the class source. Running the tests yield to:

Fatal error: Undefined class constant 'ERRNO_OID_PARSING_ERROR' in 
/home/chammers/workspace/php-src-5.4/ext/snmp/tests/snmp-object-errno-errstr.php
 on line 45

Maybe it's not yet committet?


Previous Comments:

[2011-08-30 09:42:08] lytbo...@php.net

Please check that you have ERRNO_OID_PARSING_ERROR in snmp extension sources. 
This constant appeared on 27th of august.

--------
[2011-08-30 09:21:17] ch at westend dot com

The idea sounds good but it does not seem to work. The "Invalid object 
identifier" is thrown only as PHP Warning, not set in SNMP->error:


 $ cat test.php 
 get(array($oid1, $oid2, $oid3));
printf("---\n%s (%d)\n\n", $snmp->getError(), $snmp->errno);




 $ ../php-src-5.4/sapi/cli/php -d include_path=.:/usr/share/php  test.php 
 Warning: SNMP::get(): Invalid object identifier: DOES-NOT-EXIST-MIB::FOO in  
/home/chammers/workspace/php_test/test.php on line 8
 ---
  (0)
 


[2011-08-27 08:54:31] lytbo...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.4-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Please try another approach: all methods that performs remote agent query raise 
$object->errno == SNMP::ERRNO_OID_PARSING_ERROR even before query itself, 
indicating that some of OID (and/or type for set method) was not parsed 
correctly.

Since OO API allows to set multiple OID on single method call this should help.
Mind that OID parsing is made in chunks with length of $object->max_oids.
Thus if you supply array of OIDs that is bigger than $object->max_oids and 
bogus OID will be in the end of array, this error will be raised *after* 
processing (e.g. making query) the first part.

--------------------
[2007-03-15 11:05:51] ch at westend dot com

Description:

Hello

Please make a PHP pendant to /usr/bin/snmptranslate. It's handy
to check if all MIBs are installed so that the program does not
crash somewhere after already having set the first X OIDs and then
encountering one untranslatable.

bye,

-christian-

Reproduce code:
---
-

Expected result:

-

Actual result:
--
-






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=40816&edit=1


Req #40816 [Fbk->Asn]: Add "snmptranslate" function

2011-08-30 Thread ch at westend dot com
Edit report at https://bugs.php.net/bug.php?id=40816&edit=1

 ID: 40816
 User updated by:    ch at westend dot com
 Reported by:    ch at westend dot com
 Summary:Add "snmptranslate" function
-Status: Feedback
+Status: Assigned
 Type:   Feature/Change Request
 Package:SNMP related
 Operating System:   linux
 PHP Version:5.2.1
 Assigned To:lytboris
 Block user comment: N
 Private report: N

 New Comment:

The idea sounds good but it does not seem to work. The "Invalid object 
identifier" is thrown only as PHP Warning, not set in SNMP->error:


 $ cat test.php 
 get(array($oid1, $oid2, $oid3));
printf("---\n%s (%d)\n\n", $snmp->getError(), $snmp->errno);




 $ ../php-src-5.4/sapi/cli/php -d include_path=.:/usr/share/php  test.php 
 Warning: SNMP::get(): Invalid object identifier: DOES-NOT-EXIST-MIB::FOO in  
/home/chammers/workspace/php_test/test.php on line 8
 ---
  (0)
 


Previous Comments:

[2011-08-27 08:54:31] lytbo...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.4-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Please try another approach: all methods that performs remote agent query raise 
$object->errno == SNMP::ERRNO_OID_PARSING_ERROR even before query itself, 
indicating that some of OID (and/or type for set method) was not parsed 
correctly.

Since OO API allows to set multiple OID on single method call this should help.
Mind that OID parsing is made in chunks with length of $object->max_oids.
Thus if you supply array of OIDs that is bigger than $object->max_oids and 
bogus OID will be in the end of array, this error will be raised *after* 
processing (e.g. making query) the first part.

--------------------
[2007-03-15 11:05:51] ch at westend dot com

Description:

Hello

Please make a PHP pendant to /usr/bin/snmptranslate. It's handy
to check if all MIBs are installed so that the program does not
crash somewhere after already having set the first X OIDs and then
encountering one untranslatable.

bye,

-christian-

Reproduce code:
---
-

Expected result:

-

Actual result:
--
-






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=40816&edit=1


#43459 [NEW]: Segfault on graceful restart?

2007-11-29 Thread ch at westend dot com
From: ch at westend dot com
Operating system: Debian 4.0 'etch' Linux
PHP version:  5.2.5
PHP Bug Type: Reproducible crash
Bug description:  Segfault on graceful restart?

Description:

I have lots of segfaults in the error.log of a new apache installation
using a Debian shipped Apache2 with prefork mpm and the very latest PHP5.
Below is the backtrace.

Reproduce code:
---
I guess it comes sometimes from graceful restarts or from idle threads
that apache kills himself.

PHP was compiled using:
./configure \
--with-apxs2=/usr/bin/apxs2 \
--prefix=/usr/local/php5 \
\
--enable-shared \
--enable-exif \
--enable-ftp \
--enable-gd-native-ttf \
--enable-mbstring \
--enable-simplexml \
--enable-soap \
--enable-pdo \
--enable-spl \
--enable-zip \
--with-bz2 \
--with-curl \
--with-curl=/usr \
--with-freetype-dir=/usr \
--with-gd=shared \
--with-gettext \
--with-iconv \
--with-mime-magic \
--with-mysql=shared,/usr \
--with-mysql-sock=/var/run/mysqld/mysqld.sock \
--with-pdo-mysql=/usr \
--with-t1lib \
--with-jpeg-dir=/usr \
--with-ttf=/usr \
--with-zlib=/usr \
--with-xsl=/usr \


Expected result:

-

Actual result:
--
$ gdb /usr/sbin/apache2 core
...
Core was generated by `/usr/sbin/apache2 -k start'.
Program terminated with signal 11, Segmentation fault.
#0  _zend_mm_free_int (heap=0x744dd0, p=0x2ab8a7c272a0) at
/usr/local/src/php5/php-5.2.5/Zend/zend_alloc.c:1944
1944if (ZEND_MM_IS_FREE_BLOCK(next_block)) {
(gdb) bt 
#0  _zend_mm_free_int (heap=0x744dd0, p=0x2ab8a7c272a0) at
/usr/local/src/php5/php-5.2.5/Zend/zend_alloc.c:1944
#1  0x2ab89d7e3735 in destroy_op_array (op_array=0x2ab8abe89260) at
/usr/local/src/php5/php-5.2.5/Zend/zend_opcode.c:232
#2  0x2ab89d7f6cb8 in zend_hash_destroy (ht=0x2ab8abe84760) at
/usr/local/src/php5/php-5.2.5/Zend/zend_hash.c:526
#3  0x2ab89d7e3465 in destroy_zend_class (pce=)
at /usr/local/src/php5/php-5.2.5/Zend/zend_opcode.c:184
#4  0x2ab89d7f69a2 in zend_hash_apply_deleter (ht=0x745710,
p=0x9dbba0) at /usr/local/src/php5/php-5.2.5/Zend/zend_hash.c:611
#5  0x2ab89d7f6aa9 in zend_hash_reverse_apply (ht=0x745710,
apply_func=0x2ab89d7dee70 )
at /usr/local/src/php5/php-5.2.5/Zend/zend_hash.c:760
#6  0x2ab89d7dfe96 in shutdown_executor () at
/usr/local/src/php5/php-5.2.5/Zend/zend_execute_API.c:291
#7  0x2ab89d7ec232 in zend_deactivate () at
/usr/local/src/php5/php-5.2.5/Zend/zend.c:860
#8  0x2ab89d7aa9be in php_request_shutdown (dummy=) at /usr/local/src/php5/php-5.2.5/main/main.c:1485
#9  0x2ab89d86b08e in php_handler (r=0x968488) at
/usr/local/src/php5/php-5.2.5/sapi/apache2handler/sapi_apache2.c:471
#10 0x00432c89 in ap_run_handler ()
#11 0x00435e02 in ap_invoke_handler ()
#12 0x00441ed8 in ap_process_request ()
#13 0x0043f3bc in ap_register_input_filter ()
#14 0x004397e1 in ap_run_process_connection ()
#15 0x00445851 in ap_graceful_stop_signalled ()
#16 0x00445ac4 in ap_graceful_stop_signalled ()
#17 0x00446366 in ap_mpm_run ()
#18 0x00420e00 in main ()



-- 
Edit bug report at http://bugs.php.net/?id=43459&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43459&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43459&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43459&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43459&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43459&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=43459&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=43459&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=43459&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=43459&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=43459&r=support
Expected behavior:http://bugs.php.net/fix.php?id=43459&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=43459&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=43459&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43459&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43459&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43459&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=43459&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=43459&r=gnused
Floating point limitations:   http://bugs.ph

#40816 [NEW]: I want a "snmptranslate" function

2007-03-15 Thread ch at westend dot com
From: ch at westend dot com
Operating system: linux
PHP version:  5.2.1
PHP Bug Type: SNMP related
Bug description:  I want a "snmptranslate" function

Description:

Hello

Please make a PHP pendant to /usr/bin/snmptranslate. It's handy
to check if all MIBs are installed so that the program does not
crash somewhere after already having set the first X OIDs and then
encountering one untranslatable.

bye,

-christian-

Reproduce code:
---
-

Expected result:

-

Actual result:
--
-

-- 
Edit bug report at http://bugs.php.net/?id=40816&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40816&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40816&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40816&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40816&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=40816&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=40816&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=40816&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=40816&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=40816&r=support
Expected behavior:http://bugs.php.net/fix.php?id=40816&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=40816&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=40816&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40816&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40816&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40816&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=40816&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=40816&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40816&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=40816&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=40816&r=mysqlcfg


#38382 [NEW]: SNMP lacks a snmptrap() function

2006-08-08 Thread ch at westend dot com
From: ch at westend dot com
Operating system: Linux
PHP version:  5.1.4
PHP Bug Type: SNMP related
Bug description:  SNMP lacks a snmptrap() function

Description:

According to the online documentation there is no snmptrap
function (not to mention an snmpinform() one).
Would be handy sometimes...

Reproduce code:
---
-

Expected result:

-

Actual result:
--
-

-- 
Edit bug report at http://bugs.php.net/?id=38382&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38382&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38382&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38382&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38382&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=38382&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=38382&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=38382&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=38382&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=38382&r=support
Expected behavior:http://bugs.php.net/fix.php?id=38382&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=38382&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=38382&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38382&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38382&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38382&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=38382&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=38382&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38382&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=38382&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=38382&r=mysqlcfg


#36477 [NEW]: Exceptions break debug_backtrace()

2006-02-21 Thread ch at westend dot com
From: ch at westend dot com
Operating system: Linux
PHP version:  5.1.2
PHP Bug Type: Scripting Engine problem
Bug description:  Exceptions break debug_backtrace()

Description:

After calling "throw new Exception(..)" and entering the
function registered with "set_exception_handler()" the 
debug_backtrace() output is empty.

This is very inconvinient for self written error handling functions as
"trigger_error()" for example works fine for debug_backtrace.

I'm aware that the exception itself contains a stack trace
but is there really a reason to empty debug_backtrace()?


Reproduce code:
---



Expected result:

Backtrace with
#1 exception_handler from c()
#2 c() from b()
#3 b() from a()
#4 a() from main



Actual result:
--
#0  exception_handler(Exception Object ([] => Problem!,[] => ,[] => 0,[]
=> /home/ch/tt.php,[] => 5,[] => Array ([0] => Array ([file] =>
/home/ch/tt.php,[line] => 6,[function] => c,[args] => Array ()),[1] =>
Array ([file] => /home/ch/tt.php,[line] => 7,[function] => b,[args] =>
Array ()),[2] => Array ([file] => /home/ch/tt.php,[line] => 10,[function]
=> a,[args] => Array () called at [(null):0]


-- 
Edit bug report at http://bugs.php.net/?id=36477&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36477&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36477&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36477&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36477&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=36477&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=36477&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=36477&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=36477&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=36477&r=support
Expected behavior:http://bugs.php.net/fix.php?id=36477&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=36477&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=36477&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36477&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36477&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36477&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=36477&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=36477&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36477&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=36477&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=36477&r=mysqlcfg


#34910 [Fbk->Opn]: snmp does not parse OID with string index

2005-11-02 Thread ch at westend dot com
 ID:   34910
 User updated by:  ch at westend dot com
 Reported By:  ch at westend dot com
-Status:   Feedback
+Status:   Open
 Bug Type: SNMP related
 Operating System: Debian GNU/Linux
 PHP Version:  5.0.5
 New Comment:

What about beeing a bit more polite, eh?

I tried the latest snapshot and the problem apparently has not been
fixed in the meantime or you have to tell me where my syntax is wrong.

$ snmpget -v 1 -Ir -c  stinger-test
'ASCEND-MIBINET-MIB::internetProfile-Station."cir-1-9"'

ASCEND-MIBINET-MIB::internetProfile-Station."cir-1-9" = STRING:
"cir-1-9"

$ cat t.php



[EMAIL PROTECTED]:/tmp/php5-200511020730$ ./sapi/cli/php ~ch/t.php 

Warning: snmpget(): Invalid object identifier:
ASCEND-MIBINET-MIB::internetProfile-Station."cir-1-9" in /home/ch/t.php
on line 4


bye,

-christian-


Previous Comments:


[2005-11-02 13:22:52] [EMAIL PROTECTED]

Try the snapshot please. Don't be a smartass.



--------------------

[2005-11-02 11:05:50] ch at westend dot com

There seems to be no relevant change between 5.0.5 and the -latest
tarball. Also, the bug number is not referenced in NEWS...



[2005-10-31 16:41:46] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



--------------------

[2005-10-18 18:22:45] ch at westend dot com

Description:

The SNMP function seem to not know that it is possible
to have string indices like:
 $ snmpwalk -Ir myhost \
   'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"'

which gives:
  ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26" =
INTEGER: yes(2)

(keep the single and double quotes in the example!)

It seems that setting the "-Ir" flag is not possible.




Reproduce code:
---
$x = snmprealwalk('myhost', 'mypassword', 
"ASCEND-MIBINET-MIB::internetProfile-Station");
var_export($x); print("\n");

gives:

array (
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-2"' => 'STRING:
"bras-1-2"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-3"' => 'STRING:
"bras-1-3"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-4"' => 'STRING:
"bras-1-4"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-48"' => 'STRING:
"bras-1-48"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-5"' => 'STRING:
"bras-1-5"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-6"' => 'STRING:
"bras-1-6"',


Numerically this OID looks like:

$ snmpwalk -Ir -On myhost \
 'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"'
.1.3.6.1.4.1.529.23.1.1.1.2.8.99.105.114.45.49.45.50.54 = INTEGER:
yes(2)



The MIB definition looks like this:

mibinternetProfileTable OBJECT-TYPE
SYNTAX  SEQUENCE OF MibinternetProfileEntry
ACCESS  not-accessible
STATUS  mandatory
DESCRIPTION "A list of mibinternetProfile profile
entries."
::= { mibinternetProfile 1 }

mibinternetProfileEntry OBJECT-TYPE
SYNTAX  MibinternetProfileEntry
ACCESS  not-accessible
STATUS  mandatory
DESCRIPTION "A mibinternetProfile entry containing objects
that
 maps to the parameters of mibinternetProfile
profile."
INDEX   { internetProfile-Station }
::= { mibinternetProfileTable 1 }

MibinternetProfileEntry ::=
SEQUENCE {
internetProfile-Station
DisplayString,
internetProfile-Active
INTEGER,

internetProfile-Active  OBJECT-TYPE
SYNTAX  INTEGER {
no (1),
yes (2)
}
ACCESS  read-write
STATUS  mandatory
DESCRIPTION "A profile can be disabled by setting this
field to no. There is no difference between an inactive pr
::= { mibinternetProfileEntry 2 }




Expected result:

I would have expected to be able to use every OID that the
above snmpwalk returns. But they are claimed to be invalid.

Actual result:
--
Warning: snmpget(): Invalid object identifier:
ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-2" in
/home/ch/t.php on line 10






-- 
Edit this bug report at http://bugs.php.net/?id=34910&edit=1


#34910 [Fbk->Opn]: snmp does not parse OID with string index

2005-11-02 Thread ch at westend dot com
 ID:   34910
 User updated by:  ch at westend dot com
 Reported By:  ch at westend dot com
-Status:   Feedback
+Status:   Open
 Bug Type: SNMP related
 Operating System: Debian GNU/Linux
 PHP Version:  5.0.5
 New Comment:

There seems to be no relevant change between 5.0.5 and the -latest
tarball. Also, the bug number is not referenced in NEWS...


Previous Comments:


[2005-10-31 16:41:46] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip





[2005-10-18 18:22:45] ch at westend dot com

Description:

The SNMP function seem to not know that it is possible
to have string indices like:
 $ snmpwalk -Ir myhost \
   'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"'

which gives:
  ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26" =
INTEGER: yes(2)

(keep the single and double quotes in the example!)

It seems that setting the "-Ir" flag is not possible.




Reproduce code:
---
$x = snmprealwalk('myhost', 'mypassword', 
"ASCEND-MIBINET-MIB::internetProfile-Station");
var_export($x); print("\n");

gives:

array (
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-2"' => 'STRING:
"bras-1-2"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-3"' => 'STRING:
"bras-1-3"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-4"' => 'STRING:
"bras-1-4"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-48"' => 'STRING:
"bras-1-48"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-5"' => 'STRING:
"bras-1-5"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-6"' => 'STRING:
"bras-1-6"',


Numerically this OID looks like:

$ snmpwalk -Ir -On myhost \
 'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"'
.1.3.6.1.4.1.529.23.1.1.1.2.8.99.105.114.45.49.45.50.54 = INTEGER:
yes(2)



The MIB definition looks like this:

mibinternetProfileTable OBJECT-TYPE
SYNTAX  SEQUENCE OF MibinternetProfileEntry
ACCESS  not-accessible
STATUS  mandatory
DESCRIPTION "A list of mibinternetProfile profile
entries."
::= { mibinternetProfile 1 }

mibinternetProfileEntry OBJECT-TYPE
SYNTAX  MibinternetProfileEntry
ACCESS  not-accessible
STATUS  mandatory
DESCRIPTION "A mibinternetProfile entry containing objects
that
 maps to the parameters of mibinternetProfile
profile."
INDEX   { internetProfile-Station }
::= { mibinternetProfileTable 1 }

MibinternetProfileEntry ::=
SEQUENCE {
internetProfile-Station
DisplayString,
internetProfile-Active
INTEGER,

internetProfile-Active  OBJECT-TYPE
SYNTAX  INTEGER {
no (1),
yes (2)
}
ACCESS  read-write
STATUS  mandatory
DESCRIPTION "A profile can be disabled by setting this
field to no. There is no difference between an inactive pr
::= { mibinternetProfileEntry 2 }




Expected result:

I would have expected to be able to use every OID that the
above snmpwalk returns. But they are claimed to be invalid.

Actual result:
--
Warning: snmpget(): Invalid object identifier:
ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-2" in
/home/ch/t.php on line 10






-- 
Edit this bug report at http://bugs.php.net/?id=34910&edit=1


#34910 [NEW]: snmp does not parse OID with string index

2005-10-18 Thread ch at westend dot com
From: ch at westend dot com
Operating system: Debian GNU/Linux
PHP version:  5.0.5
PHP Bug Type: SNMP related
Bug description:  snmp does not parse OID with string index 

Description:

The SNMP function seem to not know that it is possible
to have string indices like:
 $ snmpwalk -Ir myhost \
   'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"'

which gives:
  ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26" =
INTEGER: yes(2)

(keep the single and double quotes in the example!)

It seems that setting the "-Ir" flag is not possible.




Reproduce code:
---
$x = snmprealwalk('myhost', 'mypassword', 
"ASCEND-MIBINET-MIB::internetProfile-Station");
var_export($x); print("\n");

gives:

array (
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-2"' => 'STRING:
"bras-1-2"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-3"' => 'STRING:
"bras-1-3"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-4"' => 'STRING:
"bras-1-4"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-48"' => 'STRING:
"bras-1-48"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-5"' => 'STRING:
"bras-1-5"',
  'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-6"' => 'STRING:
"bras-1-6"',


Numerically this OID looks like:

$ snmpwalk -Ir -On myhost \
 'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"'
.1.3.6.1.4.1.529.23.1.1.1.2.8.99.105.114.45.49.45.50.54 = INTEGER: yes(2)



The MIB definition looks like this:

mibinternetProfileTable OBJECT-TYPE
SYNTAX  SEQUENCE OF MibinternetProfileEntry
ACCESS  not-accessible
STATUS  mandatory
DESCRIPTION "A list of mibinternetProfile profile entries."
::= { mibinternetProfile 1 }

mibinternetProfileEntry OBJECT-TYPE
SYNTAX  MibinternetProfileEntry
ACCESS  not-accessible
STATUS  mandatory
DESCRIPTION "A mibinternetProfile entry containing objects
that
 maps to the parameters of mibinternetProfile
profile."
INDEX   { internetProfile-Station }
::= { mibinternetProfileTable 1 }

MibinternetProfileEntry ::=
SEQUENCE {
internetProfile-Station
DisplayString,
internetProfile-Active
INTEGER,

internetProfile-Active  OBJECT-TYPE
SYNTAX  INTEGER {
no (1),
yes (2)
}
ACCESS  read-write
STATUS  mandatory
DESCRIPTION "A profile can be disabled by setting this field
to no. There is no difference between an inactive pr
::= { mibinternetProfileEntry 2 }




Expected result:

I would have expected to be able to use every OID that the
above snmpwalk returns. But they are claimed to be invalid.

Actual result:
--
Warning: snmpget(): Invalid object identifier:
ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-2" in /home/ch/t.php
on line 10


-- 
Edit bug report at http://bugs.php.net/?id=34910&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34910&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34910&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34910&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=34910&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=34910&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=34910&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=34910&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=34910&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34910&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=34910&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=34910&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=34910&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=34910&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34910&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=34910&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=34910&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34910&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34910&r=float
No Zend Extensions:  http://bugs.php.net/fix.php?id=34910&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34910&r=mysqlcfg