调试php Curl在Windows上的步骤 [英] Steps for debugging php Curl on windows

查看:181
本文介绍了调试php Curl在Windows上的步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多麻烦弄清楚为什么我的php Curl API在Mac上使用MAMP工作正常,但不能在Windows下工作。



我问fot调试



接受的答案包含一系列步骤,帮助我在Windows 7 32位上进行curl工作。

p>

解决方案

以下是调试Curl的步骤列表:



验证扩展dir路径在php.ini中被正确设置,并且extension = php_curl.dll被取消注释。



检查环境变量是否按照: http://php.net/manual/en/faq.installation.php#faq.installation.addtopath



运行deplister.exe ext \php_curl.dll来验证所有依赖关系是否都正确地满足。



如果上述所有操作都正常,请检查CURLOPT_VERBOSE的输出。根据以下主题中的@ hp95建议:没有响应从Curl请求到https服务器



如果您到达使用SSL的网站,请检查以下帖子: HTTPS和SSL3_GET_SERVER_CERTIFICATE:证书验证失败,CA正常



并修复它:



https://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your -php-config /


I had a lot of trouble figuring out why my php Curl API worked fine on a Mac using MAMP, but would not work under windows.

I asked fot debugging tips or useful information for finding curl configuration issues under windows.

The accepted answer contains a list of the steps that helped me get curl working on windows 7 32 bits.

解决方案

Here is a list of steps for debugging Curl:

Check in phpinfo module that Curl IS enabled.

Verify extensions dir path is propperly set in php.ini and that extension=php_curl.dll is uncommented.

Check that Environment Variables are propperly set as per: http://php.net/manual/en/faq.installation.php#faq.installation.addtopath

Run deplister.exe ext\php_curl.dll to verify all dependencies are correctly satisfied.

If all of the above is working then check the output of CURLOPT_VERBOSE. As per @hp95 suggestion in the following thread: No Response getting from Curl Request to https server

If you are reaching a site that uses SSL check the following post: HTTPS and SSL3_GET_SERVER_CERTIFICATE:certificate verify failed, CA is OK

And fix it like these:

https://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/

这篇关于调试php Curl在Windows上的步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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