how are we doing on this?!?... this'd be my last try to seek help here... i did on a few other mailing lists and forums but nobody has anything to say... i guess i'd never get ssl connection with php regardless of what it's in the documentation on the php.net site...
On Tue, 25 Mar 2003, Kalin Mintchev wrote: > > part 2: > ----------- > > got curl 7.10.3 (latest version)... > recompiled php 4.3.1 with curl. no errors. shows up fine on phpinfo... > testing with: > > $ch = curl_init ("http://moo.org"); > $fp = fopen("http://moo.org/index.html", "r"); > > curl_setopt ($ch, CURLOPT_FILE, $fp); > > curl_setopt ($ch, CURLOPT_HEADER, 0); > > curl_exec ($ch); > curl_close ($ch); > > while (!feof($fp)) { > echo fgets ($fp,128); > } > > fclose ($fp); > > the file i get back is not the whole file. it comes from the middle or so > down. i need this to retrieve xml files through https. tried one of those > files without https - just http - got the last part of the file back. it > cuts off somewhere...... > > i was really happy with fopen() and fsockopen() until the https came up... > > i've been stuck on this for the last 2 days and i really need some kind of > solution... it's very frustrating that neither of those 3 options in php > work as expected or documented with the openssl options..... > > i tested curl on the command line and it works fine. no cut offs of > documents anywhere.... > > please help!!!!!!!!... > > is there any bugs known anywhere between curl 7.10.3 + php 4.3.1 on > freeBSD 4.6? > > > > > > hi all, > > > > i have problems getting fopen() and fsockopen() to work over https.. > > > > here is the problem.. > > > > from the phpinfo: > > > > OpenSSL support enabled > > OpenSSL Version OpenSSL 0.9.6h 5 Dec 2002 > > > > from php -m > > > > # php -m > > [PHP Modules] > > ctype > > mysql > > openssl > > overload > > pcre > > posix > > session > > standard > > tokenizer > > xml > > > > [Zend Modules] > > > > > > from the Appendix I regarding fopen() on php.net: > > > > Note: HTTPS is supported starting from PHP 4.3, if you have compiled in > > support for OpenSSL. > > > > and from the documentation on fsockopen() on php.net: > > As of PHP 4.3.0, if you have compiled in OpenSSL support, you may prefix > > the hostname with either 'ssl://' or 'tls://' to use an SSL or TLS client > > connection over TCP/IP to connect to the remote host. > > > > in a test file i have two lines of code like this: > > > > $file = "https://someurl.com"; > > if (!($fp = fopen($file, "r"))) > > > > this produces an error but it doesn't point to any problem - like this: > > Warning: fopen(https://someurl.com.......... in /path/to/file.php on line > > 45 > > > > if i change $file to "http://someurl.com" it works fine... > > > > with fsockopen() the situation is kinda the same. code: > > $fp=fsockopen("ssl://www.foo.com", 443); > > > > error: > > Warning: fsockopen() [function.fsockopen]: no SSL support in this build in > > /path/to/file/... > > > > if i pul out the ssl:// part it works fine... > > > > now, i did read the posts on this list about curl. why curl isn't > > mentioned anywhere in the documentation for fopen() and fsockopen() if > > it's needed for those functions? > > why would i need curl compiled in php if i already have openssl compiled with > > it? > > > > the machine i'm using is a freeBSD 4.6 box with apache 1.3.27 and OpenSSL > > 0.9.6h, php is 4.3.1... > > > > i did similar posts on other php lists but everybody's quite.. > > > > thanks > > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php