Heroku's Windows toolbelt and LD_LIBRARY_PATH

江枫思渺然 提交于 2019-12-11 02:29:53

问题


I'm deploying a PHP application on Heroku and I need to run some tasks using CLI. In order to do that I have to set LD_LIBRARY_PATH env variable using this command: heroku config:add LD_LIBRARY_PATH=/app/php/ext:/app/apache/lib but every time I do it toolbelt overrides the command and the variable points to C:\Program Files (x86)\Git\app\php\ext;C:\Program Files (x86)\Git\app\apache\lib. Obviously it's not okay. Does anyone have any ideas how to do this in proper way?


回答1:


5 days passed and still I have no answer. The CLI interface is used by scheduler, so I could use this workaround:

export LD_LIBRARY_PATH=/app/php/ext:/app/apache/lib && ~/bin/php ~/www/index.php cron




回答2:


This is actually not a problem with Heroku toolbelt, it's documented behavior by msys (I'm assuming you're running this in the msysgit shell). You can either run the command in a different shell (eg. Powershell) or use '//' at the start of the path like this:

heroku config:add LD_LIBRARY_PATH=//app/php/ext://app/apache/lib

This won't cause problems when the path is used on Linux.



来源:https://stackoverflow.com/questions/13792556/herokus-windows-toolbelt-and-ld-library-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!