|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-02-04 18:01 UTC] amith at xalan dot com
[2003-02-04 18:06 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 05:00:02 2025 UTC |
The function file() fails when I try to open a https URL where the site uses a self-signed certificate. Example: <?php $var=file('https://mail.xalan.com'); var_dump($var); ?> This script fails. All that gets printed out is bool(false) In the apache error logs I get the following message: [Tue Feb 4 18:10:28 2003] [error] PHP Warning: file() [<a href='http://www.php.net/function.file'>function.file</a>]: php_hostconnect: connect failed in /usr/local/apache/htdocs/test_ssl.php on line 3 [Tue Feb 4 18:10:28 2003] [error] PHP Warning: file(https://mail.xalan.com) [<a href='http://www.php.net/function.file'>function.file</a>]: failed to create stream: Connection timed out in /usr/local/apache/htdocs/test_ssl.php on line 3 However, if I substitute the URL with a site that uses a trusted certificate it works fine: <?php $var=file('https://www.wachovia.com'); var_dump($var); ?> './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-openssl=/usr/local/ssl' '--with-bz2' '--with-pspell' '--with-db3=/usr/lib' '--enable-ftp' '--with-gd' '--with-imap=/usr/local/imap-2002b' '--with-imap-ssl=/usr/local/imap-2002b' '--with-ldap' '--with-jpeg-dir=/usr/lib' '--with-xpm-dir=/usr/lib' '--with-freetype-dir=/usr/lib' '--enable-sigchild' '--with-gettext' '--with-mcrypt' '--with-xml' '--with-mysql=/usr/local/mysql' '--with-mhash' '--with-zlib' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--with-png-dir=/usr/lib' '--enable-mime-magic' Also my max_execution_time = 90000. The URL loads in less than 2 seconds when I use my browser.