snmp problem

I want to write some scripts that uses snmp.
When running the scripts i got the error:
"Call to undefined function: snmpget()"

I have read that i have to recompile php with --enable-ucd-snmp-hack.

How to do that???
I have installed php 4.0.6 via a rpm file

Can someone explain step by step how to (re)compile.
I never did this before.

Thanks
LVL 1
SeeverAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
us111Connect With a Mentor Commented:
- download the latest php version source code
- ./configure .............
- make
- make install

http://www.php.net/manual/en/install.unix.php
0
 
us111Commented:
try to do it
tell us if you are able
0
 
SeeverAuthor Commented:
I have done this, and restarted httpd. When running my script i have the same problem. also when running phpinfo() i see that still the old version 4.0.6 is running.
I installed 4.2.1
0
2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

 
SeeverAuthor Commented:
I have done this, and restarted httpd. When running my script i have the same problem. also when running phpinfo() i see that still the old version 4.0.6 is running.
I installed 4.2.1
0
 
us111Commented:
You have to modify the httpd.conf by replacing the old PHP module by the new one.

Could you paste here the ./configure line you used (you can see it with phpdinfo()?
0
 
SeeverAuthor Commented:
The only module i found is libphp4.so in /usr/lib/apache
In httpd.conf i did:
LoadModule php4_module    /usr/lib/apache/libphp4.so
Still the same problem, when running
phpinfo() i see that still the old version 4.0.6 is running.
0
 
us111Commented:
look in the php src folder, you may have a .so file. you have to replace /usr/lib/apache/libphp4.so by the new name.

and then, don't forget to restart apache!
0
All Courses

From novice to tech pro — start learning today.