|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-09-28 13:16 UTC] admin at denic-294 dot de
Description: ------------ As in Bug #26612 i was getting the error: "no SSL support in this build" while trying to "fsockopen("ssl://...",xxx);". I am using the CLI-version of php-4.4.4. Just as in the other bug "phpinfo();" showed active OpsnSSL support, so after trying many diffrent configure options i finally tried the include of "php_config.h" in "php.h" and it worked for this bug too. greetz Chris PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 16:00:01 2025 UTC |
Ok following the how-to-report: What i did: $fd=fsockopen("ssl://...",xxx); What i wanted to happen: get a $fd with an active SSL connection to the given host. What actually happened: i got the error-message "no SSL support in this build". I searched the bug-database and found the but i related to. The tip with the include of "php_config.h" in "php.h" worked to get it running. In the end i just wanted to let you know of the bug that (for the cli-version) is still there in the latest php4-release. So you can close this if open means that i still need help. greetz ChrisThe php-source: --------------- 1: #!/root/php-4.4.4/sapi/cli/php 2: <?php [...] 67: $fp=fsockopen("ssl://".$host,$port,$errno,$errstr); [...] The result: ----------- Warning: fsockopen(): no SSL support in this build in /home/.../script.php on line 67 Warning: fsockopen(): unable to connect to xxxx.xxxx:12345 in /home/.../script.php on line 67 The configure-command: ---------------------- ./configure --disable-cgi --with-mysql --with-openssl (It worked with the same command after the patch) I tried compiling with debian woody and debian sarge on different servers which did not affect the result in any way. Is there any more information that would help you ?I got the same problem too, i compile php-4.4.4 with following command: ./configure --prefix=/usr/local/php4 --with-config-file-path=/usr/local/php4 --with-mysql=/usr/local/mysql --with-openssl=/usr/local/ssl --with-apxs2=/usr/local/apache2/bin/apxs --disable-all and run the following php in cli. <?php $a = file_get_contents('https://www.interwetten.com'); ?> I got the following result: [root@www2 bin]# ./php ~/a.php Warning: file_get_contents(): php_stream_sock_ssl_activate_with_method: failed to create an SSL context in /root/a.php on line 3 Warning: file_get_contents(https://www.interwetten.com): failed to open stream: Unable to activate SSL mode in /root/a.php on line 3 here is the result from php -m [root@myserver bin]# ./php -m [PHP Modules] mysql openssl standard [Zend Modules]Same problem with PHP 4.4.6 config: ./configure \ --with-config-file-path=/usr/local/etc \ --disable-safe-mode \ --enable-track-vars \ --enable-ftp \ --disable-debug \ --with-mysql=/usr/local/mysql50 \ --with-dom \ --with-gdbm \ --with-zlib \ --with-iconv=/usr/local \ --with-snmp \ --with-gd \ --with-curl \ --with-openssl \ --enable-xslt \ --with-xslt-sablot \ --with-freetype-dir=/usr \ --with-mcrypt \ --with-oracle=/oracle/product/8.1.7 \ --with-ldap # ldd /usr/local/bin/php|grep ssl libssl.so.0.9.7 => /usr/lib/i686/cmov/libssl.so.0.9.7 (0x4d34e000) # php -i|grep -i ssl Configure Command => './configure' '--with-config-file-path=/usr/local/etc' '--disable-safe-mode' '--enable-track-vars' '--enable-ftp' '--disable-debug' '--with-mysql=/usr/local/mysql50' '--with-gdbm' '--with-iconv=/usr/local' '--with-dom' '--with-zlib' '--with-snmp' '--with-gd' '--with-curl' '--enable-xslt' '--with-xslt-sablot' '--with-openssl' '--with-freetype-dir=/usr' '--with-mcrypt' '--with-oracle=/oracle/product/8.1.7' '--with-ldap' CURL Information => libcurl/7.13.2 OpenSSL/0.9.7e zlib/1.2.3 libidn/0.5.13 openssl OpenSSL support => enabled OpenSSL Version => OpenSSL 0.9.7e 25 Oct 2004 Testscript: test.php <?php $fp = fsockopen("ssl://www.entropy.ch", 443, $errno, $errstr, 10); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET /home/ HTTP/1.1\r\n"; $out .= "Host: www.entropy.ch\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?> Result: # php test.php Warning: fsockopen(): no SSL support in this build in /tmp/test.php on line 3 Warning: fsockopen(): unable to connect to www.entropy.ch:443 in /tmp/test.php on line 3 Success (0)<br /> This test-script does work with the apache-module version of PHP on the same server with the same (except for the specific CLI config entries) config.