【问题标题】:PhantomJS Segmentation faultPhantomJS 分段错误
【发布时间】:2018-01-10 21:50:34
【问题描述】:

我在 laravel 中使用 casperjs 和 phantom js

putenv('PHANTOMJS_EXECUTABLE='.config('hs.PHANTOMJS'));
$js_path = \resource_path('assets/js/main.js');
$jquery_path = \base_path('node_modules/jquery/dist/jquery.min.js');
$link = 'www.example.com';
$response = shell_exec(config('hs.CASPERJS').' ' . $js_path . ' "' . $link . '" "' . $jquery_path . '"');

我在另一台服务器上运行此代码,一切正常

但现在我在刚刚创建的新服务器上运行它并收到分段错误消息

我尝试运行

/var/www/myuser/data/phantomjs/phantomjs-2.1.1-linux-x86_64/bin/phantomjs --version

并得到同样的错误 但在另一台服务器上一切正常

【问题讨论】:

    标签: php laravel phantomjs casperjs


    【解决方案1】:

    为了解决问题,我将 phantomjs 文件移动到 /var/www 并且它工作正常

    【讨论】:

      猜你喜欢
      • 2015-02-22
      • 1970-01-01
      • 1970-01-01
      • 2018-02-23
      • 1970-01-01
      • 2018-02-13
      • 2015-09-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多