When I checkout from my cart and completed the payment through Paypal (Standard) I should get returned to my web-site to show success-status of payment. But instead I get a fatal error, something like
Fatal error: Call to undefined function file_get_contents_curl() in ....\catalog\controller\payment\pp_standard.php on line 261
If I go to line 498 and make the function file_get_contents_curl private, this error doesn't appear anymore but I am returned to the WEB site as I should.
I have just tested this a few times, so can't say 100% sure if it is consistent.
Another thing I am wondering about is that the php.ini file specifies
allow_url_fopen = on
But even so, the code ends up at line 261 with the file_get_contents_curl instead of 2 lines up with file_get_contents. I haven't checked the code that carefully so don't know, there might be a good reason for that.
Does this make sense, or is everything complete rubbish? In that case, why do I get that fatal error.
file_get_contents() is the preferred way to get data from a url, but for those where allow_url_fopen = off it blows up.
Curl is become more widely used so I added the additional option of file_get_contents_curl() which does the same thing as file_get_contents(), but uses curl instead of fsock.
Even tho the php.ini file has allow_url_fopen = on, it doesn't mean your host allows that setting to be overridden like that so the code sees that disabled.
But there is a bug... that line
should be:
Curl is become more widely used so I added the additional option of file_get_contents_curl() which does the same thing as file_get_contents(), but uses curl instead of fsock.
Even tho the php.ini file has allow_url_fopen = on, it doesn't mean your host allows that setting to be overridden like that so the code sees that disabled.
But there is a bug... that line
Code: Select all
$response = file_get_contents_curl($url . '?' . $request);
Code: Select all
$response = $this->file_get_contents_curl($url . '?' . $request);
Who is online
Users browsing this forum: Amazon [Bot] and 3 guests