Search code examples
phpsymfonydeploymentionos

Deploy to Ionos - Php is disabled at the real webspace (not at build servers)


The deployment of my Symfony app failed on ionos "Deploy now" with module from Github.

The built is ok, but on the deployment step, I got this issue : Error: Php commands defined in post deployment remote commands although php is disabled

I guess it's the step of the line post-deployment-remote-commands:in my config.yaml It's specified in comment : # commands that are executed at the real webspace NOT at build servers AFTER copying new files

So I guess php is disabled on the webspace, but enabled on the built server (that's why all the built works fine)

I don't know how I can enable php on this webspace.

Any help would be extremely appreciate ! :)

This is my config.yaml :

version: 1.0

deploy:
  # configuration part, which is taken at the FIRST deployment of each branch
  bootstrap:
    # folders that are not copied to IONOS webspace
    excludes:
      - tests
      - node_modules
      - DOCKER_ENV
      - docker_tag
      - output.log
    # commands that are executed at the real webspace NOT at build servers AFTER copying new files
    post-deployment-remote-commands:
      - find $(pwd) -type f -not -path "$(pwd)/logs/*" -exec chmod 664 {} \;
      - find $(pwd) -type d -not -name "logs" -exec chmod 775 {} \;
      - chmod -R o+w var
      - APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear
      - php bin/console doctrine:database:create
      - php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
      - php bin/console assets:install
      - APP_ENV=prod APP_DEBUG=0 php bin/console cache:warmup

Solution

  • I finally solved it !

    I needed to use a PHP package, instead of the Starter Package of Ionos. Wich is confusing is that the Starter Package proposed to me to use a default configuration for Symphony (after analyzing my repo).

    To resolve the deployment error. I add to delete the project from my Deploy Now Account (but not from GitHub), and restart the deployment process. But, this time, make sure to select the PHP Package when requested instead of Starter Pack.