dongyu7074 2011-10-20 16:29
浏览 43

卷曲导致apache错误

I'm a bit stuck, curl causes segmentation faults in apache and I can't find out why.

I made a simple case, trying to understand :

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://google.fr');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,15);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT,30);
curl_exec($ch);

My conf, apache2, php5.3, ubuntu 11.10. Tried to reinstall php5-curl with no success

If you have ever seen this before, and have an idea please tell me !

  • 写回答

1条回答 默认 最新

  • dousi6405 2011-10-20 22:58
    关注

    Have you tried adding curl_close($ch); as last line in your example?

    Still, it shouldn't segfault ;) Try running the code manually like this: php test.php

    评论

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改