Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 22nd, 2004, 04:28 PM
Authorized User
 
Join Date: Sep 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default fsockopen ssl failure: why?

I have a call to open a socket that works using tcp:

$s = fsockopen("tcp://siteaddr",80,$errno,$errmsg,20);

But if I change it to "ssl:"... it fails. $s comes back false, and $errno is 0. The doc says that this set of return values "is most likely due to a problem initializing the socket." Great.

Can someone suggest places to look to figure out what the problem might be? I have the openssl package enabled in php, if that matters.

If I go to a browser and invoke the site using "http" and "https" it works in both cases (but it does warn about ssl certificate issues if using https). Is this a clue, or is this irrelevant?

Thanks in advance...
-don
 
Old January 22nd, 2004, 05:13 PM
Authorized User
 
Join Date: Sep 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Some more info:
This is on PHP version 4.3.4, using the Windows binaries downloaded from the PHP.net site.
PHPINFO says OpenSSL Support is "enabled" and is version 0.9.7b. There are no other parameters shown in PHPINFO for openssl.

When I change the protocol from "tcp" to "ssl", I'm also changing the port to 443 (but 80 doesn't work either).
-don
 
Old January 23rd, 2004, 05:19 PM
Authorized User
 
Join Date: Sep 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This problem is solved... In case someone else sees this topic and wants to know what the answer is:

In another forum, I was referred to a comment at the bottom of the php manual page for "supported protocols and wrappers" (Appendix I). http://www.php.net/manual/en/wrappers.php

A user comment there notes that SSL doesn't work on Windows with the standard php4ts.dll, and it refers one to another site where a "fixed" dll can be downloaded. Did that, and everything started to work.

-don
 
Old September 16th, 2004, 05:21 PM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks dawg. That was very helpful.





Similar Threads
Thread Thread Starter Forum Replies Last Post
What is SSL varuna22 Beginning PHP 1 September 18th, 2008 08:13 AM
SSL on CF ( Trust Failure ) m2abhi25 .NET Framework 2.0 0 May 1st, 2007 05:18 AM
UPS servlet interaction with XML via PHP fsockopen karateka Pro PHP 2 October 20th, 2004 12:24 PM
get cookie info from other domain using fsockopen kamara Pro PHP 2 September 8th, 2004 06:26 AM
SSL shs BOOK: Beginning ASP.NET 1.0 0 August 24th, 2004 06:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.