File uploads fail- PLEASE HELP

When I try to add an icon/picture I get an error message saying "Avatar upload failed", regardless of how small I make the file. When I try to add a file, it says "There was an error uploading the file".......PLEASE HELP ME FIX THIS PROBLEM!!!
I really need help.... 

  • Ok, I tried and it didn't work....

    I changed the .htaccess file to this:

    # php 5, apache 1 and 2

    <IfModule mod_php5.c>

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

    php_value memory_limit 64M

    # 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 (50 MB)

    php_value post_max_size 50M

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

    php_value upload_max_filesize 50M

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

    php_value display_errors 0

    </IfModule>

    ...and the htaccess_dist file to this:

    # php 5, apache 1 and 2

    <IfModule mod_php5.c>

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

    php_value memory_limit 64M

    # 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 (50 MB)

    php_value post_max_size 50M

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

    php_value upload_max_filesize 50M

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

    php_value display_errors 0

    </IfModule>

    ......then I continued to refresh my screen, go to the admin-panel and upgrade and flush the caches, anything to get it to work....it still says "Avatar upload failed"....
  • What about file upload?

    Rodolfo Hernandez
    Arvixe/Elgg Community Liaison

  • @Iwant2learn

    Try creating a php.ini in your root and setting that like:

    upload_max_filesize = 10M

    post_max_size = 10M

    bit of a long shot but that worked for me when I have a similar problem.

    regards

  • I tried this too:

    <IfModule mod_rewrite.c>

     

    RewriteEngine on

     

    # If Elgg is in a subdirectory on your site, you might need to add a RewriteBase line

    # containing the path from your site root to elgg's root. e.g. If your site is

    # http://example.com/ and Elgg is in http://example.com/SuperSonicManoloBlahnik/SuperSonicSite/, you might need

    #

    RewriteBase /SuperSonicManoloBlahnik/SuperSonicSite/

    #

    # here, only without the # in front.

    #

    # If you're not running Elgg in a subdirectory on your site, but still getting lots

    # of 404 errors beyond the front page, you could instead try:

    #

    #RewriteBase /

     

    # In for backwards compatibility

    RewriteRule ^pg\/([A-Za-z0-9\_\-]+)$ engine/handlers/page_handler.php?handler=$1&%{QUERY_STRING}

    RewriteRule ^pg\/([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/page_handler.php?handler=$1&page=$2&%{QUERY_STRING}

    RewriteRule ^tag\/(.+)\/?$ engine/handlers/page_handler.php?handler=search&page=$1

    .....and I tried the php.ini file.....still no luck with the avatar or file upload....
  • ok- I waited 5 more minutes and refreshed and it's working now!

    THANK YOU!!!!!!

     

  • Anytime

    Rodolfo Hernandez
    Arvixe/Elgg Community Liaison

  • Could I ask which of the 3 options corrected the problem? I'm having the same issue and followed the same steps but no joy...

  • i have same problems but in my case avatar and other file

    i have edited my htaccess like this

    <IfModule mod_php5.c>
        php_value memory_limit 128M
        php_value register_globals 0
        php_value post_max_size 1M
        php_value upload_max_filesize 1M
        php_value max_input_time 10   
        php_value max_execution_time 10
        php_value display_errors 0
    </IfModule>

    note my php installed
        php_value memory_limit 128M
        php_value register_globals 0
        php_value post_max_size 200M
        php_value upload_max_filesize 150000k
        php_value max_input_time 10   
        php_value max_execution_time 10:

     

    but still not work, please help anyone

  • Change this:

        php_value upload_max_filesize 150000k

     

    To this:

        php_value upload_max_filesize 150000k

     

    Rodolfo Hernandez

    Arvixe/Elgg Community Liaison

  • @rjcalifornia, still no work sir,

    # php 5, apache 1 and 2
    <IfModule mod_php5.c>
    php_value memory_limit 128M
    php_value register_globals 0
    php_value post_max_size 200M
    php_value upload_max_filesize 150000k
    php_value max_input_time 10
    php_value max_execution_time 10
    php_value display_errors 0
    </IfModule>