Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 22nd, 2004, 04:28 PM
Authorized User
 
Join Date: Sep 2003
Location: , MA, USA.
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
Reply With Quote
  #2 (permalink)  
Old January 22nd, 2004, 05:13 PM
Authorized User
 
Join Date: Sep 2003
Location: , MA, USA.
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
Reply With Quote
  #3 (permalink)  
Old January 23rd, 2004, 05:19 PM
Authorized User
 
Join Date: Sep 2003
Location: , MA, USA.
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
Reply With Quote
  #4 (permalink)  
Old September 16th, 2004, 05:21 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks dawg. That was very helpful.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:12 PM.


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