V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wuxiaolin
V2EX  ›  PHP

php 使用 curl 报错, Failed to connect to localhost port 1080

  •  
  •   wuxiaolin · 2016-07-30 10:09:02 +08:00 · 3998 次点击
    这是一个创建于 2827 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我是 win7 64 位的系统,配好 php 后使用 curl 报错: Failed to connect to localhost port 1080: Connection refused 查了下说是 socket 代理的问题,有谁遇到一样情况的吗?是否有解决方法

    第 1 条附言  ·  2016-07-30 10:55:49 +08:00
    问题描述的不是很好,抱歉了。
    我使用 php 的 curl 去请求网站时,如 www.baidu.com 。 curl 返回以上错误。
    我想看下有没人跟我遇到一样的情况的,是否有解决方法?
    ps:该错误只会在 cli 模式发生,浏览器访问是正常的
    7 条回复    2016-08-05 16:29:58 +08:00
    lianz
        1
    lianz  
       2016-07-30 10:45:44 +08:00
    《提问的艺术》
    popu111
        2
    popu111  
       2016-07-30 10:58:13 +08:00
    命令行配置代理了?自查一下
    i4mszengg
        3
    i4mszengg  
       2016-07-30 14:31:18 +08:00
    没有 openssl 吧
    muziyue
        4
    muziyue  
       2016-07-30 14:33:58 +08:00
    代理问题吧, 1080 不是 ss 常用端口么
    iVanilla
        5
    iVanilla  
       2016-07-30 15:01:06 +08:00
    你是不是用了 SS 科学上网?关掉再试试看。
    Stlin
        6
    Stlin  
       2016-07-30 20:56:44 +08:00
    SS 开了全局吧?
    wuxiaolin
        7
    wuxiaolin  
    OP
       2016-08-05 16:29:58 +08:00
    感谢上面各位,我试试
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4333 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 10:08 · PVG 18:08 · LAX 03:08 · JFK 06:08
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.