By frychiko on
Hi,
I'm having a problem with the Drupal 7 Alpha 5 install.
One of the requirements is a "/tmp" directory. I've created a "tmp" directory at the root (domain.com/httpdocs/tmp) and made sure ownership / permissions are correct but the message still pops up..
There were other folders that needed to be created but creating those folders and setting the permissions removed those errors as expected but this /tmp just won't go away. Anyone experience this?
cheers,
Peter
Comments
.
/tmpis not at your web root, it is at the root of the server's file system. Trytmpwhich is drupal-relative, or specify a full file path.Thanks for the reply. There's
Thanks for the reply.
There's already a tmp at / chmodded to 777. owner/group is root. What does this mean?
Also, what do you mean by "Try tmp"?
I'm not sure what action to take here to solve this problem.
.
I mean that
- a "tmp" setting without the front slash will get you to a "tmp" directory under drupal
- a setting with a full filesystem path like "/where/is/your/domain.com/httpdocs/tmp" will get to the "tmp" which you prepared.
If you have set "/tmp" and the "/tmp" directory at the server root is 777 but doesn't let you use it, then you may have a different problem, for example an "open_basedir" setting which needs configuring or PHP's "safe mode" which needs disabling.
Your own "tmp" directory somewhere under your domain is always more manageable.
I've not tried D7 yet, unfortunately, but...
What about putting the tmp folder under /sites/all? so it'd be sites/all/tmp
Just a guess, anyway, as that seems to be the desired location for things. Or else, if it is in a multisite install, and you need it to be separate, how about /sites/default/tmp ?
cog.rusty: You say "set"...
cog.rusty:
You say "set"... Are you saying I have to update one of the config files (and point it to my tmp folder?) prior to installing on my server?
I tested and ran Drupal 7 Alpha 4 yesterday and it installed smoothly without any hitches. I've also never ran into this problem with previous versions of Drupal. This seems to be specific to Alpha 5, for me.
kjv1611:
I don't have a multi-site and I just tried your suggestions to no avail.
Thanks for the replies.
.
By "set" I meant the value which you entered in the "Temporary directory" text box in the "admin/config/media/file-system" page.
The difference with alpha4 may be in the default value which was already in that box. If I remember correctly, it was not "/tmp" but "sites/default/files/tmp" or something similar.
In any case, it is up to you to "set" that value to point to a convenient directory which is under the site account's control.
Hmm.. what text box? There's
Hmm.. what text box? There's no admin.. there is nothing yet. This is the first screen during the installation procedure. There is just a list of items that need to be checked off (highlighted in green) such as having the correct PHP version and all that. I have not entered any data anywhere just yet.
Thanks again for the help.
.
I am afraid I lost you.
In your top post here you wrote: "creating those folders and setting the permissions removed those errors as expected but this /tmp just won't go away."
You mean that you are in Drupal installation's screen and you are getting errors about misconfigured /tmp directories, without even having installed Drupal?
Yes that's right. I am trying
Yes that's right. I am trying to complete a Drupal 7 Alpha 5 installation. As per instructions I uploaded all the files to my server and then typed in the domain name url to start the installation.
This is the specific error at the "verify requirements" screen:
"The directory sites/default/files does not exist. The directory /tmp does not exist. An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually or ensure that the installer has the permissions to create it automatically. For more information, see INSTALL.txt or the online handbook."
.
I see, something changed in alpha5. So you can't change the paths at this point and you have to deal with them. If you already have a /tmp directory at the filesystem root and it is already 777, then the problem must be a PHP setting:
- either you have an "open_basedir" path list in your php.ini and you need to add the "/tmp" path in it.
- or you have "safe mode" enabled and you need to disable it.
Hi, I went with the PHP Safe
Hi,
I went with the PHP Safe OFF solution and it then installs smoothly. Thanks again for all your help!
Hi, I have the same problem,
Hi,
I have the same problem, although safe_mode is disabled.
I can't find the directory "/tmp". Just one that is called "/phptmp". And I don't have the permission to create the directory "/tmp" manually.
Is there a way to tell the install script an alternative directory? (i.e. "/sites/default/tmp")
Max
.
You don't have a "/tmp" at your filesystem root and the installer is looking for "/tmp"?
This could be a bug in the installer.
What OS are you using? What is your OS's default temp directory? (for example in Windows it is usually C:\Windows\Temp)
Run a phpinfo (see http://drupal.org/node/59680) inside Drupal's directory. Is there an upload_tmp_dir setting in it? What is it?
Run a script with
What does this print?
sys_get_temp_dir
This is a bug (IMO) in Drupal 7. See #551658: Figure out what to do about new private/public file separation.
upload_tmp_dir is
upload_tmp_dir is "/home/www/web52/phptmp/"
the script gives the following:
sys_get_temp_dir() returns "/tmp"
Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 735 is not allowed to access /tmp owned by uid 0 in /home/www/web52/html/karawanet/drupal/info.php on line 3
with realpath() ""
.
You have PHP's "safe mode" enabled, which is an abandoned failed attempt of PHP for security. You will always have problems with uploads if you don't disable it.
There is also a Drupal 7 bug involved in this (it goes straight to the system's temp directory, ignoring PHP's temp directory). That will probably change in the next alpha release.
You can't change the tamp directory that the installer is looking for, you can only try to make it available during installation. You do have a /tmp directory. Disabling "safe mode" may be enough.
workaround
in settings.php, you can do this:
$conf['file_temporary_path'] = '/phptmp';
(or whatever is available)
That's pretty much a standard..
I don't recall whether it's a written standard or just a highly-suggested standard, but many such folders would go under the /sites/all folder/directory, regardless of whether you're running 1 site with the same drupal install or 15 sites. But as I've yet to have time to play with Drupal 7, I'm clueless as to where the /tmp folder is SUPPOSED to go/be...
Either way, glad you got it sorted out with the folder security settings. Although, you may want to see if you can disable some rights to "everyone", and only allow them to the owner... at least some of them, just a thought, anyway... I don't know what gets put in the /tmp folder, but if it is anything that contains any sort of user info, in particular, then leaving it at 7777 could be a security issue.