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

eldamar’s picture

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)."

brynetzster’s picture

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

dianacastillo’s picture

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

gregor171’s picture

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

philalonso’s picture

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!

ejazrus’s picture

I moved the site to a new development computer having document root present on drive with drive letter different from the original and i was greeted with DrupalTemporaryStreamWrapper::stream_open and FTP related messages while trying to install a module using URL method (after enabling devel). I suspected windows permissions issue at first but nothing I did solved my issue.
I'm glad I stumbled upon this post and fixed the tmp directory in my-url/admin/config/media/file-system
Big thanks to you, Gregor171 :D

ellastelter’s picture

This did the trick for me!

I was trying to set up a proper workflow using Pantheon and Acquia Dev Desktop for a Panopoly site I had been working on. There are a lot of unknowns for me as I learn, so I am glad the solution was so simple.

ehsankhfr’s picture

It worked for me!

Drupal version: 7.x

I have Finnish style of open-source coding! How about you?

flavio_tito’s picture

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

flavio_tito’s picture

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

swfindlay’s picture

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!

flacoman91’s picture

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.

tharam04’s picture

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.

bbopp’s picture

Flavio - your answer is still helping! Many thanks!

a.knutson’s picture

Thanks!

aqmaster’s picture

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.

iXed’s picture

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.

droweski’s picture

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

marcinsdance’s picture

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

a.knutson’s picture

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

rahuldolas123’s picture

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

waqariz’s picture

I have also done the same thing and work like a charm, thanks

WaQaR Ali

bajah’s picture

Thanks flavio, the 2 pointers did the trick

Bajah

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

Albert Einstein
suntog’s picture

thankyou, I was about to nuke my site

DiogenesTheCynic’s picture

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

rccastilla’s picture

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.

batigolix’s picture

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)

TWD’s picture

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

zooter626’s picture

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

Claudiu Arbanas’s picture

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

It can be found as "tmp".

If there is no temp folder, create it.

vivdrupal’s picture

The temp directory was still pointing to the local wamp directory.
Corrected it to /temp to solve.

sarathkm’s picture

Thanks. was able to add tmp directory using drush.
http://drupal.stackexchange.com/questions/50765/how-to-change-tmp-direct...

Sarath Kumar M (शरत कुमार एम)

sobi3ch’s picture

On Ubuntu I've change first from sites/default/files/tmp > system /tmp then back to sites/default/files/tmp and this solve issue for me. So I'm assuming there is some bug in this DrupalTemporaryStreamWrapper::stream_open method or in PHP itself.