php_ssh2 and php-5.3.1 (on windows)
| From: | Nicolai Scheer | Date: | Tue, 24 Nov 2009 12:38:55 +0000 |
| Subject: | php_ssh2 and php-5.3.1 (on windows) | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-6830@lists.php.net to get a copy of this message | ||
Hi!
Just tried to compile the pecl ssh2 (0.11) extension with php-5.3.1 and
VC9 on windows.
I noticed a few things:
At first, it seems as of php 5.3 the ZEND_BEGIN_ARG_INFO macro already
contains the static keyword (to be more precise, the
ZEND_BEGIN_ARG_INFO_EX macro in the next expansion step). Can anybody
confirm this?
This was the first thing I needed to compile the ssh2 extension. (Seems
to apply for all pecl extension when compiling for php 5.3)
Secondly, the function php_ssh2_set_callback invokes zend_is_callable
without using the TSRMLS_CC macro, so I had to add the TSRMLS_DC/CC
macros to the function definition/function calls.
The config.w32 was missing, so I created my own:
ARG_WITH("ssh2", "ssh2 support", "no");
if (PHP_SSH2 != "no")
{
if ( CHECK_LIB("libssh2.lib", "ssh2", PHP_SSH2)
&& CHECK_HEADER_ADD_INCLUDE("libssh2.h", "CFLAGS_SSH2", PHP_SSH2
+ "/libssh2") )
{
EXTENSION("ssh2", "ssh2.c ssh2_fopen_wrappers.c ssh2_sftp.c",
"shared");
AC_DEFINE('HAVE_SSH2', 1);
}
else
{
WARNING("ssh2 not enabled; ibraries and headers not found!");
PHP_SSH2 = "no";
}
}
With these changes, the extension compiled fine and seems to work.
Did I do it the right way, any suggestions?
The only thing that annoys me right now is a strange warning I get every
time I invoke a ssh2 function:
Warning: Invalid CRT parameters detected in Unknown on line 0
Any hints on this?
Thanks in advance,
Nico