Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By koteo on
Hello to all, I'm new here at drupal community:
I have a problem when I access drupal 7 index for the first time.
It gives me the next error:
Warning: file_put_contents(temporary://file1Yl6Vj): failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (line 1832 of /var/www/www.site.com/public/includes/file.inc).
Here the line 1832:
if (file_put_contents($temp_name, $data) === FALSE) {
Thanks for the help.
Comments
I have write permissions for
I have write permissions for nobody user on /tmp. When it gives me the error I look at /tmp and I see new files with the next permissions:
-rw------- 1 nobody nobody 0 nov 2 05:42 filegOposQ
It works now !!!
The problem was, that drupal haves for default other $TMP directory than php.ini. I changed drupal configuration on admin/settings/file system and now It works.
Thanks for the help.
What i've to change?
I install a new fresh drupal 7.0
After install i saw the site with the next warning:
Warning: file_put_contents(temporary://fil9EB4.tmp): failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (regel 1847 van D:\www\site.nl\www\includes\file.inc).
I look at this site for help and found this topic with the same problem, but now i don't know what i have to change to fix this.
I went also to admin-settings-file system and see the problem, but i don't know how to fix it. Please help me?
I go to my database to check if there is a d:/tmp, but there isn't one.
And in the same settings (admin-settings-file system) i see that "path of the private file system" is empty.
Everything has read and write permissions.
Who can help me to fix this problem?
This does the trick
I had the same problem with drupal 7
What did i do...
1. Make a directory /tmp
2. Make /tmp chmod 0777
3. Change file.inc on 1839
Thanks
我的问题也是根据你的思路去解决了,只不过我把 $temp_name = drupal_tempnam('tmp/', 'file'); 中的tmp换成了temp之后刷新三次页面 问题解决。 Thanks ihitro!
It works for me thanks
It works for me thanks
This works for me too. Thanks
This works for me too.
Thanks guys!
Installer Bug?
If Drupal is going to pick the path for storing temporary files (/tmp) at install time, it seems that the installer should make sure this exists and is writeable and tell you there is a problem if it isn't.
My first D7 two D7 installs didn't have this problem but on my third, the shared hosting site doesn't give users access to /tmp. Each user has ~/tmp to use within their own file space. (Note that this is on Site5.)
I think I'm just blonde, but
I think I'm just blonde, but I don't understand the solution.
What do I have to do to fix this problem??
The problem is the temp directory
It seems that when you move a D7 site to a new host, the temp directory path is kept in the settings. Therefore, if this path change, this error can occur.
You can fix this at the following url : admin/config/media/file-system
Look for temp folder.
Hope this helps.
Fixed
Perfect! Thanks for this answer.
I have a local install on my Windows PC, and moved to a devel server in Linux. Path was still set to C:\xammp\etc, etc
dave
Thanks
I solved my problem with your solution.
Thanks a lot
Warning: file_put_contents(temporary://fileuZCnZe) [function.fil
Hi im new to drupal, when i hosted the files i got below bug
* Warning: file_put_contents(temporary://fileuZCnZe) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (line 1847 of /home/coimbato/public_html/includes/file.inc).
* The file could not be created.
* Warning: file_put_contents(temporary://fileKVq6tM) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (line 1847 of /home/coimbato/public_html/includes/file.inc).
* The file could not be created.
could any one help me to clear the bug..
--Thanks
try delete the .htaccess file within the temp-folder
I had the same problem.
On ftp server when you go to the folder /sites/default/files/tmp/ you will find a .htaccess file.
Delete this and the error is gone - or at least it was for me.
I dont see the point in adding a .htaccess file in this folder and I am not sure why this happens.
Hope it helps...
Jens Peter
Solution
Hi,
You have only to create a directory named "temporary" in sites/default/files
It works for me
--
Abdel.MA
Another solution
First go to: admin/config/media/file-system
and check the personal directory. [It use to be ~/tmp]
then, in case you have "tmp", just create a new folder called "tmp".
It works fine to me! :)
As some of you comment, the problem maybe cames for the host changing.
it gave me the same error.
it gave me the same error. Enabling chmow a+rw or 777 permissions did not solve.
I finded the solution changing the owner / group:
chgrp -R www-data tmp
chown -R www-data tmp
www-data may differ from any server, simply using a ls -l in /var/www could give us the user and group needed.
If you are trying to fix this for Windows / WAMP
This post came when I was doing a search for the same error, and my issue seems to have been similar to the original posters: The session.save_path in the php.ini was different then the setting in Administration > Configuration > Media > File system.
But I didn't want to change the setting in drupal as I am working with a copy of a site I have hosted elsewhere and wanted to maintain compatibility between the two installations.
The remote install is on a shared host, and the local install is on a windows box running WAMP_32. After a bit of digging I found I could edit the \WAMP_32\bin\apache\Apache2.2.21\conf\extra\httpd-vhosts.conf like so:
The line of interest up there is: php_value session.save_path "g:/tmp"
Obviously you want the path to match your installation, and this won't work if you are not using vhosts, but the same php_value directive could probably be used elsewhere.
????
hi
i read this topic, but i can't repair this problem.
i have 4 error:
Warning: file_put_contents(temporary://filevRxXRx) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (line 1903 of /home/pouyapol/public_html/includes/file.inc).
The file could not be created.
Warning: file_put_contents(temporary://fileIvFaLP) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (line 1903 of /home/pouyapol/public_html/includes/file.inc).
The file could not be created.
i can't install module and use views in site.
please help...
=-=
where is your tmp folder and what are the folder permissions?
:|
all folders permission: 755
tmp: ??
Public file system path: sites/default/files
=-=
well you need to know where your tmp folder is. if you don't know where it is you don't know that it's 755
Drupal checks a common path set in administer -> file system which is typically above the public root.
Win 7 fresh install - same problem, how to fix
Had the same problem with a new, fresh install of Drupal (using 7.23) on Windows 7 (IIS 7), MySQL 5.1 and PHP 5.3.
Already had a version of Drupal working, but it was copied from a Debian server and used \tmp (so, C:\tmp) while the fresh version used sites/default/files/tmp.
In my scenario, the problem was that a mysterious user IUSR (PHP maybe?) was the one trying to write to the folder, not the default IIS_IUSRS. Gave it the appropriate permissions and everything worked fine.
I updated the database directory.
I am documenting this in case anyone else has this issue.
When I started up the site, I received the error message "Error viewing drupal index after installation (file_put_contents(temporary://file1Yl6Vj): failed to open stream)".
This is because the temporary file was set to "Applications/MAMP/tmp/php", which I did not have on my machine. I tried to create it, but I did not work. So I had to change the temporary file path. Unfortunately, you can not change it because you have to get into the site to change it and I could not login because the temporary files could not be created.
The paths are stored in the table named "variable".
So, the solution is:
1. Go to your command line box, navigate to the directory where the mysql command is stored ("C:\Users\Dennis\Sites\Drupal-UniServer\usr\local\mysql\bin" in my case), and enter:
**NOTE:** The "s:26" and "s:4" means the string is 26 and 4 characters long, respectively. Also, there is NO space after the -p (password parm). So yes, the -p should be -ppassword.
Here is a screen shot of what I did to fix this.
Then I create the tmp directory and I was up and running.
PS. I could not use phpMyAdmin because it show the "value" field as a blob instead of a text string.
Dennis