We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

File

Development and Programming

Matt Weinberg's avatar
Matt Weinberg
489 posts
17 years ago
Matt Weinberg's avatar Matt Weinberg

Could you be hitting a php memory limit or php max upload limit?

       
stinhambo's avatar
stinhambo
1,268 posts
17 years ago
stinhambo's avatar stinhambo
Could you be hitting a php memory limit or php max upload limit?

Yeah I’ll check that!

       
stinhambo's avatar
stinhambo
1,268 posts
17 years ago
stinhambo's avatar stinhambo

; Maximum allowed size for uploaded files. upload_max_filesize = 32M

; Maximum amount of memory a script may consume (8MB) memory_limit = 16M

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
17 years ago
Matt Weinberg's avatar Matt Weinberg

What happens if you raise the memory limit to 40MB (assuming your host allows it)? How big is your file?

       
stinhambo's avatar
stinhambo
1,268 posts
17 years ago
stinhambo's avatar stinhambo

I have raised it to 32Mb and it seems to work fine. I am running on a MAMP server. I wonder if there is something fishy there?

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
17 years ago
Matt Weinberg's avatar Matt Weinberg

I bring my PHP memory up to 40 or 60MB on all Expression Engine sites I work on. Between all the image processing, mods, huge templates with tons of conditionals, embeds, etc…. I tend to hit the 8MB limit on page loads or other processing quickly.

       
stinhambo's avatar
stinhambo
1,268 posts
17 years ago
stinhambo's avatar stinhambo

Ah my hosts have a 128Mb limit so I think I will follow suit!

       
jmargari's avatar
jmargari
1 posts
17 years ago
jmargari's avatar jmargari

I am having an issue getting this to work on the machine I use for development. It works great in the production environment hosted at Media Temple, but not so much on my laptop. I am doing my development on a Windows machine using XAMPP for Apache PHP and MySQL. The error I am getting is the following:

Image – There was a problem uploading ‘AquaBlue.jpg’.

“Image” is the name of my field. “AquaBlue.jpg” is the name of the image I am trying to upload.

I have been racking my brain all day trying to figure this out. Here are some things I have tried:

  • Fresh EE Install
  • Permissions on the uploads directory (I even went as far as giving ‘Everyone’ full control of the directory.
  • I did the same thing as above on the php “tmp” directory
  • I upped the max upload size and memory max in php.ini

Does anyone have any thoughts here?

       
Jermaine M's avatar
Jermaine M
20 posts
17 years ago
Jermaine M's avatar Jermaine M
2. If I turn on file rename, then upload 2 or 3 images, only the last image gets uploaded by 3 times!

This issue was driving me crazy so I decided to dig deep down into the extension and was able to fix this issue. The extension is generating a random filename using a MD5 hash based on the date down to the second and I think the server processes it so fast that multiple files end up getting the same name. So I ended up prepending the date with the filename. I am using version 3.1.1 of the extension.

Change the following

$file_names[$file_key] = $this->_code().$file['ext'];

to

$file_names[$file_key] = $this->_code($file_name).$file['ext'];

And…

function _code()
{
    return md5(date('U'));
}

should be changed to

function _code( $file_name )
{
    $myhash = $file_name.(date('U'));
    return md5($myhash);
}

Hope that this helps others!

       
stinhambo's avatar
stinhambo
1,268 posts
17 years ago
stinhambo's avatar stinhambo
2. If I turn on file rename, then upload 2 or 3 images, only the last image gets uploaded by 3 times!
This issue was driving me crazy so I decided to dig deep down into the extension and was able to fix this issue. The extension is generating a random filename using a MD5 hash based on the date down to the second and I think the server processes it so fast that multiple files end up getting the same name. So I ended up prepending the date with the filename. I am using version 3.1.1 of the extension. Change the following
$file_names[$file_key] = $this->_code().$file['ext'];
to
$file_names[$file_key] = $this->_code($file_name).$file['ext'];
And…
function _code()
{
    return md5(date('U'));
}
should be changed to
function _code( $file_name )
{
    $myhash = $file_name.(date('U'));
    return md5($myhash);
}
Hope that this helps others!

That’s awesome! I’ll change my extension to this straight away.

       
Qrat's avatar
Qrat
40 posts
17 years ago
Qrat's avatar Qrat

Guys, somebody “married” this extension with SAEF?

       
Ty Martin's avatar
Ty Martin
232 posts
17 years ago
Ty Martin's avatar Ty Martin
Guys, somebody “married” this extension with SAEF?

Are you asking if anyone has done so?

       
james Brown's avatar
james Brown
492 posts
17 years ago
james Brown's avatar james Brown

where are they registered? I’d like to send them a wedding gift.

       
Chad Crowell's avatar
Chad Crowell
242 posts
17 years ago
Chad Crowell's avatar Chad Crowell

I had the old version married with no problems, but upgrading to 1.6.2 and 3.1.1 I can’t get it working. I wrote a blog post on this very thing a while ago. note that it was for v2 of the extension not v3.

       
Dane Thomas's avatar
Dane Thomas
139 posts
17 years ago
Dane Thomas's avatar Dane Thomas
Sorry if this has been covered already, and I suspect the answer is ‘no’, but… Is there any conceivable way that it would be possible to add extra metadata for each file upload? The reason why is that I’d like to add a specific alt attribute value for each image. Also, I’m incorporating this with the Lightbox technique which requires a title attribute to create a caption for each image. As I say, I suspect there’s no feasible way of doing this, beyond going back to having multiple fixed custom text input fields (img1, img1_caption, img2, img2_caption, etc) Thanks, Dave

Just wondering if anyone has worked out a solution for ading unique captions to images upload via File?

I’m already using multi text (with 3 columns) for another field so I can’t use MultiText for that either…..

Any ideas?

       
First 26 27 28 29 30 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.