[PHP] Help needed with Curl

2007-07-24 Thread Bosky, Dave

I downloaded a copy of PHP Version 5.2.3 and installed it on Windows
2003. 
Everything seems to work fine except for Curl. 
--
PHP Version 5.2.3
cURL support  enabled  
cURL Information  libcurl/7.16.0 OpenSSL/0.9.8e zlib/1.2.3  
--
It keeps returning this error message.
Reason 'CURL error: error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol'


The code works one machine that has the following setup 
--
PHP Version 5.1.0
cURL support  enabled  
cURL Information  libcurl/7.14.0 OpenSSL/0.9.8b zlib/1.2.3  
--

Do I need to download any other packages for Curl to work? What the heck
am I missing?

Thanks,
Dave

**
HTC Disclaimer:  The information contained in this message may be privileged 
and confidential and protected from disclosure. If the reader of this message 
is not the intended recipient, or an employee or agent responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify us 
immediately by replying to the message and deleting it from your computer.  
Thank you.
**

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Help needed with Curl

2007-07-24 Thread Bosky, Dave
Yes. The script is the same on both machines.
I can pull up a web browser and connect to the ssl url that I'm trying
to connect using php/curl. 
The only DLLs I need to add are libeay.dll, ssleay32.dll, right?

I'm running Windows 2003 Server with IIS 6.0



-Original Message-
From: Daniel Brown [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 24, 2007 9:01 AM
To: Bosky, Dave
Cc: php-general@lists.php.net
Subject: Re: [PHP] Help needed with Curl

On 7/24/07, Bosky, Dave [EMAIL PROTECTED] wrote:

 I downloaded a copy of PHP Version 5.2.3 and installed it on Windows 
 2003.
 Everything seems to work fine except for Curl.
 --
 PHP Version 5.2.3
 cURL support  enabled
 cURL Information  libcurl/7.16.0 OpenSSL/0.9.8e zlib/1.2.3
 --
 It keeps returning this error message.
 Reason 'CURL error: error:140770FC:SSL 
 routines:SSL23_GET_SERVER_HELLO:unknown protocol'


 The code works one machine that has the following setup
 --
 PHP Version 5.1.0
 cURL support  enabled
 cURL Information  libcurl/7.14.0 OpenSSL/0.9.8b zlib/1.2.3
 --

 Do I need to download any other packages for Curl to work? What the 
 heck am I missing?

 Thanks,
 Dave

 **
 HTC Disclaimer:  The information contained in this message may be
privileged and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited.  If you have received this
communication in error, please notify us immediately by replying to the
message and deleting it from your computer.  Thank you.
 **

 --
 PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
 http://www.php.net/unsub.php



That actually looks like an OpenSSL problem (despite the fact that
PHP 5.2.3 does have a lot of poorly-made changes, in my opinion),
suggesting that it's attempting to provide (or retrieve) something via
an SSL/HTTPS connection where there is no encryption.

Is the script you're attempting to run the exact same on both
machines?  Can Machine A connect to Machine B and vice-versa using
cURL/SSL in combination with your script?  What do the Apache logs say?

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help needed with Curl

2007-07-24 Thread Daniel Brown

On 7/24/07, Bosky, Dave [EMAIL PROTECTED] wrote:


I downloaded a copy of PHP Version 5.2.3 and installed it on Windows
2003.
Everything seems to work fine except for Curl.
--
PHP Version 5.2.3
cURL support  enabled
cURL Information  libcurl/7.16.0 OpenSSL/0.9.8e zlib/1.2.3
--
It keeps returning this error message.
Reason 'CURL error: error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol'


The code works one machine that has the following setup
--
PHP Version 5.1.0
cURL support  enabled
cURL Information  libcurl/7.14.0 OpenSSL/0.9.8b zlib/1.2.3
--

Do I need to download any other packages for Curl to work? What the heck
am I missing?

Thanks,
Dave

**
HTC Disclaimer:  The information contained in this message may be privileged 
and confidential and protected from disclosure. If the reader of this message 
is not the intended recipient, or an employee or agent responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify us 
immediately by replying to the message and deleting it from your computer.  
Thank you.
**

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




   That actually looks like an OpenSSL problem (despite the fact that
PHP 5.2.3 does have a lot of poorly-made changes, in my opinion),
suggesting that it's attempting to provide (or retrieve) something via
an SSL/HTTPS connection where there is no encryption.

   Is the script you're attempting to run the exact same on both
machines?  Can Machine A connect to Machine B and vice-versa using
cURL/SSL in combination with your script?  What do the Apache logs
say?

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help needed with Curl

2007-07-24 Thread Daniel Brown

On 7/24/07, Bosky, Dave [EMAIL PROTECTED] wrote:

Yes. The script is the same on both machines.
I can pull up a web browser and connect to the ssl url that I'm trying
to connect using php/curl.
The only DLLs I need to add are libeay.dll, ssleay32.dll, right?

I'm running Windows 2003 Server with IIS 6.0


   I believe so.

   In order to enable cURL on a Windows box, you have to copy
libeay32.dll and ssleay32.dll from the DLL folder of the PHP/ binary
package to the SYSTEM folder. (to be safe, you may want to do both
C:\WINDOWS\SYSTEM\ and C:\WINDOWS\SYSTEM32\, but I think Windows
allows you to `copy *.dll C:\%SYSTEM%  - I'm a *nix guy, but I think I
remember doing that on Windows a while back).

   Then edit php.ini to remove the semicolon from the front of this line:
   extension=php_curl.dll

   That *should* do it, but I'm sure you've already done all of that,
so beyond that point, I'm not really sure what could be causing the
protocol error.  In either case, I think it's definitely an SSL error
as opposed to a cURL/PHP one.

   Sorry I'm not being much help on this one

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[2]: [PHP] Help needed with Curl

2007-07-24 Thread Richard Davey
Hi Daniel,

Tuesday, July 24, 2007, 2:34:06 PM, you wrote:

 In order to enable cURL on a Windows box, you have to copy
 libeay32.dll and ssleay32.dll from the DLL folder of the PHP/ binary
 package to the SYSTEM folder. (to be safe, you may want to do both
 C:\WINDOWS\SYSTEM\ and C:\WINDOWS\SYSTEM32\, but I think Windows
 allows you to `copy *.dll C:\%SYSTEM% - I'm a *nix guy, but I think
 I remember doing that on Windows a while back).

*Never* put PHP DLLs into the Windows System folder.
It's neither required, nor sensible.

Keep them where they belong - in your PHP folder.

 Then edit php.ini to remove the semicolon from the front of this
 line: extension=php_curl.dll

He must have already done this to see the output in phpinfo.

Dave - As well as the OpenSSL DLL do you also have a local certificate
created? (curl-ca-bundle.crt by default)

http://curl.netmirror.org/docs/sslcerts.html

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[2]: [PHP] Help needed with Curl

2007-07-24 Thread Daniel Brown

On 7/24/07, Richard Davey [EMAIL PROTECTED] wrote:

*Never* put PHP DLLs into the Windows System folder.
It's neither required, nor sensible.

Keep them where they belong - in your PHP folder.



   Heh which is why I prefer to stick with what I know which
is not so much with Windows servers, to be honest.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[4]: [PHP] Help needed with Curl

2007-07-24 Thread Richard Davey
Hi Daniel,

Tuesday, July 24, 2007, 3:57:11 PM, you wrote:

 On 7/24/07, Richard Davey [EMAIL PROTECTED] wrote:
 *Never* put PHP DLLs into the Windows System folder.
 It's neither required, nor sensible.

 Keep them where they belong - in your PHP folder.


 Heh which is why I prefer to stick with what I know which
 is not so much with Windows servers, to be honest.

It's not just you - there are tutorials and mailing list posts all
over the net that impart the same advice. So I'm not surprised that
you recommended it, you probably picked it up as a byproduct of
someone else's flawed recommendation long ago :)

As a Linux person - think of the absolute *last* possible root only
place that you could ever stick a PHP library into, with the most risk
to security possible. That is the equivalent of C:\Windows\System.

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[4]: [PHP] Help needed with Curl

2007-07-24 Thread Daniel Brown

On 7/24/07, Richard Davey [EMAIL PROTECTED] wrote:

Hi Daniel,

Tuesday, July 24, 2007, 3:57:11 PM, you wrote:

 On 7/24/07, Richard Davey [EMAIL PROTECTED] wrote:
 *Never* put PHP DLLs into the Windows System folder.
 It's neither required, nor sensible.

 Keep them where they belong - in your PHP folder.


 Heh which is why I prefer to stick with what I know which
 is not so much with Windows servers, to be honest.

It's not just you - there are tutorials and mailing list posts all
over the net that impart the same advice. So I'm not surprised that
you recommended it, you probably picked it up as a byproduct of
someone else's flawed recommendation long ago :)

As a Linux person - think of the absolute *last* possible root only
place that you could ever stick a PHP library into, with the most risk
to security possible. That is the equivalent of C:\Windows\System.


   /me nods.

   Makes perfect sense to me when you put it that way.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: Re[2]: [PHP] Help needed with Curl

2007-07-24 Thread Bosky, Dave
No I don't have a local certificate created.
I'm only need to do a post using xml-rpc and I have SSLVerifyPeer turned
off. This turns off client certificate authentication 
$xmlrpc_client-setSSLVerifyPeer(0); 


-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 24, 2007 10:56 AM
To: Daniel Brown
Cc: Bosky, Dave; php-general@lists.php.net
Subject: Re[2]: [PHP] Help needed with Curl

Hi Daniel,

Tuesday, July 24, 2007, 2:34:06 PM, you wrote:

 In order to enable cURL on a Windows box, you have to copy 
 libeay32.dll and ssleay32.dll from the DLL folder of the PHP/ binary 
 package to the SYSTEM folder. (to be safe, you may want to do both 
 C:\WINDOWS\SYSTEM\ and C:\WINDOWS\SYSTEM32\, but I think Windows 
 allows you to `copy *.dll C:\%SYSTEM% - I'm a *nix guy, but I think I 
 remember doing that on Windows a while back).

*Never* put PHP DLLs into the Windows System folder.
It's neither required, nor sensible.

Keep them where they belong - in your PHP folder.

 Then edit php.ini to remove the semicolon from the front of this
 line: extension=php_curl.dll

He must have already done this to see the output in phpinfo.

Dave - As well as the OpenSSL DLL do you also have a local certificate
created? (curl-ca-bundle.crt by default)

http://curl.netmirror.org/docs/sslcerts.html

Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window


**
HTC Disclaimer:  The information contained in this message may be privileged 
and confidential and protected from disclosure. If the reader of this message 
is not the intended recipient, or an employee or agent responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify us 
immediately by replying to the message and deleting it from your computer.  
Thank you.
**

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[4]: [PHP] Help needed with Curl

2007-07-24 Thread Richard Davey
Hi Dave,

Tuesday, July 24, 2007, 4:45:13 PM, you wrote:

 No I don't have a local certificate created.
 I'm only need to do a post using xml-rpc and I have SSLVerifyPeer turned
 off. This turns off client certificate authentication 
$xmlrpc_client-setSSLVerifyPeer(0); 

What does your PHP error log show-up? (if anything)

I assume that the site you are sending the RPC request to requires it
to be delivered over SSL? (is it the very same site that worked in the
previous build of PHP, but not this one?)

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php