Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Backward compatibility issue? #2

Open
GoogleCodeExporter opened this issue Jul 20, 2015 · 3 comments
Open

Backward compatibility issue? #2

GoogleCodeExporter opened this issue Jul 20, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. php SNMP.php
2. use PHP/4.3.11
3.

What is the expected output? What do you see instead?
back to prompt ( I think ) when it works properly.  I am currently
recieving this error:

PHP Parse error:  parse error, unexpected T_STRING, expecting
T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in
/var/www/html/snmp_monitor/SNMP4.php on line 30

Line 30:
public static function trap($ip, $varBinds=null, $community='public')

Can this code not be used on this old of a version of PHP?

What version of the product are you using? On what operating system?
Centos 4

Please provide any additional information below.


Original issue reported on code.google.com by guyve...@gmail.com on 4 Oct 2009 at 8:42

@GoogleCodeExporter
Copy link
Author

NOTE
Right now due to many work I don't have much time to make changes and fix bugs.
If some-one wants to, mail me and I'll give you access to sources

Original comment by T.Kalapun on 11 Nov 2009 at 9:22

@GoogleCodeExporter
Copy link
Author

the class was written using PHP5
I wasn't planning using it on php4

Original comment by T.Kalapun on 11 Nov 2009 at 9:25

@GoogleCodeExporter
Copy link
Author

I ran across this issue as well in php 4.x (had to use it due to project 
constraints). To fix this, convert the file into a flat function file (remove 
the class declaration and class specific prefixes from the functions, then do a 
find/replace on everything 'self::' and replace it with a null value.). 
Finally, in your file that calls the class/function, remove the class call so 
it just reads "trap" and your params. It will then work fine.

Original comment by dorlow...@gmail.com on 30 Sep 2014 at 2:29

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant