Posted by wxman on July 6, 2009 at 2:35am
Jump to:
| Project: | Ubercart |
| Version: | 7.x-3.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
When I try to activate Paypal payments, it fails with:PayPal WPP requires the PHP cURL library. (Currently using cURL Not found)
I'm running on a Linux Ubuntu server I made myself, and I know that cURL is installed:
curl 7.18.0 (x86_64-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libzAny ideas how to get around this. I really need to get Paypal working.
Comments
#1
No, you do not have the "PHP cURL library" installed. That error message contains a link - if you click on a link it takes you to the page at php.net which explains exactly what you have to do to install PHP cURL.
#2
I already did try that, but something seems to be wrong with the install for Ubuntu apt-get install php5-curl. It comes back with all kinds of warnings. I have to figure out what's going on there.
#3
#4
I was finally able to fix this. It ended up that I accidentally installed the wrong version of one of the php libraries. The only way to fix it was to uninstall php5-common, which was what got installed by mistake, and all associated with it. Then I reinstalled all the php5 files over again from the correct sources. Now it all works.
#5
Glad to hear it. : )
#6
For debian, and probably the same for Ubuntu, you would need to reconfigure php5-curl:
#dpkg-reconfigure php5-curl
Then, restart the web server:
#/etc/init.d/apache2 restart
It fixed my problem!
#7
Easier than what I did.
#8
Comment #6 does appear to be the fix for this problem. The issue has been reported as a bug in Ubuntu.
As a workaround, simply type the following at a command prompt:
#sudo dpkg-reconfigure php5-curl
#sudo /etc/init.d/apache2 restart
You can follow updates to this issue in Launchpad at Bug #428650.
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/428650
#9
I had the same problem, but was unable to run 'dpkg-reconfigure php5-curl' because I did not have the package installed. However, activating the module directly in the database seems to also work.
I changed the database and modified the table 'system'. Here I activated the paypal module by changing 'status' to '1' for 'uc_paypal'
UPDATE system SET status=1 WHERE name='uc_paypal';
I am not sure if there are any after effects for this, but it seems to work. I tried payments using the paypal sandbox and live, and it worked without problems.
update:
After checking some more I found that I was wrong and this does not work on a clean install. The site that did work had some extra modules installed, among these were uc_views and uc_advanced_catalog. Installing these modules and duplicating the settings took away the need for curl (which I could not install), but for sure this is not the best way to solve things.
#10
I think cURL dependency should be more clear in the main page of ubercart since most of people are going to use paypal.
#11
Am experiencing similar problem here and am not good with programming or understanding how to go about getting curl....i dont seem to understand the installation/configuration guidlines on php.net
* Authorize.net requires the PHP cURL library. (Currently using cURL Not found)
* Cybersource's Silent Order POST requires the PHP cURL library. (Currently using cURL Not found)
* PayPal WPP requires the PHP cURL library. (Currently using cURL Not found)
Please can anyone help me with relevant information on how to solve this problem?
#13
Got the same issue... Can I install it on the server if I don't have access to it (share host) ?
#14
As this issue has been bumped several times even though it's closed, I am reopening and retitling it; it should be possible to use drupal_http_request() on all servers, instead of cURL which is not available on all PHP environments.
#15
drupal_http_request() is a dysfunctional function - it has known problems dating back 7+ years. I presume this is why a lot of modules use cURL - I know that's why *I* use cURL in some of *my* modules. In particular, for my Canada Post module, the Canada Post web server doesn't support HTTP 1.0 requests which is all drupal_http_request() can do even though HTTP 1.1 has been available for 11+ years! (I can't type enough exclamation points here to emphasize how incredible that is ...) Relying on cURL, which is actively developed by a much wider user base than just the Drupal community, and which is frequently updated, seems like a good decision as opposed to the ad hoc re-inventing of the wheel through drupal_http_request().
I think it's sufficient to put the cURL test in hook_requirements() as is currently done. A webhost which doesn't or won't support cURL or OpenSSL (implicitly required for drupal_http_request() in order to use the HTTPS protocol) or increased PHP memory limits etc. is just not suitable for running an Ubercart store. IMO of course. I prefer to move this back to "won't fix".
#16
problem:
PayPal WPP requires the PHP cURL library. (Currently using cURL Not found)
solution:
thats it...
#17
Definitely not going to happen in 6.x-2.x.
Drupal 8.x will be getting rid of drupal_http_request() entirely.
So the only remaining question is should this be done in Ubercart 7.x-3.x. My answer is that it certainly won't be done before 7.x-3.0 is released - messing around with something fundamental this late in the release cycle is a very bad idea. If someone wants to work on this AFTER 3.0 is released, then feel free to re-open this issue if you can provide a patch AND TESTS for the PayPal module to make sure everything works. But as I said in #15, I don't think it's worth the effort to replace a piece of code that works perfectly well (cURL) with one that has many known problems (drupal_http_request()). If you don't have or can't get cURL then you have bigger things to worry about than this ...