473,387 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

cURL, PHP, and SSL

I'm using php 5.1.2 on apache 2.0.54 and am trying to use curl to
connect to an ssl server. Curl works fine using http, and the
command-line client works with https. But, in php, I just get error 7
when trying to connect through https. So, the problem would seem to be
with php's bundled curl support. I am on WinXP, and everything is
installed through binaries. Here's an example of my code:

$ch = curl_init("https://login.yahoo.com");

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

curl_exec($ch);
curl_close($ch);

Here's partial output from curl_version():

[version_number] => 462336
[age] => 2
[features] => 540
[ssl_version_number] => 0
[version] => 7.14.0
[host] => i386-pc-win32
[ssl_version] => OpenSSL/0.9.8a
[libz_version] => 1.2.3
[protocols] =>
[0] => ftp
[1] => gopher
[2] => telnet
[3] => dict
[4] => ldap
[5] => http
[6] => file
[7] => https
[8] => ftps

I notice that although I have an entry for ssl_version, I just have "0"
for ssl_version_number. Looking at others' outputs on the web, it looks
like most people have a non-zero value there.

As far as I can tell, I have all the pertinent dlls (libssl32,
ssleay32, libeay32) in the right place (all over after all my attempts
to fix this). My apache is not set up for ssl, but since php/curl is
the client, that should be irrelevant.

Many thanks to anyone who knows the solution to this and will share it.

Josh

Mar 10 '06 #1
0 1484

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Haluk Durmus | last post by:
Hello I checked out openssl,mm,apr,apr-util,apache 2,curl,libxml and php from cvs. php couse an ERROR I did the following steps:
8
by: mrbog | last post by:
1. In order to make an http (or https) request with PHP, I need to recompile php with cURL. 2. In order to install CURL I have to upgrade my openssl rpm, even though I'm runing a version of...
3
by: Chris Fortune | last post by:
# uname -a Linux stargate.mxc-online.net 2.4.20-021stab022.2.777-smp #1 SMP Wed Jul 28 17:12:37 MSD 2004 i686 i686 i386 GNU/Linux I recompiled PHP with mcrypt, openssl, and curl phpinfo():...
3
by: Hans | last post by:
Hi everybody, I am desperately trying to log into my account at godaddy.com with PHP and Curl and just cannot make it happen. Has anybody written a script for this purpose? Here is what I...
6
by: Shutdownrunner | last post by:
I want to store result of curl in a variable, which means to store a webpage in a variable in order to parse it later and get our some useful information. But unfortunately I'm not too experienced...
0
by: nfhm2k | last post by:
I've been trying to find a solution to this for quite some time now... I even took a look at existing scripts... Including this one......
4
by: Terry | last post by:
I'm using curl to invoke a php script on the same site/server. It works great, but if I call it again while it's still running, nothing happens. Why? Can that be fixed? Why use curl? To make...
4
by: zorro | last post by:
Hello there, I can't figure out why is it that when i use an array for my postfields it doesn't work : this works curl_setopt($curl, CURLOPT_POSTFIELDS, "clown=bozo" ); this doesn't...
0
by: xerc | last post by:
I am trying to create a generic function I can call to download all files from a single remote FTP directory -- using CURL. I want to multi-thread it, but need to get the single thread functionality...
3
by: rottmanj | last post by:
I am re-writing my rets application in perl, and I have found a few modules that will help me on my way. One of them being WWW::Curl:easy. During my testing, I have tested both system curl and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.