Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Headers are showing up in apache error log (curl and paypal)

I just noticed in my error logs that whenever I make a request to the PayPal API (using php+curl), some of the returned headers are showing up in my apache error log (not access log). As far as I can tell, this particular request has been filling up my logs since the beginning (few months now) but I just noticed it today for the first time. Now I know that this isn't a big problem by any means, but something I'd be happy to get rid of since it would make troubleshooting other issues easier.

First, here are the error logs:

[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] * About to connect() to api-3t.paypal.com port 443 (#0)
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] *   Trying 66.211.168.126... * connected
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] * Connected to api-3t.paypal.com (66.211.168.126) port 443 (#0)
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] * SSL connection using DES-CBC3-SHA
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] * Server certificate:
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] * \t subject: /C=US/ST=California/L=San Jose/O=PayPal, Inc./OU=Information Systems/CN=api-3t.paypal.com
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] * \t start date: 2009-09-24 00:00:00 GMT
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] * \t expire date: 2011-09-19 23:59:59 GMT
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] * \t issuer: /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)09/CN=VeriSign Class 3 Secure Server CA - G2
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] * SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] > POST /nvp HTTP/1.1\r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] Host: api-3t.paypal.com\r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] Accept: */*\r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] Content-Length: 217\r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] Content-Type: application/x-www-form-urlencoded\r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] \r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] < HTTP/1.1 200 OK\r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] < Date: Thu, 17 Mar 2011 20:14:57 GMT\r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] < Server: Apache\r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] < Content-Length: 1162\r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] < Connection: close\r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] < Content-Type: text/plain; charset=utf-8\r
[Thu Mar 17 15:14:19 2011] [error] [client 192.168.1.21] * Closing connection #0

Even if I make the request using their sample code, the errors still show up. I even have the SSL_VERIFYPEER and SSL_VERIFYHOST curl options turned off in hopes that the ssl (which is valid still) was causing the issues. I've tried other curl requests (not via ssl though) and they don't show up in the error logs.

Can anyone help me pinpoint the issue?

like image 961
Brandon0 Avatar asked Dec 27 '22 23:12

Brandon0


1 Answers

Try using this cURL option:

curl_setopt($ch, CURLOPT_VERBOSE,0);
like image 130
user470714 Avatar answered Jan 05 '23 17:01

user470714