Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

572
Visualizações
Symfony project deployment on apache server - cache rename file error

I was trying to deploy my first symfony project to an appache server running on windows. Sometimes the request fail and I get this following error:

Cannot rename "C:\xampp\htdocs\qradmin\var\dev\cache\urlAF58.tmp" to "C:\xampp\htdocs\qradmin\var\dev\cache/url_matching_routes.php".

I have not changed any cache settings - here is the config/packages/cache.yaml

framework:
    cache:
        # Unique name of your app: used to compute stable namespaces for cache keys.
        #prefix_seed: your_vendor_name/app_name

        # The "app" cache stores to the filesystem by default.
        # The data in this cache should persist between deploys.
        # Other options include:

        # Redis
        #app: cache.adapter.redis
        #default_redis_provider: redis://localhost

        # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
        #app: cache.adapter.apcu

        # Namespaced pools use the above "app" backend by default
        #pools:
            #my.dedicated.cache: null

I have tried deleting the folders and re-creating them manually and also to run php bin/console cache:warmup command. Can someone help me?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

First of what @stephan Vierkant said: XAMPP is only for development purposes. I guess you get a lot of security issues running XAMPP in production.

I'm developing on linux machines. But i think on windows machines you get the same type of permission errors when your application / environment is not configured properly. I think it could be the same issue on your windows machine.

A PHP application can run in CLI mode (commands you are executing in console). In this mode the current user is used for executing that command (your_username)

The other mode is via the webserver. The webserver itself running by a dedicatd user. In case of apache2 it's often the www-data user.

Both, the www-data user and the your_username user do create cache entries if they not already exist.

And that's often the problem. If for example a cache entry is made by www-data then the permissions on that file via CLI mode (your_username) aren't sufficient. your_username has no rights to modify the file because only the owner can (www-data) and vice versa

On symfony.com there is a solution how to handle the permission errors:

https://symfony.com/doc/current/setup/file_permissions.html

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda