我有编译LAMP的问题,我有一切编译和工作,但是当我尝试重新启动Apache时,我得到以下错误: 在父进程中检测到seg错误或类似的讨厌错误 并重新启动Apache中止,我知道是与curl扩展为PHP,因为当我编译php没有curl的错误不会出现。 我一直在寻找很多谷歌,并发现了许多类似的问题,但没有一个解决scheme。
我想从lftp获得进度信息。 目前,我正在使用curl: curl http://example.com/file -o file -L 2> download.log 这将curl的进度信息写入download.log文件,我可以通过它来获取实时进度。 但是同样的方法对于lftp不起作用,无论是使用stdout还是stderr。 最后我会得到一个空的download.log文件,直到传输完成。 lftp -e 'get http://example.com/file;quit' 2> download.log lftp -e 'get http://example.com/file;quit' 1> download.log 当我不redirect输出,我看到在屏幕上的进展。 当我redirect输出时,我停止看到屏幕上的进度,但没有在download.log中显示。 文件传输完成后,我看到最后的结果,像这样 – 但没有任何事情: 97618627 bytes transferred in 104 seconds (913.1K/s) 是lftp做一些不寻常的输出 – 打印到屏幕没有打印到标准输出/标准错误? 捕获屏幕输出比redirect标准输出/标准错误还有其他方法吗?
我有一个nginx服务器,将POST $ request_bodylogging到文件中。 当我发布json到服务器时,它用\ x22replace引号(“)。 我的configuration看起来像这样 server { server_name myServer; listen 8180; log_format logMyServer '$request_body'; location /myServer { access_log /var/log/nginx/request_bodies.log logMyServer; proxy_pass http://127.0.0.1:8000/; break; } } 以下是我如何生成请求: curl -H "Content-Type: application/json" -X POST -d '{"some":{"foo":"bar"}}' localhost:8180/myServer/ 我的问题是: 什么样的编码是\ x [数字]? 有没有办法可以configuration日志logging,而不是\ x22引号?
我不知道到底发生了什么,但我注意到,如果不添加额外的开关,curl就无法获得安全的页面。 ~# curl -v https://api.dreamhost.com * About to connect() to api.dreamhost.com port 443 (#0) * Trying 75.119.208.14… * connected * Connected to api.dreamhost.com (75.119.208.14) port 443 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): (hangs for a minute) * Unknown SSL protocol error in […]
我有一个服务器,它有一个自我签名的证书,我试图安全地访问。 我通过查看openssl s_client -connect <ip>的输出获得了证书,并将其复制到testcert.pem,然后我试着使用curl –cacert testcert.pem <url> 。 然而,这并没有工作,我的研究已经导致我相信,问题可能是证书中的行,读取Subject: CN=id23946 。 显然,我需要存储一个别名在我的系统链接id23946到IP地址,但我找不到任何信息如何做到这一点。 那么,我该怎么做呢? 如何使curlvalidation此证书有效? 编辑:我知道,我可以连接到服务器通过添加<ip> id23946到我的主机文件,然后使用id23946作为地址,但我真的希望能够直接连接到服务器的实际地址,而不必修改服务器证书。 有没有办法做到这一点?
我可以做任何问题没有任何问题: curl -u "username:password" http://www.example.com/exportfile.xml 但是,如果我尝试使用相同的命令到我们的网站的https版本,它会失败 curl -u "username:password" https://www.example.com/exportfile.xml 这是错误信息的样子: About to connect() to www.example.com port 443 (#0) Trying "some ip"… connected Connected to www.example.com (some ip) port 443 (#0) Initializing NSS with certpath: sql:/etc/pki/nssdb CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none NSS error -5938 Closing connection #0 SSL connect error curl: (35) SSL connect error 所有的帮助表示赞赏
在几个CentOS盒子上用cURL和PHP有一个奇怪的问题。 我在本地运行CentOS 6.3。 远程是CentOS 5.9 在本地,这个盒子接收到一个请求,scp的一个文件到远程服务器,然后通过PHP执行一个cURL请求到远程服务器发送一些信息。 请求总是在第一次尝试的时候失败。 随后的请求正常工作。 远程有一个有效的SSL证书 – 即使如此,closures证书和主机validation不能解决问题。 日志logging不是很有帮助。 把冗长变为11,最有意义的条目是这样的: * About to connect() to www.example.com port 443 (#0) * Trying 203.0.113.10… * connected * Connected to www.example.com (203.0.113.10) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * NSS error -5938 * Closing connection #0 * […]
我试图安装phusion乘客nginx模块,但它失败 # passenger-install-nginx-module * Curl development headers with SSL support… not found … yum install curl-devel Setting up Install Process Package curl-devel-7.15.5-9.el5.x86_64 already installed and latest version Package curl-devel-7.15.5-9.el5.i386 already installed and latest version Nothing to do 还有什么需要做的? 我用的是:CentOS 5.2,Phusion Passenger 3.0.0,nginx / 0.8.53 # gcc -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure […]
我想使用curl发送一个HTTP HEAD请求到一个URL来validation它是否正常工作(服务器启动并发送成功的响应)。 最后,我需要返回最终的HTTP响应代码和URL(在redirect之后)。 最后,我需要设置一个硬超时(一段时间之后,调用将失败,无论请求curl在哪里)。 curl是否支持这一切? 我需要使用什么选项来完成这个任务?
我正在使用很多这样的命令的平台: ssh [email protected] 'curl http://some_server/script.sh | bash' ssh [email protected] 'curl http://some_server/script.sh | bash' 这对于远程执行脚本来说是非常干净和方便的,但是,我还是看不到脚本的输出/退出代码。 任何人都可以弄清楚一些事情,以确保脚本已经正确执行(从主机启动ssh的angular度来看)。