Guest Posted February 9, 2005 Share Posted February 9, 2005 I found an interesting bug while using CURL, Apache2, PHP4 on a Win32 box just now. I have my osC stores running with the LinkPoint add-on module (which I've had to modify greatly to work right). I noticed weird dumpings in to my apachelogs. Well, long story short, I'm using the command-line CURL calls since the PHP CURL calls dont work so hot with Win32 at the moment. You may recognize something like: $result = shell_exec("$cpath -s -E \"$key\" -m 90 -d \"$xml\" $host"); Well, I added the -s parameter in to this call. This forces CURL in to silent mode and disables the progress bar etc which was finding its way in to my Apache logs for some reason (stdout conflict?) Im not sure if recent versions of the Linkpoint module contain any such fixes (I dont remember what I fixed, there was a Subtotal non-matching bug due to some mixed up HTTP fields on linkpointms1 module and some other issues with like GV&CC add-on and such). I should keep better track of what I fix to help others but unfortunately Im always under a crunch for work hehe. But yeah, I recommend the -s param on CURL calls. Probably for *nix too. Quote Link to comment Share on other sites More sharing options...
mindpower Posted February 22, 2005 Share Posted February 22, 2005 I'm not a programmer, but I can still fix some code. I have exact some error. Linkpoint API gives me an error CURL could not be executed. can you, please, give better instructions on where shall I fix the code you provided? what file and what line? thank you, your help will be greatly appreciated Quote Link to comment Share on other sites More sharing options...
Guest Posted March 27, 2005 Share Posted March 27, 2005 I'm not a programmer, but I can still fix some code. I have exact some error. Linkpoint API gives me an error CURL could not be executed. can you, please, give better instructions on where shall I fix the code you provided? what file and what line? thank you, your help will be greatly appreciated <{POST_SNAPBACK}> I am getting the same error ~ please help . . . Quote Link to comment Share on other sites More sharing options...
Guest Posted March 28, 2005 Share Posted March 28, 2005 I don't know. There are several reasons it's not working. Yeah, I had these same problems when I tried to use the module. I can't really provide code since I've rewritten a lot of the module for my purposes. Even the new linkpoint module recently posted still has some bugs in terms of handling addresses, the subtotal when using CCGV add-on, etc. Honestly, you probably need a good programming handle with osC to make linkpoint work well at this point. Anyway. If you're on a windows platform, just forget about using Curl functions through PHP. It just *doesnt* work right with SSL. Thats why I moved to the command line variants (you can enable this in lpphp). The could not curl problem happens for several reasons itself. The first thing i did was add some debugging and echo out some more reasonable error messages based on where the problem is. I *highly* recommend trying to perform the Curl manually to linkpoint. Download Curl, install it on a directory somewhere and from the command line, try to Curl connect to linkpoint and send some sample XML. This is the BEST way to make sure your PEM and SSL stuff is working properly. You'll also see much better error messages from the command line. Understand the curl flags and make sure you have it in verbose mode, not silent mode. Thats really all I can say without more info to go on. Quote Link to comment Share on other sites More sharing options...
OceanRanch Posted March 28, 2005 Share Posted March 28, 2005 As I recall on an install I did, the "Curl could not be excecuded" message is generated when a NULL return comes back from the Curl call. Curl may be setup just fine. In my case Curl just couldn't get past the firewall I had setup. The documentation indicated that a certain port (i'm guessing at 1029) needed to be open for it to communcate with linkpoint. As Tom (PlayerO) indicated, the best way is to perform the test API functions at the command line in verbose debug mode and you'll see what's happening much more clearly. HTH Tom Quote Link to comment Share on other sites More sharing options...
walkman Posted September 8, 2005 Share Posted September 8, 2005 BTW, the default port curl wants to use is '1129'. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.