Symfony app deployment failure


I’m new in dev. Began roughly last year. I began writing my app with Php and symfony. For the moment the first pages work seamlessly on localhost. But I wanted to test hosting/deploying. So I went with platform?sh and followed the symfony tutorial for I found here :

But I never succed in testing the url. I always get somehow a read-only/authorization issue that lead to cache:clear : KO

here’s what I get whan trying to deploy via cLI :

Executing script cache:clear [KO]
W: [KO]
W: Script cache:clear returned with error code 255
W: !! PHP Warning: session_start(): open(/var/lib/php/sessions/sess_b3cb5978d89f00d36b94662a8b2d5d59, O_RDWR) failed: Read-only file system (30) in /app/src/Controller/Spotify/SpotifyConnection.php on line 6
W: !! PHP Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /app/src/Controller/Spotify/SpotifyConnection.php on line 6
W: !!
W: !! In ExceptionConverter.php line 101:
W: !!
W: !! An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or
W: !! directory
W: !!
W: !!
W: !! In Exception.php line 28:
W: !!
W: !! SQLSTATE[HY000] [2002] No such file or directory
W: !!
W: !!
W: !! In Driver.php line 33:
W: !!
W: !! SQLSTATE[HY000] [2002] No such file or directory
W: !!
W: !!
W: !!
W: Script @auto-scripts was called via post-install-cmd
W: unable to run /app/.global/bin/composer2 install --prefer-dist --optimize-autoloader --apcu-autoloader --classmap-authoritative --no-progress --no-ansi --no-interaction

E: Error building project: Step failed with status code 255.

E: Error: Unable to build application, aborting.

I(ve been struggling on this issue sinc two seeks now and couldn’t fnd any easy solution in docs.

Can you help me with that?

Hi @upgrader-dev

i would be glad to help here but i need more info on your project:

Let me know.


1 Like

Hello. Thank you very much @flovntp for reading me.

Here are the answers :

  • Symfony version 6.2.7;

  • In fact there are two .php files that work with $_SESSION but that’s all.

  • Don’t know what is that :slight_smile: So I guess no;

  • You’re right. I initially wanted to test my deployment without the integration of mySQL (just to test the home page). But I guess that as mySQL is in my code the integration must be done. So I check that and keep you informed.