Unable to upload "large" files

Hi all,

I have been racking my brain around trying to figure this problem out. My upload feature seems to be failling at files beyond 2MB. I've scoured the discussions and wiki and google group. I haven't really found anything that can help. My host server's php version is set to 5. I have all the mod access. I have my .htaccess configured as the following

# limit the maximum memory consumed by the php script to 64M

php_value memory_limit 128M

# register_globals is deprecated as of PHP 5.3.0 - disable it for security reasons.

php_value register_globals 0

# post_max_size is the maximum size of ALL the data that is POST'ed to php at a time (8 MB)

php_value post_max_size 50M

# upload_max_filesize is the maximum size of a single uploaded file (5 MB)

php_value upload_max_filesize 25M

php_value max_execution_time 300

php_value max_input_time 300

# on development servers, set to 1 to display errors. Set to 0 on production servers.

php_value display_errors 0

The files appear to be uploaded. In chrome I can see the upload completing. In smaller files, the completed uploads have an appropriate icon dictating what they are(Say PDFs). But when the file is "too large" it shows up as a blank paper icon. When I attempt to download it, it returns a file of size 0 bytes. In good files, the icons will be there (Doc or pdf or the thumbnailed image), and downloads returns the entire file. Within the admin log, I can see it writing something into an elggfilestore. The calls are no different than successful files. Any insight would be helpful.

 

Thanks

  • Forgot to post my Elgg installation version. I'm running Elgg 1.7.8

  • What hosting are you using? Your .htaccess seems to be ok. what type of file?

    Rodolfo Hernandez
    Arvixe/Elgg Community Liaison

  • We are using Mediatemple's gridservice as a hosting platform. the files are basically any type of files. I've tried pdfs, jpgs, txt files. If they're over a 2meg size, it turns into that page thing.

  • Ok, some hosts have a place to set Php variables on the cpanel, try to change the upload limits there.

    Rodolfo Hernandez
    Arvixe/Elgg Community Liaison

  • Ahhhhh... Ahhhhahhahhahaa. Going to choke someone. Ok, so when i used a <?php phpinfo;?> call, it was showing default values for all my php stuff. We have some other domains hosted that deal with transfering large files. I took a look at the HTAccess files of that service and compared it to the one for elgg. Basically, the php_value etc. wasn't even in any IFModule tag. So I just copy and pasted our big file sizes outside as such:

    <IfModule mod_php5.c>

    # limit the maximum memory consumed by the php script to 64M

    php_value memory_limit 128M

    # register_globals is deprecated as of PHP 5.3.0 - disable it for security reasons.

    php_value register_globals 0

    # post_max_size is the maximum size of ALL the data that is POST'ed to php at a time (8 MB)

    php_value post_max_size 50M

    # upload_max_filesize is the maximum size of a single uploaded file (5 MB)

    php_value upload_max_filesize 25M

    php_value max_execution_time 300

    php_value max_input_time 300

    # on development servers, set to 1 to display errors. Set to 0 on production servers.

    php_value display_errors 0

    </IfModule>

    php_value memory_limit 2147483648

    php_value post_max_size 2147483648

    php_value upload_max_filesize 2147483648

    and it works now. Excuse me while I jump off a bridge.