Home
Support Forums

PHP version 7.4 does not exist for Statamic static site deploy

Hi there,

I’m using the Statamic site generator package and have deployed a site successfully to Netlify using the current settings. However on this project I get an error “PHP version 7.4 does not exist”. Output is:

10:51:22 AM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1
10:51:22 AM: ruby-2.7.1 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
10:51:22 AM: ruby-2.7.1 - #generating default wrappers
10:51:23 AM: .......
10:51:23 AM: Using /opt/buildhome/.rvm/gems/ruby-2.7.1
10:51:23 AM: Using ruby version 2.7.1
10:51:24 AM: PHP version 7.4 does not exist
10:51:24 AM: Error running command: Build script returned non-zero exit code: 1
10:51:24 AM: Failing build: Failed to build site
10:51:24 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
10:51:24 AM: Finished processing build request in 20.566683673s

I’m following the steps for the Statamic Static Site Generator and have an environment variable set through the Netlify dashboard for PHP_VERSION = 7.4. I have another Statamic site running fine on Netlify but with this site I get the PHP version does not exist error. Does anyone know why this is happening? I’m using the Cool Writings starter kit.

Hi @connorleech, welcome to the community!

Based on https://github.com/netlify/build-image/blob/xenial/Dockerfile#L157, 7.4 should be available in the build-image. This does assume you are using the xenial (newer) version of the build-image. Can you confirm which version you are using for your site? Or if you tell me your site, I can check directly.

Ah that must have been it. I deployed to a new Netlify project and did not have the issue. The project I was deploying to must have had an old image

1 Like