I am trying to modify existing PHP code, mySQL database and server settings (php.ini and .htaccess) at GoDaddy to allow for uploads in excess of 20MB (new limit will be 30M). Currently, when I upload anything larger than 8MB, the PHP code apparently executes (I know this because there is an update query that shows the result of the upload), no errors are reported from PHP, mySQL or the server, but nothing is uploaded either.
I have set the following parameters in the php.ini file:
memory_limit = 100M
post_max_size = 30M
file_uploads = On
upload_max_filesize = 30M
m开发者_如何学编程ax_execution_time = 0
max_input_time = 0
my .htaccess file says
LimitRequestBody 0
My PHP code works well for files under 8 MB but I am having trouble figuring out why anything over that is not happening at all. I checked the file upload location (I physically upload the file to the server's filesystem before I insert/update the data into mySQL) and the files over 8MB never make it. So my guess is that this is where it fails.
Anyone have an idea what I am missing?
Thanks in advance for any input.
M
EDIT:
OK - feel free to award me the dufus badge! I am working in php5. The friggin php.ini file (at least on this server - don't know if this is true of other servers) only works for versions below 5. For version 5 you have to use php5.ini.
As per the GoDaddy support document: http://help.godaddy.com/article/1475
On MySQL side, there is max_allowed_packet variable that limits size of single request, e.g the size of SQL query. You can set it to 50MB or so in your case.
Use a phpinfo file to check for definite what the limits are. Just make a file with the following contents and call it whatever you like (with php extension...):
<?php phpinfo(); ?>
According to this post (http://wordpress.org/support/topic/upload_max_filesize-increase-on-godaddy) you need to add another line to your .htaccess:
suPHP_ConfigPath php.ini
精彩评论