How do i enable SNMP with XAMPP Linux

Problems with the Linux version of XAMPP, questions, comments, and anything related.

How do i enable SNMP with XAMPP Linux

Postby cityguru » 24. December 2004 21:23

I have run the installation for Linux however i now need to activate SNMP for PHP, i have already downloaded the snmp rpms and installed them but i am guessing i need to compile then for PHP, however i do not know how to do this after PHP has already been installed. I know on windows it would be as easy as uncommenting the extension however this is Linux and i am totally lost on this so any help anyone can offer it would be most appreciated and if the instructions can be as detailed as possible that would be even better but anything is appreciated

Thanks in advance
cityguru
 
Posts: 20
Joined: 24. December 2004 04:38

Postby Oswald » 24. December 2004 22:16

Dear citiyguru!

Bad news: XAMPP for Linux doesn't support SNMP. If you need SNMP support in PHP you need to go the long way and use the PHP coming with your distribution. Or if the distribution PHP also doesn't support SNMP you need to go the very long way and compile PHP completely by yourself.

Best regards
Oswald
User avatar
Oswald
Apache Friends
 
Posts: 2718
Joined: 26. December 2002 19:51
Location: Berlin, Germany
XAMPP Version: 5.5.19
Operating System: Linux

Postby cityguru » 29. December 2004 06:49

Well it looks like i will have to re-compile PHP however to do this i would need to know where i can execute the ./configure command that one would normally need to run when compiling PHP, any idea where this command would exist?
cityguru
 
Posts: 20
Joined: 24. December 2004 04:38

Postby Kristian Marcroft » 29. December 2004 08:53

Hi,

you will have to download the php Source from www.php.net
The configure options we use can be found in a phpinfo()

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby cityguru » 29. December 2004 12:32

thanks for the info, but PHP is all over the place in Xampp, the file structure doesnt look the same as the php source that i download, so where do i put the source folders (which ones where?)?

Thanks for the help
cityguru
 
Posts: 20
Joined: 24. December 2004 04:38

Postby Kristian Marcroft » 29. December 2004 12:38

Hi,

what you do...
download the php source to /usr/local/src
untar the source.
change to the unpacked dir.

Use the following ./configure:
Code: Select all
./configure --prefix=/opt/lampp --with-apxs2=/opt/lampp/bin/apxs --with-config-file-path=/opt/lampp/etc \
--with-mysql=/opt/lampp --disable-debug --enable-bcmath --enable-calendar --enable-ctype --enable-dbase \
--enable-discard-path --enable-exif --enable-filepro --enable-force-cgi-redirect --enable-ftp \
--enable-gd-imgstrttf --enable-gd-native-ttf --with-ttf --enable-magic-quotes --enable-memory-limit \
--enable-safe-mode --enable-shmop --enable-sigchild --enable-sysvsem --enable-sysvshm --enable-track-vars \
--enable-trans-sid --enable-versioning --enable-wddx --enable-yp --with-ftp --with-gdbm=/opt/lampp \
--with-jpeg-dir=/opt/lampp --with-png-dir=/opt/lampp --with-tiff-dir=/opt/lampp --with-freetype-dir=/opt/lampp
--without-xpm --with-zlib=yes --with-zlib-dir=/opt/lampp --with-openssl=/opt/lampp --with-expat-dir=/opt/lampp
--enable-xslt --with-xslt-sablot=/opt/lampp -with-ming=/opt/lampp --with-dom=/opt/lampp --with-ldap=/opt/lampp
--with-ncurses=/opt/lampp --with-gd --with-imap-dir=/opt/lampp --with-imap-ssl --with-imap=/opt/lampp \
--with-gettext=/opt/lampp --with-mysql-sock=/opt/lampp/var/mysql/mysql.sock --with-mcrypt=/opt/lampp \
--with-mhash=/opt/lampp --enable-sockets --enable-mbstring=all --with-curl=/opt/lampp --enable-mbregex \
--enable-zend-multibyte --with-zip=/opt/lampp --enable-exif --with-bz2=/opt/lampp \
--with-snmp

After this has successfully finished, you do a
make
and then a make install
Then the finished compiled php with snmp SUpport is installed to /opt/lampp where it belongs.

Good Luck
So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby cityguru » 29. December 2004 12:56

awesome thank you so much, just one quick question should i take what you put above into a file and run it as a script or copy and paste it straight into the terminal window?

Thanks again
cityguru
 
Posts: 20
Joined: 24. December 2004 04:38

Postby Kristian Marcroft » 29. December 2004 13:03

Hi,

you can do it as you wish..
I usually create a File like php-configure.sh
and paste the above into the file.
Save, make executable and then execute.
I put the configure in a file, because it makes it easier to edit and I can reuse it when needed.

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby cityguru » 29. December 2004 16:44

sorry one other question, the extensions refrence "=/opt/lampp" however isnt that incorrect since i see nothing directly under that folder for these extensions such as an associate ldap extension or anything, so wouldnt the above give me an error? or do i need to change =/opt/lampp with a different path such as one pointing to /usr/local/src/php-4.3.9/lib or something like that
cityguru
 
Posts: 20
Joined: 24. December 2004 04:38

Postby Kristian Marcroft » 29. December 2004 22:32

Hi,

the above is absolutly correct.
I have compiled PHP hundreds of times with the above options.
These options are also shown in phpinfo().. check if you don't believe me.

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby c815902 » 30. December 2004 12:22

Hi, Kristian

I got same problem here. :roll:


Code: Select all

[root@localhost php-4.3.10]# ./php-configure.sh
creating cache ./config.cache
checking host system type... config.sub: missing argument
Try `config.sub --help' for more information.

checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... exit 0;
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for mawk... no
checking for gawk... gawk
checking for bison... bison -y
checking bison version... 1.875 (ok)
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for working const... yes
checking flex version... 2.5.4 (ok)
checking for pthreads_cflags... -pthread
checking for pthreads_lib...

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking for member fd in BUFF *... no
checking for mod_charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS...

Sorry, I cannot run apxs.  Possible reasons follow:

1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)

The output of /opt/lampp/bin/apxs follows:
cannot open /opt/lampp/build/config_vars.mk: No such file or directory at /opt/lampp/bin/apxs line 217.
configure: error: Aborting
./php-configure.sh: line 2: --with-mysql=/opt/lampp: No such file or directory
./php-configure.sh: line 3: --enable-discard-path: command not found
./php-configure.sh: line 4: --enable-gd-imgstrttf: command not found
./php-configure.sh: line 5: --enable-safe-mode: command not found
./php-configure.sh: line 6: --enable-trans-sid: command not found
./php-configure.sh: line 7: --with-jpeg-dir=/opt/lampp: No such file or directory
./php-configure.sh: line 8: --without-xpm: command not found
./php-configure.sh: line 9: --enable-xslt: command not found
./php-configure.sh: line 10: --with-ncurses=/opt/lampp: No such file or directory
./php-configure.sh: line 11: --with-gettext=/opt/lampp: No such file or directory
./php-configure.sh: line 12: --with-mhash=/opt/lampp: No such file or directory
./php-configure.sh: line 13: --enable-zend-multibyte: command not found
./php-configure.sh: line 14: --with-snmp: command not found

[root@localhost php-4.3.10]#

c815902
 
Posts: 1
Joined: 30. December 2004 12:15

Postby Kristian Marcroft » 30. December 2004 13:30

Hi,

1. do you have the dev Package installed?
2. your php-configure.sh is faulty. Please write the hole ./configure <options> in one line, or break the Lines with a \ at the end.
Do not create this File with Openoffice or simular.
Use either vim/mc/joe/nano etc.

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby cityguru » 30. December 2004 17:28

you mentioned the development package, is that the development package for XAMPP? and if so i assume you mean to download that in conjunction with the PHP source from www.php.net.

As for the development package i wasnt sure where to place it since when extracted it came up under a folder called "lampp", so i assumed to put its sub folder contetns under /opt/lampp.

However i did mak sure to e careful not to overwrite anything since i know if a folder already exists and you move a folder with the same name you will completely delete the older one, so a sub folder did match names (ie: "lib") i then opened both the production lib folder and the development lib folder and then moved over any non existing files/folders.

Was this correct? Tonight i am going to try all the above as well

Thanks again
cityguru
 
Posts: 20
Joined: 24. December 2004 04:38

Postby Kristian Marcroft » 30. December 2004 17:37

Hi,

with the dev. Package I mean the one from our Downlod Page.
And you just have to compy it over the existing /opt/lampp

You will not overwrite anything...
The dev Package has just got a couple of Files that are needed to add more Software to XAMPP or redevelop XAMPP. (headerfiles includes etc.)

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby cityguru » 30. December 2004 18:50

looks like it ran ok however i got the following after it was done:
./php-configure.sh: line 8: --without-xpm: command not found
./php-configure.sh: line 9: --enable-xslt: command not found
./php-configure.sh: line 10: --with-ncurses=/opt/lampp: No such file or directory

Should i be concerned with the above?
cityguru
 
Posts: 20
Joined: 24. December 2004 04:38

Next

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 5 guests