卷毛已经停止为我工作。
我昨天在我的AWS EC2服务器上运行了一些更新,所以我有一种感觉,那就是原因,但我无法弄清楚。
我主要使用Curl将人添加到各种mailchimp列表中。 这些脚本都没有工作,我正在浏览器有关连接不安全的错误:
“您试图查看的页面无法显示,因为收到的数据的真实性无法validation。”
我也在我的apache错误日志中看到相关的以下错误:
/ usr / sbin / httpd:符号查找错误:/usr/lib64/libnsssysinit.so:undefined symbol:PR_GetEnvSecure
CURL是安装等(见截图),当我从我的Web服务器上的命令行使用curl时,远程服务器会回复给我……所以这里没有问题。
任何帮助非常感谢。
丹尼。
// Set API Key and list ID to add a subscriber $api_key = 'api key'; $list_id = 'our list id'; $dc = 'data center'; /* ================ * DESTINATION URL * ================ */ $url = 'https://' . $dc . '.api.mailchimp.com/3.0/lists/' . $list_id . '/members/'; /* ================ * DATA SETUP * ================ */ $pfb_data = array( 'email_address' => '[email protected]', 'status' => 'pending', 'merge_fields' => array( 'FNAME' => 'First Name', 'LNAME' => 'Last Name', ), 'interests' => array( 'Interest List ID' => true ) ); // Encode the data $encoded_pfb_data = json_encode($pfb_data); // Setup cURL sequence $ch = curl_init(); /* ================ * cURL OPTIONS * The tricky one here is the _USERPWD - this is how you transfer the API key over * _RETURNTRANSFER allows us to get the response into a variable which is nice * This example just POSTs, we don't edit/modify - just a simple add to a list * _POSTFIELDS does the heavy lifting * _SSL_VERIFYPEER should probably be set but I didn't do it here * ================ */ curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERPWD, 'user:' . $api_key); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $encoded_pfb_data); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $results = curl_exec($ch); // store response $response = curl_getinfo($ch, CURLINFO_HTTP_CODE); // get HTTP CODE $errors = curl_error($ch); // store errors curl_close($ch); // Returns info back to jQuery .ajax or just outputs onto the page $results = array( 'results' => $result_info, 'response' => $response, 'errors' => $errors ); // Sends data back to the page OR the ajax() in your JS echo json_encode($results);
在这里input图像说明
显然问题是最近发布了一个CentOS 7系统的NSS软件包的更新,导致了Aache错误
/ usr / sbin / httpd:符号查找错误:/lib64/libnsssysinit.so:未定义符号:PR_GetEnvSecure
通过重新启动Apache和FPM服务解决了该问题。
我通过重新启动EC2实例解决了这个问题。