Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sugarcrm CE Fatal error: sugar_file_put_contents_atomic() in wamp

Tags:

php

sugarcrm

I am running Sugarcrm CE under wamp on a windows 7 machine and I keep getting the following error. It just happens randomly and if I reload the page it seems to work. But this error is very annoying and I never used to get it under this development environment. I know if this was linux it would be a permissions issue but permissions look fine in windows to me. I have developer mode switched on and have deleted the cache folder but it still happens. Does anybody know how to prevent this?

Fatal error: sugar_file_put_contents_atomic() : fatal rename failure 'E:\wamp     \www\sugargantt-project\cache\modules\Employees\tem177F.tmp' -> 'cache/modules/Employees/Employeevardefs.php' in E:\wamp\www\sugargantt-project\include\utils\sugar_file_utils.php on line 187
like image 937
user794846 Avatar asked Mar 21 '23 03:03

user794846


2 Answers

I had the 'cache' directory but found it was owned by 'root' so I resolved it by correcting ownership from the sugarcrm directory:

chown -R apache:apache .

Where 'apache' is your web server user.

like image 185
Angus McLauchlan Avatar answered Mar 29 '23 22:03

Angus McLauchlan


I had this error and fixed it by editing the realpath_cache_size setting from the default of 16k to 32k in my php.ini.

realpath_cache_size = 32k

EDIT: Although, the above solution helped, this issue returned in my local development environment (I am running on Windows 7). I ended up resolving it by closing my PHP IDE, PhpED by NuSphere, and deleting the localhost debugging cookie in my browser that this IDE sets named "DBGSESSID". I re-ran my local sugarCRM instance again without PhpED and the error disappeared.

like image 36
NHenderson Avatar answered Mar 30 '23 00:03

NHenderson