I'm using an upload script in php and I can't upload a file that is 12 MB. If I don't have access to the php.ini is there a way to get around the maximum upload size?
[man]ini_set/man http://www.php.net/manual/en/ini.php
So, I would do something like this?
ini_set('post_max_size', '16M'); ini_set('upload_max_filesize', '16M');
Where do I put it? In my upload.php file or in a different file? Do I do this only once or everytime I use the file? Thanks for the help.
[man]ini_set/man does not work for all PHP directives.
If you'll look in the appendix, you'll note that these two directives should be changed using a .htaccess file with php_value.
Here's where I'm at so far. I have the upload.php on my server at home where I can adjust the php.ini and I have it uploading to
[url]ftp://username:password@mywebsite.com[/url]
and it seems to work for smaller uploads.
I went and made the following changes:
upload_max_filesize 20M post_max_size 40M memory_limit 64M max_execution_time = -1 max_input_time -1
upload_max_filesize 20M
post_max_size 40M
memory_limit 64M
max_execution_time = -1
max_input_time -1
and it now seems like it works for larger uploads too!
Okay... so... what does this mean? Does this mean you've resolved the issue, or... what's your question?
bradgrafelman wrote:[man]ini_set/man does not work for all PHP directives. If you'll look in the appendix, you'll note that these two directives should be changed using a .htaccess file with php_value.
youre absolutely right - thats why i sent both links. i figured it would be good to know about [man]ini_set/man at least.
Well, the code works and everything seems to be okay but I'm curious if there's a way to add some sort of X percent uploaded? Like some kind of progress indicator? These are such big files that it seems like the computer is freezing up.
http://www.google.com/search?q=upload+progress+bar