Category : symfony4

I have created a full symfony project (composer create-project composer create-project symfony / website-skeleton myproj "^ 4.4.18"). After having configured the environment variables (trusted_host, database_url, etc …). If I run php -S 127.0.0.1:8000 -t public / => Everything works perfectly. I have the symfony welcome page with the debug toolbar On the other hand, if ..

Read more

My Dockerized Symfony4 app was up since 2 months, suddenly it stoped working this morning. I’ve tried to rebuild the container and got this message : chmod: cannot access ‘var/cache/prod/pools/vxeRd2PSFn/5fbf647725b467.33862000′: No such file or directory So I’ve entered the container and ran this : [email protected]:/app# chmod -R 777 var/cache/ Then the app worked fine ! ..

Read more

I have a DB issue while running a Symfony4 project. docker-compose.yml db: environment: MYSQL_DATABASE: ${DATABASE_NAME} MYSQL_PASSWORD: ${DATABASE_PASSWORD} MYSQL_RANDOM_ROOT_PASSWORD: ‘yes’ MYSQL_USER: ${DATABASE_USERNAME} image: ‘mariadb/server:10.4’ ports: – ‘3306:3306’ volumes: – ‘db-data:/var/lib/mysql’ .env DATABASE_URL=mysql://symfony:[email protected]/symfony ###< doctrine/doctrine-bundle ### DB_HOST=db.localhost DB_NAME=symfony DB_USERNAME=symfony DB_PASSWORD=symfony DATABASE_PORT=3306 DATABASE_HOST=db.localhost DATABASE_USERNAME=symfony DATABASE_PASSWORD=symfony DATABASE_NAME=symfony DATABASE_PORT=3306 PROJECT_NAME=oversight-api I got an error Access denied for user [email protected] I ..

Read more

I have set up two docker servers. An application server with Docker Symfony and a Docker mysql server. I would like support on how to connect the Symfony app to the remote docker mysql database. I have already tried adding the ip address of the database server, but it doesn’t work. DATABASE_URL=mysql://db_user:[email protected]_ADDRESS_OF_DB_SERVER:3306/db_name The app connects ..

Read more

I’m working on a symfony project on docker container and i set up a Mailer service which use swiftmailer and notfloran/mjml-bundle to send mail. the mjml bndle needs mjml binary which i installed on the container with npm install mjml. In the code : $mail = new Swift_Message(); $mail ->setFrom($from) ->setTo($to) ->setSubject($subject) ->setBody($body) ->setContentType(‘text/mjml’); $this->mailer->send($mail); ..

Read more