卷曲问题。 PHP脚本没有在呼叫运行 [英] CURL Issue. PHP script not running on call

查看:113
本文介绍了卷曲问题。 PHP脚本没有在呼叫运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找任何帮助调试,这可能是$ P $运行pventing我的PHP code,当我CURL包含脚本的页面。

I'm looking for any help debugging what could be preventing my php code from running when I CURL the page containing the script.

我从一个PHP脚本在进行此调用:

I am making this call from one PHP script:

$ch = curl_init($this->curl_address . $querystring);
$response = curl_exec($ch);
curl_close($ch);

要这个脚本(脚本实际上做的东西,但它没有运行,所以我把它弄坏了下来,这样我会有证据证明它不运行,这是目前在那里,有日志中没有输出)

To this script: (the script actually does stuff, but it wasn't running, so I broke it down to this so that I would have evidence that it does not run, this is what is currently there, and there is no output in the log)

error_log("got here");

在我的测试服务器(在Mac),该CURL'd脚本运行(我得到的输出在日志中),但我的生产服务器上失败。在这两种情况下,服务器上的一个脚本调用另一个。

On my test server (a Mac), the CURL'd script runs (I get output in the log), but on my production server it fails. In both cases one script on the server is calling another.

生产服务器是Linux VPS运行(我相信)CentOS的。

The production server is a Linux VPS running (I believe) CentOS.

我不知道我应该找什么样的问题在生产服务器上。任何帮助是AP preciated。

I don't know what issues I should be looking for on the production server. Any help is appreciated.

感谢。

推荐答案

我的意思是,当我终于想通了这个问题,更新在周末这个问题。生产服务器通过HTTPS,而测试服务器没有。我是有这个问题是因为服务器没有被验证过卷曲。

I meant to update this question over the weekend when I finally figured out the problem. The production server was serving over HTTPS, while the test server was not. The issue I was having was because the server wasn't authenticating over cURL.

这篇关于卷曲问题。 PHP脚本没有在呼叫运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆