Temp directory permission problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gpzzone
    Member
    • Dec 2005
    • 78
    • 3.8.x

    Temp directory permission problem

    VB 3.8.7

    A few weeks ago my hosts upgraded their servers - this created huge problems with caching of posts, which was resolved by the use of an htaccess file written by the hosts.

    Now it is apparent that Avatars cannot be uploaded due to the absence of a temporary directory.

    I have researched this on this site, and done the following.

    Created a tmp directory with 777 permissions.

    Enabled safe mode upload in VB server settings
    Set the safe mode temporary directory in VB server settings.

    PHP info suggests that the upload_tmp_dir has "No value", and also the open_basedir has "no value".

    The hosts tech support maintain - "It doesn't look like either of those are set for your site. Obviously we can't set it on a serverwide basis as it'd direct others to your site- have you tries using .htaccess to set this up? Alternately if you know what pages are performing the actions you can use ini_set (http://uk.php.net/manual/en/function.ini-set.php)"

    Now I've obviously missed something really obvious because I really cannot believe that I need to start writing htaccess files or php scripts just to get the avatar upload function to work with a fully updated server?

    So what is that I have missed?

    Thanks in advance.

    Craig Davies
    "Live in England and subject yourself to the punishing taxes of envy. It's hard to be a winner in a society dedicated to the glorification of losers."
  • BirdOPrey5
    Senior Member
    • Jul 2008
    • 9613
    • 5.6.3

    #2
    If you wanted to try init_set I would put it in your config.php file, near the top, right after the opening <?php tag.

    It does sound strange though your host won't help you after an upgrade.

    Comment

    • gpzzone
      Member
      • Dec 2005
      • 78
      • 3.8.x

      #3
      I'd need instructions - call me old fashioned, but something as simple as uploading an Avatar should be pretty simple, and not require code tweaks etc.

      As for my hosts - I am seriously cheesed off with them - the sad thing is they are ordinarily very professional.

      It certainly sounds like a server issue to me but before I fire a few barrels off at them I just need to make sure that there's nothing obvious that I'm missing. A search on here does reveal quite a few issues surrounding "permission errors" So I thought I'd air my problem to see if anyone has any wisdom that may help.

      Surely there is a way to have a temporary file allocated to a domain without having to rewrite stuff?
      "Live in England and subject yourself to the punishing taxes of envy. It's hard to be a winner in a society dedicated to the glorification of losers."

      Comment

      • BirdOPrey5
        Senior Member
        • Jul 2008
        • 9613
        • 5.6.3

        #4
        Instructions:

        Open the file /includes/config.php

        Directly below the line: <?php

        Add the line:

        Code:
        ini_set('upload_tmp_dir', '/home/username/tmp;);
        Of course set the directory to your actual temp directory.

        Save/upload file.

        Comment

        • gpzzone
          Member
          • Dec 2005
          • 78
          • 3.8.x

          #5
          I am extremely grateful for your help.

          I tried that and it looked like this.

          Click image for larger version

Name:	iniset.jpg
Views:	1
Size:	17.9 KB
ID:	3685826

          Then when attempting to launch the site - nothing but a blank page. Did I get something wrong?
          "Live in England and subject yourself to the punishing taxes of envy. It's hard to be a winner in a society dedicated to the glorification of losers."

          Comment

          • gpzzone
            Member
            • Dec 2005
            • 78
            • 3.8.x

            #6
            THE PLOT THiICKENS!

            I've been exploring this a bit more....

            If I do as everything on here suggests ie establish the tmp directory CHMod 777 etc etc and point VB to it, enable SAFE MODE in server setting etc it doesn't work, and spits this at me.

            Click image for larger version

Name:	error.jpg
Views:	1
Size:	78.2 KB
ID:	3685828


            If I use the upload test facility in maintenance, it suggests that I can DISABLE safe mode.

            If I disable safe mode, and attempt to upload a file it actually DOES upload it, but reports that it has failed. Like this.

            Click image for larger version

Name:	error2.jpg
Views:	1
Size:	39.9 KB
ID:	3685829

            I'm utterly perplexed, as it now seems to be a reporting issue!!

            PLEASE HELP!
            "Live in England and subject yourself to the punishing taxes of envy. It's hard to be a winner in a society dedicated to the glorification of losers."

            Comment

            • Zachery
              Former vBulletin Support
              • Jul 2002
              • 59097

              #7
              The change joe gave you didn't work. What is wrong is your webhosts true tmp parition doesn't seem to be allowing you to upload/move/etc files with php. Which is bad.

              First, i want you to go to AdminCP > Maintenance > view phpinfo
              find the setting: _SERVER["SCRIPT_FILENAME"]
              You should see something (but not the same) as this: /home/user/httpdocs/vb/forum/416/admincp/index.php
              This is a path from my test server, I know that i need /home/user/ << that is my folder
              In your ftp this is the first folder you likely login to, you can see the httpdocs folder, or public_html, or webroot.
              Here I want you to make a folder, call it temp chmod it to 777. We should now have a /home/user/temp

              In the AdminCP > Settings > Options > Server Settings and Optimization Options >Safe Mode Upload Enabled > Yes

              Then change Safe Mode Temporary Directory to > your new temp folder /home/user/temp in my example.

              Comment

              • gpzzone
                Member
                • Dec 2005
                • 78
                • 3.8.x

                #8
                Zachery thank you for your input.

                The hosts have adjusted the server so that it is no longer running with safe mode restrictions.

                Consequently I have disabled the safe mode upload.

                This appears to have improved things. I can now upload avatars successfully, HOWEVER I am still receiving an error message suggesting that the "Upload of file failed."

                So it looks like we now have to establish what is generating the error message?

                Thanks again

                CD

                Edit

                Update from hosts.........

                We have modified your site specifc config to use /www/vhosts/gpzzone.co.uk/httpdocs/tmp as the upload_tmp_dir directory. We have also changed the permissions on that dir to 777 temporarily for you.
                "Live in England and subject yourself to the punishing taxes of envy. It's hard to be a winner in a society dedicated to the glorification of losers."

                Comment

                • BirdOPrey5
                  Senior Member
                  • Jul 2008
                  • 9613
                  • 5.6.3

                  #9
                  If you're still having issues PM me an Admin login for your site, I'll take a look. If you have an FTP login too that would save some time if I have to go a step further.

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...