Theme developer saving to wrong temp directory

Submitted by tomo on September 7, 2010 - 1:36am

After importing a database for a Drupal site from a different server, you may see errors such as:

warning: file_put_contents(/devel_themer_19527646904c852428ef200) [function.file-put-contents]: failed to open stream: Permission denied in /home/tomo/xxx/sites/all/modules/3rdparty/devel_themer/devel_themer.module on line 638.

And if you try to select an element:

Ajax variables file not found.

What's going on here is the files aren't being written to the temp directory which is a Drupal variable stored in the database.  Delete the row from the variables table where name is file_directory_temp and then Drupal will automatically set the variable to the correct directory.

delete from variables where name='file_directory_temp';
delete from variable where name='file_directory_temp';

Read the rest of this article...

This is common for more than just theme developer, but any uploaded file if you see errors in your log like "Upload error. Could not move uploaded file XXX to destination /YYY/temp//XXX."


© 2010-2014 Saigonist.