php exec()不能与PredictionIO部署一起工作


php exec() doesn't work with PredictionIO deploy

我使用PredictionIO作为推荐,现在我想运行自动部署,我使用

  exec('cd /home/abc/sites/BeeketingEngineShop/ && /home/abc/PredictionIO/bin/pio deploy)

但是它一直在运行,并且没有部署在0.0.0.0:8000

当我复制

cd /home/abc/sites/BeeketingEngineShop/ && /home/abc/PredictionIO/bin/pio deploy

到终端,效果很好

综上所述,使用PHP的exec()时没有设置$HOME,导致设置了错误的基路径。详细的答案可以在https://groups.google.com/forum/#上找到!主题/predictionio-user _1Hq2jMiDn4