Reputation: 393
I have a problem with my PHP code. I have a firewall (ZyWALL), and can have 4 printers. The problem occurs because I can set the 161 (SNMP) port only at one printer, and not at all.
This is a screen of my ZyWall:
And this is my php code:
<?php
$session = new SNMP(SNMP::VERSION_1, "xxx.xxx.xxx.xxx", "public");
$fulltree = $session->walk(".");
print_r($fulltree);
echo "<br>";
$session->close();
?>
If i set in my ZyWall for the ip: 192.168.1.204, Original port = 161 and Mapped port = 161, and in my php code i replace xxx.xxx.xxx.xxx with the correct ip with or without ":161", it work perfectly.
The problem occurs because i have plus of one printer. If for example i set in my ZyWall for the ip: 192.168.1.204, Original port = 6000 and Mapped port = 161, and in my php code i replace xxx.xxx.xxx.xxx with the correct ip with ":6000", it doesn't work.
Everyone can explain to me where is the error? Thank you
Upvotes: 1
Views: 1246