ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

File uploads not working

March 11, 2010 9:33pm

Subscribe [4]
  • #1 / Mar 11, 2010 9:33pm

    MeritMile

    9 posts

    Since last week, out of nowhere I’m unable to upload files of any sort. I use nGen File Field for my uploads but when troubleshooting tried the default Publish upload option which always throws this error at me.

    “A problem was encountered while attempting to upload your file”

    When hitting Update after browsing for my file (I’ve tried both images and PDF’s with no luck) via nGen, I’m brought to the View Entry screen where I would normally see the file name but there’s nothing, so it’s not even making it this far. It won’t error right away most of the time, but after trying to upload a few times will display it’s error message with all of the previous files that wouldn’t upload queued in the error list…like it took a while for them to get a response from the server as to where they’re going or whats happening to them.

    Everything else appears to be working fine, even weblogs I have already uploaded files using nGen are fine.

    I’ve tried a few things in troubleshooting, like double checking the server path to the upload directory, turning off XSS filtering, and I also got my host on the phone and had him check permissions on everything, including his own temp directory; it’s a Windows server btw. I also made sure php safe mode wasn’t on, which it isn’t.

    Any help would be appreciated!

  • #2 / Mar 11, 2010 9:57pm

    Brandon Jones

    5500 posts

    Hi MeritMile, a few things:

    1. Have you looked at this wiki entry?
    2. Can you upload files via FTP to your upload directory?
    3. Which version and build are you running?

    It’s very possible something has changed on the server without your knowledge and this is still a permissions issue.

  • #3 / Mar 11, 2010 10:31pm

    MeritMile

    9 posts

    1. I’ve gone over the wiki thoroughly and tried all the steps with no luck.

    2. Yes I can upload via FTP and even point nGen directly to the file and it works fine

    3. EE 1.6.8 Build 20090723

    I thought something may have changed on the server too but had my host check permission on any and everything we could think of.

    Also, since I’ve noticed this problem I’m also having some trouble with a couple of weblog entries that when updated through the CMS save but the front-end of the site doesn’t pick it up, it’s almost like there’s some data corruption going on.

  • #4 / Mar 12, 2010 1:39am

    John Henry Donovan

    12339 posts

    MeritMile,

    Was there anything different about the file you tried to upload that was different from others that were successful, file size, type etc?

    Can you upload and run our Server Wizard please?

    Also, since I’ve noticed this problem I’m also having some trouble with a couple of weblog entries that when updated through the CMS save but the front-end of the site doesn’t pick it up, it’s almost like there’s some data corruption going on.

    Are you using any caching?

    Are folders being generated inside /system/cache/?

  • #5 / Mar 12, 2010 11:01am

    MeritMile

    9 posts

    I tried a whole slew of files. First, one of my users reported not being able to upload a PDF, so I logged in and tried it myself and it wouldn’t work. So I tried adding a couple of different image files to another weblog and experienced the same thing, so this isn’t just one specific weblog having the problem, it’s now the entire CMS not being able to upload files, period. In troubleshooting I even created a new weblog and a new upload directory and am getting the same result.

    I ran the Server Wizard and it came up clean. No problems.

    I’m assuming Caching is on by default, and I had EE clear out the cache because there were a bunch of cached sessions in the /system/cache folder from a week ago that never cleared out. Since clearing out the cache nothing has changed, I’m still experiencing the same problem.

    I just spent the last hour on the phone with my host checking some settings including making sure there’s nothing wrong with the integrity of the database, which there isn’t.

  • #6 / Mar 12, 2010 3:43pm

    Sue Crocker

    26054 posts

    MeritMike, who are you hosting with? Is it a Windows or Unix server? Have uploads always been an issue, or is this something new?

    Have you seen: EEWiki:// HowTo Determine Memory Limits How much memory is allocated to PHP?

  • #7 / Mar 12, 2010 6:30pm

    MeritMile

    9 posts

    We’re hosted on a Windows server, as mentioned above. Uploads were working fine until about a week ago where it just stopped working out of nowhere. I’ve confirmed with the host that nothing has been changed on the server. This is acting like there are permission issues somewhere yet from what I had my host check out, everything looks fine. I’m 90% sure there is a problem in the CMS somewhere. I am the only admin allowed on the site and hadn’t touched it in months and this just started happening.

    in php info, memory_limit is set to 128M. The files that we’re trying to upload are no bigger than 500k.

  • #8 / Mar 13, 2010 9:56am

    Sue Crocker

    26054 posts

    This is a guess (no devs around right this second to confirm) that there is a temp folder that gets written to during the upload process. Again, this is a guess. But you’re right, it sounds like a permissions problem.

    You’re a few builds behind. Lets have you upgrade to the most recent build and see if a file refresh helps with the problem.

  • #9 / Mar 14, 2010 4:36pm

    MeritMile

    9 posts

    I just completed updating EE to the latest build, I’m now on 1.6.8 Build 20100121. Still having the same issue.

    Also, I’ve been keeping my eye on the other thread on here which looks identical to my issue

    http://ellislab.com/forums/viewthread/148808/P36/

    My php info has the open_basedir property declared, but has no value. I just sent my host an email to have that removed to see if it fixes the problem.

    If this ends up being the cause, why is it that both myself and this other user experienced it at the same time on two completely different servers from two completely different hosts? The client is going to want to know where the problem started for accountability reasons.

    UPDATE - 6:35pm

    I had my host check the php.ini file for the open_basedir property. It was commented out and not set. Not sure how this should be set, if at all. According to a few sites I’ve seen, on a Windows server you may want to have this set to the root folder for the entire server, ie. C:/Inetpub/vhosts. On the other hand I don’t want to have my host make any changes that would affect other users of theirs on the same box.

    He sent me the php.ini file in case you need me to check anything.

  • #10 / Mar 15, 2010 3:42am

    John Henry Donovan

    12339 posts

    MeritMile,

    that there is a temp folder that gets written to during the upload process.

    In your php.ini file you will see a path value for upload_tmp_dir This is the folde r you will need correct permissions to and what Sue is referring to. Can you ask your host about permissions to this directory please?

    Also this Wiki article gives a bit of background which is useful.

    EE Wiki : File Upload Extensions and Windows IIS

    Also, since I’ve noticed this problem I’m also having some trouble with a couple of weblog entries that when updated through the CMS save but the front-end of the site doesn’t pick it up, it’s almost like there’s some data corruption going on.

    Are you using caching of any sort? Do these entries ever appear on your frontend?

  • #11 / Mar 15, 2010 4:30pm

    MeritMile

    9 posts

    I had my host set both of these paths as suggested in the wiki and make sure they are fully writeable

    open_basedir = “C:\inetpub\vhosts”
    upload_tmp_dir = “C:\inetpub\vhosts\upload_temp”

    No luck, same issue. My host says if someone needs to log in and check anything out, he can set up some temp credentials.

  • #12 / Mar 15, 2010 6:36pm

    MeritMile

    9 posts

    My host just called after playing with the upload for a while and noticed when attempting an uploading and hitting Update, EE is creating a file in the Uploads directory (the final upload destination) called filename.tmp, so we know EE is writing to the Uploads folder but we still don’t know what is happening after that…

  • #13 / Mar 15, 2010 9:10pm

    Brandon Jones

    5500 posts

    MeritMile,

    Under CP Home ›  Admin ›  Utilities ›  PHP Info , can you confirm the local and master values of these settings:

    safe_mode
    open_basedir
    upload_tmp_dir

    Routine software upgrades likely modified settings or permissions, we just need to figure out where.

  • #14 / Mar 16, 2010 11:12am

    MeritMile

    9 posts

    Routine software upgrades likely modified settings or permissions, we just need to figure out where.

    Exactly right. Turns out the permissions got kicked out on my Uploads directory as well as a couple of other upload destinations I had set. Not sure how or why but after setting permissions to everyone, one folder at a time, the host got it working.

  • #15 / Mar 16, 2010 1:13pm

    Sue Crocker

    26054 posts

    Yay!! Glad you were able to find out what the problem was. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases