Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

571
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda