Just transfered my first Drupal site to my Hostmonster account, to see if it would actually work.... and no.

It kind of works. I am using the Bartik theme with only minor adjustments from default (a little color change basically it).... but the page displays with no color and no images (eg: nothing over the menu tabs, no header color, no footer color). So I go to appearances and try to change up the colors, and when I click save it responds with the following error:

Warning: file_put_contents(temporary:///.htaccess) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_create_htaccess() (line 507 of /home1/toefltes/public_html/new/includes/file.inc).
Warning: file_put_contents(temporary://fileUn0xkH) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (line 1847 of /home1/toefltes/public_html/new/includes/file.inc).
The file could not be created.

As I said, I am new to Drupal, so I dont really get the information in the error message. I called Hostmonster and double checked myself, and all files uploaded properly and none are broken. I think the settings.php file is fine for the database, but here is the line 181 stuff:

$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'toefltes_new',
'username' => 'yyyyyyyy',
'password' => 'xxxxxxxx',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
),
);

So any insight would be apprecitated.

Also, follow up question. Can anyone recommend the best hosting solution with good Drupal support. Hostmonster basically told me to go pound sand. They dont know Drupal, and can't help with it.

Ryan

Comments

I have the same problem, also new to drupal

Edit: The answer to this issue solved this error for me https://drupal.org/node/1053896 but i still can't access my site, only the administration is accessable.

Now i get "Warning: domdocument::domdocument() expects at least 1 parameter, 0 given i filter_dom_load() (row 1042 of D:\xampp\htdocs\homepage\modules\filter\filter.module)."

Thanls for the link above, my problem solve, perfect..thank you so much

I had run update without putting drupal in maintenance mode.
once I put it in maintenance mode, ran update again , the problem disappeared

Diana Castillo

file_put_contents(temporary://filennnnn): failed to open stream translates simply to: can not write file to a disk! Either there is no temp folder or Drupal doesn't have enough permission for writing in that folder.

What you need to do is either change temp folder (at your-url/admin/config/media/file-system) to
sites/default/files/temp
or
sites/your-site/files/temp
or
change write permision to current temp folder (so that Drupal can write to it)

Gregor Gr
Independent Web Software Developer

After creating a local instance of a site that required work, I received this error. A Google search provided this Drupal.org issue queue with Gregor's solution. Thank you, Gregor!

Warning: file_put_contents(temporary://fileo1vz2A): failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (line 1859 of /hsphere/local/home/pluswebdes/professor.yellowtangerine.com/includes/file.inc).
The file could not be created.

Flavio Tito

Maybe you just haven´t created a 'files' folder at 'sites/default' or must set properly the temporary directory at file system (admin/config/media/file-system).

let me know!

Flavio Tito

Thanks flavio_tito - I hasd exactly this problem and your solution worked perfectly. I had to create a new tmp folder (as am on a shared hosting server) and then pointed Drupal to the write place.

Thank you!

just wanted to say thanks because your tips helped me out a lot! I migrated stuff over from shared hosting to a linode vps and I didn't create the files directory yet.

Also going to the file system configuration fixed things.

This helped me out in my installation as well.

My Drupal environment moved from Windows to Linux and the directory naming is completely different, which was causing errors.

Flavio - your answer is still helping! Many thanks!

Thanks!

Gracias!, ese era el problema, había cambiado de Driver mi disco duro, por lo que debía cambiar la ruta del tmp desde el admin.

I had the same problem, and i went to the sites/default/files folder and gave 433 permission to the .htaccess file and now it works without the error.

Hope it helps.

You can view the current tempdir location at admin/config/media/file-system
But you can only change it in settings.php

In my case I just had to click "save" in admin/config/media/file-system - and this solved it.
Cheers

Thanks so much for mentioning that sometimes it just needs to be re-saved. This fixed my issue!

hey @marcinsdance, it worked like a charm.
thank you.

Thanks flavio, the 2 pointers did the trick

Bajah

A little knowledge is a dangerous thing. So is a lot.

Albert Einstein

thankyou, I was about to nuke my site

I just found this after a week of frustration - Drupal still doesn't check for the tmp directory. Sigh.

I had the same error y solved the warning was accessed http://server/xampp/.../es/admin/config/media/file-system and change the location of the temporary directory: opt / lampp / tmp
After he was given full permission to the folder opt / lampp / htdocs / xampp / .. / sites / default / sites and opt / lampp / tmp
Note: recursive permission 0777 to the folder files.

Note (to myself) that if you have the module Journal enabled, you need to add a message to the journal textfield. Otherwise the new file folders are not saved. (Error messages are hard to read when the themes are not loading)

Changing

/tmp

to

tmp

at /admin/config/media/file-system
worked for me. i.e. remove the leading slash and save.

See thread:
https://drupal.org/node/1106492

(*sigh) thank you! that's what did it for me!

Give write permissions to temp folder from "sites->default->files".

It can be found as "tmp".

If there is no temp folder, create it.