2

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?

2 Answers2

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

1

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.

friism
  • 19,068
  • 5
  • 80
  • 116