ID: 45883 Updated by: [EMAIL PROTECTED] Reported By: richrumble at gmail dot com -Status: Open +Status: Feedback Bug Type: SNMP related Operating System: Windows PHP Version: 5.2.6 New Comment:
which php.ini is used by your webserver and which is used by cli? Do you get any error while running cli (cannot find dll xyz, etc)? Have you installed the required files and data as described in the manual? Previous Comments: ------------------------------------------------------------------------ [2008-08-21 16:22:23] richrumble at gmail dot com Description: ------------ Technically phpinfo() can show you part of the problem With SNMP enabled, running that script from the browser will show you snmp enabled, running the phpinfo script from cli shows it's not enabled, but every other function is! Any simple snmp command will result in the following error: Fatal error: Call to undefined function snmprealwalk() substitute snmprealwalk with any snmp function Reproduce code: --------------- <?php phpinfo(); ?> or <?php $host = "localhost"; $community = "public"; $oid = ".1.3.6.1.2.1.2.2.1.2"; $arr = snmpwalk($host, $community, $oid); print_r($arr); ?> Expected result: ---------------- PhpInfo(cli) that matches phpinfo from browser SNMP results from host. Actual result: -------------- SNMP Extension missing from phpinfo when called via command line interface ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45883&edit=1