• 8

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Symfony3 cache (Warning: rename) after update

I have problem, after insert or update in my screen i see message:

Warning: rename(C:\Users\Name\Desktop\BaseApp\var\cache\dev/doctrine/orm/Proxies__CG__AppBundleEntityCategory.php.57483ae07bdb29.50220410,C:\Users\Name\Desktop\BaseApp\var\cache\dev/doctrine/orm/Proxies__CG__AppBundleEntityCategory.php):

All time after update i see this message, after reload page all is right, i use my app on windows, dev mode, symfony3,


The problem is that the Doctrine's proxy class generation code doesn't handle concurrent requests very well. It works on Unix-like systems, but not on Windows, where you can't just rename over a file that is open.

See configuration of the doctrine bundle. You'll most like have auto_generate_proxy_classes set to "%kernel.debug%" (this is the default setting in symfony standard edition).

Try changing auto_generate_proxy_classes to false. You'll now have to manually clear the cache if you change your entities, but that error should be gone.

  • 15
Reply Report
      • 2
    • I know this question is old. So, Doctrine only rename the file on dev mode? So if I'm in production it wont regenerate the file as the cache does not recreate in production mode?
      • 2
    • Yes, if you have auto_generate_proxy_classes set to %kernel.debug%, then it will be regenerated only in dev mode. In production, they will be generated only once during cache warmup.

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags

Related Questions