Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

570
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!