Joined: 28 Jul 2008
|Posted: Sun Nov 02, 2008 2:50 am Post subject: More Trouble Installing PHP's SSH2 extension.
|When trying to do pecl install ssh2-beta get an error message as follows:
/tmp/pear/download/ssh2-0.10/ssh2.c:1107: warning: passing argument 2 of '_zend_hash_add_or_update' discards qualifiers from pointer target type
make: *** [ssh2.lo] Error 1
ERROR: `make' failed
the only solid explanation on how to fix this I found at the following link. Unfortunatelly it doesn't work for me
and I still get the same error.
I change the ssh2.c file as described below run the phpize && ./configure --with-ssh2 && make command and then try to do the pecl install command.
Can anyone please explain to me what I'm doing wrong.
presuming you've downloaded, and extracted the pecl lib you can patch it
manually by opening up ssh2.c running down the script till you get to
the line that reads:
#if LIBSSH2_APINO < 200412301450
Change it to read
#if LIBSSH2_VERSION_NUM < 0x001000
Save the file and run
phpize && ./configure --with-ssh2 && make
Then carry on from there. You'll now need to edit your PHP.INI to load
in the extension, but you should be good to go.