Hi all,
I've a problem with stream_socket_client function and tls under Solaris
8 (sparc).

The client code follows up:
<?php
$context =
stream_context_create(array('tls'=>array('capture_peer_cert'=>TRUE)));
$fp = stream_socket_client("tls://192.168.14.200:8000", $errno, $errstr,
30, STREAM_CLIENT_CONNECT, $context);
if (!$fp) {
        echo "$errstr ($errno)\n";
        die("error creating socket ({$errno}):{$errstr}\n");
}
echo "Socket is ok, start sending messages!\n";
$i_sleep = 5;
for ($i_counter = 0; $i_counter < 10; $i_counter++) {
        $s_msg = "message sent ".$i_counter;
        fwrite($fp,$s_msg);
        sleep($i_sleep);
}
fclose($fp);
?> 

This code works fine on CentOS 5 (x86_64) and Solars 10 (x86) [the
client connects to the server and sends messages], but on Solars 8
(sparc, core installation) it gives a warning and does not create any
connection, the connection error is 0 (unknown error).

Warning: stream_socket_client(): SSL: Error 0 in test.php on line 2

Warning: stream_socket_client(): Failed to enable crypto in test.php on
line 2

Warning: stream_socket_client(): unable to connect to
tls://192.168.14.200:8000 (Unknown error) in test.php on line 2
 (0)


php has been compiled without problems with the options:
./configure \
            --enable-xml \
            --enable-libxml \
            --with-tsrm-pthreads \
            --with-openssl \
            --with-zlib \
            --with-pcre-regex \
            --with-pear \
            --enable-sysvsem \
            --enable-sysvshm \
            --enable-sysvmsg \
            --enable-shmop \
            --enable-pcntl \
            --with-gettext \
            --enable-sockets \
            --enable-mbstring \
            --with-imap-ssl \
            --with-mcrypt \
            --disable-cgi \
            --with-gnu-ld


Any help would be appriciated,
thanks,
Laura


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to