2

I have a dev VM running Ubuntu 11.10, and can't get PHP cUrl requests to work for SSL urls. No problem using cUrl for SSL or non-SSL urls over the CLI, or non-SSL urls through PHP cUrl. Only SSL urls via cUrl in PHP. When I attempt any SSL request, I get Chrome's Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data. error.

I've been able to narrow down the problem: in the server error log I found the entry:

[Thu Feb 23 10:07:38 2012] [notice] child pid xxxx exit signal Segmentation fault (11)

corresponding to my attempted ssl curl requests. Searching around yielded the following bug pointing to OpenSSL: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/590639 One apt-get upgrade openssl later, and I'm on openSSL 1.0.0e. But I'm still having the same problem. I think I may be coming up against a lack of familiarity with the minutia of configuring Zend/Apache2.

Interestingly, looking in the Zend admin panel, I see:

curl

  • cURL support: enabled
  • cURL Information: libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3

but also:

openssl

  • OpenSSL support: enabled
  • OpenSSL Version: OpenSSL 0.9.8o 01 Jun 2010

Can anyone point me in the direction I need to look to get this straightened out? I'm a recovering Windows .aspx developer, so the answer might well be stoopid and obvious.

And yes, I did consider Server Fault first, but came back here since I think a fellow developer might be more likely to have had to troubleshoot this.

Paul Degnan
  • 1,972
  • 1
  • 12
  • 28
  • I use Ubuntu (with Apache2) as my dev computer, and I know I've run into a few problems because there is actually two versions of the php.ini. One for the main web server, and the other for the command line. I've had things work in the browser and not on the CLI only to find out it is disabled in the other php.ini for the CLI. Maybe have a gander at that? – Jeremy Harris Feb 23 '12 at 15:50
  • Updating my own post -- One thing I notice is that the "Configure Command" entry on the PHPInfo page still shows the old version of OpenSSL. Configure Command [snip] '--with-openssl=/usr/local/openssl-0.9.8o' [snip] I'm not entirely clear on how to change that, but I've stayed away from it because I think it means recompiling PHP. (I'm trying to stay with a standard Zend Server install so as to stay aligned with production.) I have tried putting in a symlink from the path listed in the "Configure Command" switch to the path where I find OpenSSL on my VM, but that hasn't helped. – Paul Degnan Feb 27 '12 at 14:24
  • Also, might be worth noting, only happens for me when `mod_ssl` is enabled for Apache, turn it off and you can request `https` with `curl`. – Tim Lytle Mar 09 '12 at 04:53

2 Answers2

2

recently i found the solution, if you delete this file zend/lib/libcurl.so.4.2.0 and then stop and start apache CURL will works for the https protocol

1

Have you updated Zend Server, what version are you running? When PHP is compiled, those libraries are built into PHP so upgrading the SSL lib files won't have any effect unless PHP is recompiled. Since you use Zend Server, you have to get a newer version of Zend Server.

There are several other people with the same issue that I suspect are all using Zend Server. Some of them indicate it in the topics, one doesn't but I think it is Zend Server as well.

I didn't find any specific details as to whether or not newer versions of Zend Server actually fix this issue, but I would try upgrading to a newer version if you haven't already.

drew010
  • 68,777
  • 11
  • 134
  • 162
  • Yes, I've tried that; I think I upgraded from 5.5 to 5.6. Still shows the previous same version of OpenSSL, openssl-0.9.8o. I've been trying to avoid recompiling PHP, but it's starting to look like there's no way around it. – Paul Degnan Mar 05 '12 at 15:20