next:
prev:  
Select Page: 1 2

If you tried to run ‘pecl install package.xml‘ at this point you get a compile error like you got from ‘pecl install ssh2-beta‘. As of this date, you need to manually edit the ssh2.c file inside the <ssh2-0.11.0> directory. According to this patch file there is a “extra” word called static. If you know how to automatically apply this patch file to ssh2.c file do so with the patch file. If you are like me just go into the ssh2.c file look for this part of the code.

#ifdef ZEND_ENGINE_2
static
     ZEND_BEGIN_ARG_INFO(php_ssh2_first_arg_force_ref, 0)
         ZEND_ARG_PASS_INFO(1)
     ZEND_END_ARG_INFO()

Remove the highlighted line (line 53 in the file) and then save. Go ahead and go back to the parent directory and run ‘pecl install package.xml‘. Yes! It will work!

Where ever the ssh2.so file goes be sure to move it to your PHP extensions directory and activate it by adding the lovely:

extension=ssh2.so

… into your php.ini file. Restart Apache! You should see under your phpinfo() under ‘Registered PHP Streams’:

https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp

And there it is…SSH2 again working for PHP 5.3.0.

Wouldn’t it be easier if they just fixed this entire part for PECL instead of doing all of these manual fixes? If you have any problems, give me a shout out! I should be able to figure it out now that I spent half the day on this little project.

Select Page: 1 2
No Comments | Comments Closed
Sorry, the comment form is closed at this time.
 next:
prev: