JoeS Posted December 16, 2005 Posted December 16, 2005 I'm testing Paypal Pro with the credit card function and when I click on Confirm Order the page (checkout_confirm.php) hangs and then it errors: paypal.sandbox.test_api1.gmail.comjoes0SOAP-ENV:ServerInternal errorUnknown Fatal error: Maximum execution time of 30 seconds exceeded in c:\wamp\www\local.testing.com\site\catalog\paypal_wpp\includes\upc_direct_paypal.php on line 90 Fatal error: Maximum execution time of 30 seconds exceeded in c:\wamp\www\local.testing.com\site\catalog\includes\functions\sessions.php on line 37 Warning: Unknown: A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0 The 'Pay with Paypal' function seems to work though, it takes me right to the sandbox. Everything was working 'ok' with a few minor issues I thought I could resolve, but the above problem started when I enabled my curl extension in my php.ini file. I restarted my server, logged out and logged back in again after clearing my shopping cart to start over. My curl and SOAP are enabled by looking at my PHP server info. I'm not sure what that means: "A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0"?? Any ideas??
kgt Posted December 16, 2005 Posted December 16, 2005 I've never seen the: Warning: Unknown: A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0 I'm not sure how well CURL handles connection timeouts. It might be that it's not throwing a connection timeout and thus the script is exceeding max_execution_time. I've seen this happen with sockets. You said this might have started when you enabled CURL. I don't use/know paypal modules - are there CURL calls in checkout_confirmation.php? If so, run a simple script to check that CURL is working: <?php // create a new curl resource $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "http://www.google.com/"); curl_setopt($ch, CURLOPT_HEADER, 0); // grab URL and pass it to the browser curl_exec($ch); // close curl resource, and free up system resources curl_close($ch); ?> Contributions Discount Coupon Codes Donations
JoeS Posted December 16, 2005 Author Posted December 16, 2005 I've never seen the: Warning: Unknown: A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0 I'm not sure how well CURL handles connection timeouts. It might be that it's not throwing a connection timeout and thus the script is exceeding max_execution_time. I've seen this happen with sockets. You said this might have started when you enabled CURL. I don't use/know paypal modules - are there CURL calls in checkout_confirmation.php? If so, run a simple script to check that CURL is working: <?php // create a new curl resource $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "http://www.google.com/"); curl_setopt($ch, CURLOPT_HEADER, 0); // grab URL and pass it to the browser curl_exec($ch); // close curl resource, and free up system resources curl_close($ch); ?> Thanks for the tip kgt :) As soon as I get home I'll try your suggestion and see what the results are. On another note, after combing the forum for a similar incident, it dawned on me that I haven't configured any type of ssl on my local server (I'm developing locally). Can this be the issue even though I'm using the sandbox for testing?? If it might be, can someone please explain what I need to do to enable/install ssl on apache? I just hope it's not above my expertise to get this issue resolved :( Thanks everyone!
JoeS Posted December 16, 2005 Author Posted December 16, 2005 I'm not sure how well CURL handles connection timeouts. It might be that it's not throwing a connection timeout and thus the script is exceeding max_execution_time. I've seen this happen with sockets. kgt... I saw that you mentioned that you've seen this before with sockets, can it be related to ssl do you think??
kgt Posted December 16, 2005 Posted December 16, 2005 It's unlikely. The way CURL works is that it pretends to be a browser, if you will. So it connects to paypal and sends the relevant information like it's a real person entering information into a form. Paypal processes it like normal and sends back HTML or whatever it's normal output is. If paypal requires SSL, then your server is required to have something like OpenSSL or the like. It doesn't require a certificate, just the ability to speak the language. You can check by looking at your php info under the CURL section: CURL Information: libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.1.4 If it has OpenSSL, then you're set. I wouldn't expect this to be the issue, however. I'd expect a fatal error, not a time-out. There could be something wrong with one of the libraries though. That's why you should test whether you can successfully connect to an external site using curl. Even better, modify my example to connect to paypal. Contributions Discount Coupon Codes Donations
JoeS Posted December 17, 2005 Author Posted December 17, 2005 It's unlikely. The way CURL works is that it pretends to be a browser, if you will. So it connects to paypal and sends the relevant information like it's a real person entering information into a form. Paypal processes it like normal and sends back HTML or whatever it's normal output is. If paypal requires SSL, then your server is required to have something like OpenSSL or the like. It doesn't require a certificate, just the ability to speak the language. You can check by looking at your php info under the CURL section: CURL Information: libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.1.4 If it has OpenSSL, then you're set. I wouldn't expect this to be the issue, however. I'd expect a fatal error, not a time-out. There could be something wrong with one of the libraries though. That's why you should test whether you can successfully connect to an external site using curl. Even better, modify my example to connect to paypal. Hi kgt... I frantically changed many settings to get this fixed and I succeded! (Don't ask me what was the actual fix) :thumbsup: I think it was related to the Paypal sandbox account settings, whatta bitch that is! I cannot believe what they make you go through just to create a functional test account. They should be shot and quartered... But thanks for all your help and advice. BTW, your CURL script did exactly as it should have, both on Google and Paypal. Appreciated J /^^@^^\
user99999999 Posted December 17, 2005 Posted December 17, 2005 For Curl/SSL on Windows you need the ca-bundle.crt curl_setopt($ch, CURLOPT_CAINFO, "c:/www/catalog/includes/ca-bundle.crt"); http://www.oscommerce.com/forums/index.php?showtopic=90086
Recommended Posts
Archived
This topic is now archived and is closed to further replies.