Forum Moderators: coopster
Poor, sorry fool that I am, I've just built a nice file upload module for a client and found that my host has the uplaod_max_filesize directive set to 2M in php.ini
I can't change it with ini_set()
Can anyone think of a way round it if my host say they won't change it? (waiting for thier answer)
...and yes, I know I should have thought of this before building it! ;)
Nick
Mmm... I'm not sure but if you have access to your virtual hosts config file you might be able to modify the upload_max_filesize from there.
What I do is setup an SFTP or SSH account to transfer files safely.
Then, with a Web interfase I assign and relocate the files where they belong.
I like this method better because it allows me to do batch uploads and I believe it is faster than HTTP upload.
Sure, you can't check the validity of file types before upload, but I wrote a "filtering" program that checks for new files and erases the ones that don't belong there.
Just an idea, hope it helps.
php_value upload_max_filesize 5M
will successfully set upload_max_filesize to 5MB. You can verify this by using
echo get_ini('upload_max_filesize'); BUT and thereīs always a but:
upload_max_filesize is a PHP_INI_SYSTEM setting [php.net]. Using php_value with such a directive wonīt work [php.net].
Just give it a try anyway. BUT donīt say I didnīt warn you that it probably wonīt work. set all you want, just donīt expect it to work. code anything you want, but donīt expect it to work. Is that the official PHP motto?
:) Andreas
Actually my host says he has it set to this:
upload_max_filesize 100000000
Which I think may be the problem, every other reference I've seen to it always has the value like: 100M
Off to read up...
THanks for the thoughts guys...
Nick