Help with uploading files

I can upload PDF files just fine.  Whenever I attempt to upload an MP3 I get the error...

"form is missing token or ts fields"

any ideas?

  • Try a small mp3 file and see if it does the same thing.

  • It worked with a smaller one.  Is there a file size limit causing the error?

  • My CPanel says the upload_max_filesize is 30M in php config.

    The file upload on Elgg seems to be cutting off much lower than that, around 9M.


  • No Daemonik, its not due to file size. its because while uploading big files it will take much time and that will make the security tokens validity expire.


  • Ah, thanks.

    How do I go about fixing that?

  • Could it be one of these php config values?

    max_execution_time = 60

    max_input_time = 120

  • Found a solution.  If anyone else has this problem do the following...


    1. Find the options in your FTP program, tell it to let you view hidden files.

    2. Look for a file called .htaccess, located in elgg root directory.

    3. Open the file with a program that can edit it.  I used Dreamweaver.

    4. Between <IfModule mod_php5.c>  and </IfModule> add...

    <IfModule mod_php5.c>
        php_value memory_limit 72M
        php_value register_globals 0
        php_value post_max_size 30M
        php_value upload_max_filesize 30M
        php_value max_input_time 120   
        php_value max_execution_time 60
        php_value display_errors 0

    Those are the settings that worked for me.  I got the numbers from my cPanel (under Php Configuration).

  • The token is good for an hour so that is unlikely to be the issue. The likely issue is the php configuration - you've gotten the max input time and max upload file size but you will also want to increase post max size.

  • Ah, thanks.  It did seem to work at first but now it's not.  I'll try increasing the post size.

  • That worked.  Wish someone had told me that to begin with.  I thought it was just a file size limitation but got sidetracked because of Webgalli's post.  Oh well, I learned something about php configuration.

    Thanks again.


    Edit: Corrected previous solution post.