Non-static method PEAR::raiseError
phpipam open-source IP address management
Brought to you by:
myha
When viewing subnets and trying to sort a column, I get this error and no data is displayed:
Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /var/www/phpipam/functions/PEAR/Net/IPv4.php on line 241
Anonymous
This is a problem caused as a result of PEAR libraries not being written to E_STRICT. The most recent version of this package (http://pear.php.net/package/Net_IPv4/download/1.3.4) (4 years old) still has the same problem.
I'm not sure how Miha would suggest getting around this issue - I see lots of calls to change error_reporting in phpipam source, but I'd be more inclined to patch the library as it's no longer maintained;
MOVE LINE 207 -> LINE 203: $pear = new PEAR();
CHANGE LINE 241 from "PEAR::raiseError" to $pear()->raiseError();
I'd be happy to patch up this file to try and follow E_STRICT if Miha is interested in accepting my patch.
Hi, sure, would be happy if you can provide patch.
If I understand you correctly what is needed is to first initialise PEAR class and than call functions like you said above?
brm
After experiencing this PEAR issue, I made changes as described by xconspirisist. The result cleared the E_STRICT error, however, caused a trivial display of 0.0.0.1-204.68.xxx.xxx, including a total count of addressed from 0.0.0.1 to the active netblock. i.e., 0.0.0.1 - 204.68.xxx.xxx (3427066624)
The action was SORT IP, which displayed the active netblock in DESC order, then a SORT IP again to revert back to ASC. The reverting back to ASC caused the unusual display above.
Les
What if declaring static functions on the right place?
It solved this bug.
I'm getting similar results, and I have tried to make the above updates with no luck. Am I hitting the same bug?
Non-static method Net_IPv4::parseAddress() should not be called statically in /srv/www/htdocs/phpipam/functions/functions-tools.php on line 660 Strict Standards:
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Hello,
Just add :
public static function parseAddress($address)
Instaead of :
function parseAddress($address)
in : /var/www/html/phpipam/functions/PEAR/Net/IPv4.php
It is working now, maybe other will need it
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
After upgrade to phpIPAM 1.1 rev010, I've started to get the following error when using the search feature.
Non-static method Net_IPv4::parseAddress() should not be called statically in /srv/www/htdocs/phpipam/functions/functions-tools.php on line 660 Strict
When attempting to sort a subnet by any column, the sort happens, but I get the following error:
Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /var/www/phpipam/functions/PEAR/Net/IPv4.php on line 240
This did not exist on the previous version we were running.
Installed versions:
php-5.3.3-46
php-pear-1.9.4-4