0

I used uplaodify plugin to upload music files. Everyting is okay in my local

uploadify.php file is in public_html/uploadify directory

i want to increment my upload file size limit to 10 MB

i tried to put

php.ini file in public_html

post_max_size = 500M
upload_max_filesize = 500M
max_execution_time = 900;
max_input_time 900

and I am looking my phpinfo() thats good but ı cannot upload bigger than 2MB

And i tried to put same php.ini in public_html/uploadify

Now I can upload file which size 2.5 MB , but no upper;

And

ini_set('upload_max_size','10M');
ini_set('post_max_size','10M');
ini_set('max_execution_time','900');

lines is in the my index.php and uploadify.php

What should I do increment my file upload size limit

EDIT

I look $_FILES[..]['error'], and its 7

UPLOAD_ERR_CANT_WRITE

    Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0.

But I can upload file which smaller than 2.5 MB

3 Answers 3

5

Edit the .htaccess file in the root folder and add these values:

RewriteEngine On
php_value post_max_size 1000M
php_value upload_max_filesize 1000M
php_value max_execution_time 6000000

You can edit it to suit your needs. 1000M = 1GB, so edit accordingly. Do note that your host will need to allow PHP edits.

Sign up to request clarification or add additional context in comments.

3 Comments

İf I add php_value to my .htaccess I get Internal Server Error, Now I look mu $_FILES[..]["error"]; its 7 UPLOAD_ERR_CANT_WRITE Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0. But I can uplaod smaller than 2.5 MB
failed to write usually means that whatever directory PHP's been told to use to store temporary files (e.g. uploads) is not writeable by PHP, or the directory doesn't exist.
what should i fix this problem, Can I create temporary files manuel ? phpinfo(); upload_max_filesize 10M 10M upload_tmp_dir no value no value user_dir no value no value
1

You cannot override upload limits from within a script using ini_set - the upload will have completed (or been aborted) using the original settings long before PHP fires up and processes the ini_sets.

You can't just litter php.ini files around your system either - php doesn't load random .ini files it finds lying around. It only loads them from specific locations. If PHP hasn't been told to load one from the uploadify directory, you'll have to use a .htaccess and php_value directives.

3 Comments

İf I add php_value to my .htaccess I get Internal Server Error
Then your Apache setup isn't allowing php_value to be specified in .htaccess. Check the server's error log and it'll tell you exactly why the 500 error is being produced.
I lookef my error_log file in the root, but no any record, may be my problem can be access problem, becaues $_files[][error] is 7
0

Hello I had the similar issue while uploading a theme on wordpress on localhost. After hours of research I was able to put following 3 lines in my php.ini and restarted the apache and it worked. I thought this will help others.

This will go in file upload section of ini

upload_max_filesize = 800M

post_max_size = 800M

max_file_uploads = 800M

1 Comment

max_file_uploads is "the maximum number of files that can be uploaded via a single request", so 800M is probably not a valid value (and should it be valid, it would still be far far far too much).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.