I'm using a Node package called exec-php to execute PHP functions within Node.js app.
I would like to push that app to Heroku, but I'm wondering how to make that, and how that would be in the PHP bin locally.
I'm using /Applications/MAMP/bin/php/php7.0.0/bin/php
. What would be the path to PHP bin in Heroku?
I tested vendor/bin/heroku-php-apache2 but it doesn't work, so what would be the path to PHP binary in Heroku?
Yes, and yes. Node and Apache / PHP can co-exist on a single server.
Heroku PHP Support will be applied to applications only when the application has a file named composer. json in the root directory. Even if an application has no Composer dependencies, it must include an empty composer. json in order to be recognized as a PHP application.
Heroku Node. js support will only be applied when the application has a package. json file in the root directory.
Due to the V8 engine, asynchronous execution, and real-time server interaction, Node. js offers a better execution speed and certainly outperforms PHP.
You'll need to inform the build API that you'd like to use multiple buildpacks. Try:
$ heroku buildpacks:clear $ heroku buildpacks:add heroku/php $ heroku buildpacks:add heroku/nodejs
Then you can inspect the compiled slug via heroku run bash
to verify that the bins are where you expect them to be.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With