Home » Php » php – Drupal 7 error: The file could not be created

php – Drupal 7 error: The file could not be created

Posted by: admin July 12, 2020 Leave a comment

Questions:

I move drupal 7 from server(live Site) to my localhost(xampp). I change settings.php(files/defualt/settings.php) for database connection and remove cache from mysql database. now in load index, i see my website without css design(only text) and see this error :

**Error message**:
The file could not be created.
The file could not be created.
The file could not be created.
The file could not be created.
The file could not be created.

I think drupal not create css/js compression files. How To Fix This Error? Thanks For Any Help.

How to&Answers:

While running MAMP

found answer from here:
http://drupal.org/node/581558#comment-6202892

Went to: admin/config/media/file-system

changed “/tmp/php” to “tmp/php” and problem was solved.

Answer:

similar to the other answer it was a problem with my file system setup. The tmp directory in my live site is in a folder outside the public_html folder.

  • so I just created a new tmp directory inside my directory structure
    and
  • went to admin/config/media/file-system and
  • set the tmp folder to point to that new tmp folder.

Answer:

It seems a permissions problems, after you cleared the drupal cache, all the css and js files needs to be recreated in sites/default/files (or sites/yourdomain/files), check the web users has permission to write in this directory.

Answer:

You need to give your “Temporary directory” to write permission. From admin-> config -> file system

enter image description here

Answer:

First Check whether the Temp Folder is available in your sites/default/files directory or not.

If Temp Folder is not available then create the Folder and give the correct access permission to that folder.

If Temp Folder already available there then check the permission of the folder.