Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cURL not complied with PHP - Alternatives?


Guest

Recommended Posts

Hi,

 

Almost about a year ago I found the best host I have ever dealt with...EVER. They have the best and most responsive customer and technical service I have ever experienced and their servers are very fast. I never have a speed issue even during peak times.

 

Recently, I came accross a dilemma....

 

I have 2 contribs I want to use which both require cURL to be complied with the host's PHP.

 

This host I found is great but they did not and will not compile cURL with PHP for whatever reason.

 

So, in an effort to keep this great host I found, I was wondering...

 

Is there anything I can do on my side in order to be able to use these copntribs even though my host did not compile cURL with PHP on their servers?

 

Thanks

Link to comment
Share on other sites

Many hosts will not compile PHP for a specific customer for support issues. You can request that they compile it in the next upgrade of PHP used by all customers.

 

Fortunately, my host told me that I could compile my own custom PHP "at my own risk." Perhaps (if you're paying a lot monthly) your host would let you compile your own PHP also.

 

Just my 2 cents,

Robert

Link to comment
Share on other sites

you can ask if they will install curl but not compile it, then you can call curl from within the program to use it.

 

if you have shell access, you MAY (probably not cuz of the host) search for curl

Link to comment
Share on other sites

you can ask if they will install  curl but not compile it, then you can call curl from within the program to use it.

 

If you have shell access, you MAY (probably not cuz of the host) search for curl

 

I see. I will have to see. I am not sure if they have cURL installed and just not compiled with PHP or i fthey just do not have cURL at all. I never asked them and they never said. I will ask and then come back here for more help if i need it (which I will because i have no idea how to "call curl from within the program".

 

If they do not even have cURL installed then i will have to find another host <_<

 

Thanks.

 

BTW, for the other poster, I want to install PayPal IPN and one of the FedEx modules (can't remmeber which one off the top of my head - it requires cURL).

Link to comment
Share on other sites

OK. So I found out that they do have cURL on their servers, just not compiled

with PHP.

 

So, let's just take the PayPal IPN contrib. What changes do I have to make to it to make it work with cURL that is not compiled with PHP? You say I have to call up cURL through my program so I am guessing that I need to get some sort of path from my host. (I remember seeing that somewhere here).

 

I'm sure it's not hard, I just never really dealt with this before.

 

Anyhow, any help would be greatly appreciated.

Link to comment
Share on other sites

OK.  So I found out that they do have cURL on their servers, just not compiled

with PHP.

 

So, let's just take the PayPal IPN contrib.  What changes do I have to make to it to make it work with cURL that is not compiled with PHP?  You say I have to call up cURL through my program so I am guessing that I need to get some sort of path from my host.  (I remember seeing that somewhere here).

 

I'm sure it's not hard, I just never really dealt with this before.

 

Anyhow, any help would be greatly appreciated.

 

I'm interested in learning how to call cURL also. My host tells me that compiling cURL on a FreeBSD server causes crashing so he won't do it either. If one can call cURL then that just might be the ticket to using some of these newer contributions. Thanks

Link to comment
Share on other sites

This paypal IPN mod uses sockets when php/curl functions are not installed.

http://www.oscommerce.com/community/contributions,1753

   if(!$curl_flag) {
     $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
     $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
     $header .= "Content-Length: ".strlen($this->_response_string)."\r\n\r\n";
     $socket = 'ssl://'; $port = '443';
     $fp = @fsockopen ($socket.$domain,$port, $errno, $errstr, 30);
     if(!$fp) {
       $socket = 'tcp://'; $port = '80';
       $fp = @fsockopen ($socket.$domain,$port, $errno, $errstr, 30);
     }
     .....

 

This FEDEX mod uses curl command line if selected in admin

 

http://www.oscommerce.com/community/contributions,1462

 

        $this->command_line = MODULE_SHIPPING_FEDEX1_CURL . " " . (MODULE_SHIPPING_FEDEX1_TIMEOUT == 'NONE' ? '' : '-m ' . MODULE_SHIPPING_FEDEX1_TIMEOUT) . " -s -e '" . STORE_NAME . "' --url https://" . $this->server . " -H 'Host: " . $this->server . "' -H 'Accept: image/gif,image/jpeg,image/pjpeg,text/plain,text/html,*/*' -H 'Pragma:' -H 'Content-Type:image/gif' -d '" . $data . "' 'https://" . $this->server . "'";
       exec($this->command_line, $this->reply);

 

 

The curl command line options can be found over here.

http://curl.haxx.se/docs/manpage.html

 

And simple usage description here.

http://curl.haxx.se/docs/httpscripting.html

 

A simple test to see if you have curl command line.

 

<?php
$result = `curl http://yahoo.com`;
echo $result;
?>

Link to comment
Share on other sites

Thanks. But I have to admit...this is all way over my head. I thought there was a simple solution to using these contribs when cURL is not compiled with PHP. I could swear I saw a post about this a year ago (when I did not really need the info) that pretty much had a simple solution but I cannot find it for the last 2 days.

 

If anyone knows of a simple solution/change that has to be made to code or whatever, I'd appreciate the info.

 

Again, thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...