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 upload suddenly stops working?

April 13, 2011 1:21am

Subscribe [3]
  • #1 / Apr 13, 2011 1:21am

    vacationmouse

    34 posts

    Setup - EE 1.6.8 / nGen File / SolSpace File Upload

    Scenario 1:  A new member registers for the site.  They then want to add a new property listing.  First, they add the details.  Then they add images.  Everything works fine until it comes to adding the images. 

    1) Browse for the image
    2) Click upload
    3) Page comes back with:  Something happened while uploading file.jpeg

    Scenario 2:  A member with an existing listing wants to add a new image.
    1) Browse
    2) Upload
    3) Image uploads

    Researched on the forums and seems to be some sort of permissions issue.  I check all the image upload folders and they are all set to 777.  File Upload Preferences are OK in admin.  I checked the TMP settings in PHP to make sure the TMP folder is accessible - that checked out OK.

    I can add a file to the post within the Admin but that won’t work for our users as we don’t want them poking in the admin.

    I know this is likely going to be a plugin issue and not supported by EE but I’ve spent a few hours banging my head against the wall and am hoping you have some debugging suggestions.

    Speaking of which, I also modified core.file_upload.php (I think that’s it) to display the error but nothing displayed - Does that mean it is error code 4?  If so, what is 4 and how do I fix it 😊

    Thanks in advance.

  • #2 / Apr 13, 2011 12:30pm

    Brandon Jones

    5500 posts

    Hi vacationmouse,

    First I’d recommend updating to 1.7.1, and the latest add-ons, as a number of issues were fixed since that release. Does a regular file upload field work properly?

  • #3 / Apr 20, 2011 10:42pm

    vacationmouse

    34 posts

    File upload via editing the weblogs in the admin work fine.  Also, file upload works fine for every listing up to a specific number, then every weblog post ( listing) after that doesn’t let images upload.

    Now instead of failing with the error message, it just goes back to the same page, no error, no picture…

  • #4 / Apr 21, 2011 3:06am

    John Henry Donovan

    12339 posts

    vacationmouse,

    How much PHP memory do you have?
    In your nGen field settings have you turned on show existing files. Maybe set that to no

    Which add-on is doing the file uploading?

    To confirm. This is a SAEF?
    How does a member with an existing listing edit it?
    SAEF does not support editing of entries

    Also, file upload works fine for every listing up to a specific number, then every weblog post ( listing) after that doesn’t let images upload.

    So would you say specifically this is the main issue?

  • #5 / Apr 21, 2011 10:55am

    vacationmouse

    34 posts

    256MB

    In your nGen field settings have you turned on show existing files. Maybe set that to no

    Couldn’t find that setting.

    LG SAEF File upload is doing the uploading

    Users upload weblog entries through a custom form/template

    Also, file upload works fine for every listing up to a specific number, then every weblog post ( listing) after that doesn’t let images upload.

    So would you say specifically this is the main issue?

    The main issue is the whole site is out of whack but this used to work until about a week ago - for new and existing weblog entries (listings)  But yeah, this is a showstopper as new user’s can’t upload photos to their weblog posts (listings) and therefore the site is useless to them.

  • #6 / Apr 21, 2011 3:44pm

    vacationmouse

    34 posts

    Upgraded to 1.7.1 - no change…  Client just signed up for hosting with HostEngine which hopefully will help resolve some of the setup issues we’ve had on the previous host.

    So, do I do a clean install on the new server and migrate the content over? Move the site over and do an in-place upgrade to 2.0… inquiring minds want to know…

  • #7 / Apr 21, 2011 5:03pm

    Brandon Jones

    5500 posts

    Hi vacationmouse,

    I wouldn’t say there’s a “right” way to do it, other than do it one step a time, making sure everything is working before moving onto the upgrade or migration. Please let us know how you progress!

  • #8 / Apr 22, 2011 1:16pm

    vacationmouse

    34 posts

    open_basedir set = /home/

    file permissions on upload folder and all subfolders 777

    same upload settings on site1 / site2

    File upload preferences set to allow anything to be uploaded instead of just images - interesting note, when I changed it to allow only images, it tried to upload and then threw an error that it was ‘not an image’ even it is an image downloaded from another weblog entry that is working fine…

    1.7.1 upgrade

    I’m about to give up…

  • #9 / Apr 22, 2011 1:45pm

    Brandon Jones

    5500 posts

    Well, that certainly sounds odd. Have you had a chance to try on EngineHosting yet?

  • #10 / Apr 25, 2011 11:51pm

    vacationmouse

    34 posts

    Copied the entire site over to Enginehosting http://vacationmouse.ehclients.com/vm.php  (for some reason the index page isn’t automatically loaded although I changed it to vm.php in the fresh 1.7.1 install)

    Image upload is *STILL* not working, but only for new listings/weblogs that are created.  I can upload images to any listings created before a specific listing…

    Can’t see a difference between a ‘working’ listing and a ‘broken’ listing at least insofar as the database is concerned…

  • #11 / Apr 26, 2011 6:28am

    John Henry Donovan

    12339 posts

    vacationmouse,

    Can I confirm that it is indeed LG SAEF File upload you are using?
    At the start of the thread you mention nGen File and SolSpace File Upload

    Can you as an SuperAdmin upload the images for your Scenario 1 or is the issue just for members of another group?

    There is no file upload by default in the SAEF so it’s pretty hard for us to troubleshoot other than just run through the regular settings. The issue may lie here with the third-party add-on. It might be an idea to write the author, Leevi concurrently with this thread.

  • #12 / May 13, 2011 1:46am

    vacationmouse

    34 posts

    Sorry for the delay. Here is what I know about how things are configured on this site.

    First, file upload worked fine and then one day a user complained that it didn’t and any new users have had problems uploading images.

    Users who had previously uploaded images still can upload.

    Now for the configuration details.

    Currently:
    1) Hosted in HostEngine w/ EE 1.6.8 and PHP 5 (had to roll back because the previous developer changed core files and upgrading to 1.7.1 broke a lot more than it fixed, which wasn’t much)

    2) The form in question is using a Custom Field of type nGen File Field Type to store the information for the image files.

    3) File upload preferences are pointing to the appropriate directories for uploading images using and entry called “Main Upload Directory”

    4) I turned off the plugin LG SAEF File Upload and could still upload an image in a weblog that was previously uploading / broken one still gave error “•Something happened while uploading” which seems to indicate LG SAEF isn’t doing the uploading

    5) Also have Mark Huot’s File Filetype installed and in troubleshooting, I deleted it.  Everything worked the same as in #4 above, so I assume this isn’t being used and is redundant to nGen File Field type - I know nGen File Field is doing the heavy lifting because the custom fields didn’t work until it was configured correctly.

    6) Based on 4 and 5, does this mean that EE’s native file upload capability is being used? i.e. the same upload function that is used when I edit a blog posting using control panel? (which works, by the way, even for the ‘broken’ weblogs)

    7) Turning on template debugging provides no additional information when the error occurs.

    8) No SQL error messages are displayed when the error occurs.

    9) It doesn’t seem to be a file size or file number Apache limit as I can still upload files and in fact have uploaded one of the test files to a working blog post.

    10) I believe that open_basedir and safe mode are not causing the problem as uploading works for some blog entries but not others and the site is hosted on HostEngine which should mean it is configured correctly for EE, right?

    11) Seems like an nGen problem now since the error message appears to be coming from there and I have ruled out/disabled SAEF File Upload and Mark Huot’s File

    Round and round we go…

  • #13 / May 13, 2011 2:13am

    vacationmouse

    34 posts

    And the final piece of the puzzle…  apparently the previous developer also modified the nGen core file http://ellislab.com/forums/viewthread/110252/P594/

    It puts all images for each user into unique folders for that user, e.g. user 12345 has their images saved in folder {site_url}/images/uploads/1/2/3/4/5

    The one piece of the puzzle that doesn’t fit seems to be focused on the one blog entry that was created where the user first couldn’t upload the image.

    I’ll need to find out of newer users since then have been able to upload images.

    Is there any way to have nGen provide more info on what is causing the error?

  • #14 / May 13, 2011 7:32am

    John Henry Donovan

    12339 posts

    vacationmouse,

    What are the permissions set to for all the users folders under your Main Upload folder?

    Try turning off “Apply XSS Filtering to uploaded files?” setting in Security and Session Preferences?

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

ExpressionEngine News!

#eecms, #events, #releases