Hi All,
Using GitHub Actions / KUDU deployment and have been unable to automate my php deployment actions. I am attempting to install composer using .phar but the deployment command errors indicate that it is unable to locate php.
When I was running on php 7.4, I created my deploy.sh based on the guides such as this one: https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-php-database-app and everything was working. I have not been able to achieve this on php 8.1.
Error message:
Running composer install
deploy.sh: line 120: /usr/local/bin/php: No such file or directory
An error has occurred during web site deployment.
composer failed
I have tried this with and without the full path (or what I thought was the full path) to php.
Deployment command that is failing:
# 2. Install Composer modules
if [ -e "$DEPLOYMENT_TARGET/composer.json" ]; then
echo Running composer install
cd "$DEPLOYMENT_TARGET"
eval /usr/local/bin/php composer.phar install --optimize-autoloader --no-dev
exitWithMessageOnError "composer failed"
cd - > /dev/null
fi
Using the advanced tools bash, I do not see php installed. Using SSH, it is.
Bash:
kudu_ssh_user@686a5aa765af:/$ php -v
-bash: php: command not found
SSH:
root@de42b3c23ae7:/home# php -v
PHP 8.1.12 (cli) (built: Dec 2 2022 07:59:07) (NTS)
Am I misunderstanding?