I changed the php.ini setting to this:
memory_limit = 32M ---> 320M
post_max_size = 16M-->160M
upload_max_filesize = 32M--> 320M
with the initial setting i could upload files smaller than 1M and for larger till 6M it echoed query error(means it was unable to insert the file into database) and for larger than 6M it echoed fatal error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 24117249 bytes) in C:\xampp\htdocs\func\publication.php on line 50
now with the changed numbers for all sizes i have query error
here is the query if needed
Expand|Select|Wrap|Line Numbers
- $upload = "INSERT INTO upload(name, size,type,content) ".
- "VALUES ('$fileName', '$fileSize', '$fileType','$content')";
- mysql_query($upload) or die('Unable to upload, query failed');
AddHandler application/x-httpd-php .php
php_value post_max_size 200M
php_value upload_max_filesize 200M
php_value memory_limit 300M
php_value output_buffering on
php_value max_execution_time 259200
php_value max_input_time 259200
php_value session.cookie_lifetime 0
php_value session.gc_maxlifetime 259200
php_value default_socket_timeout 259200
in this way when i upload files in a directory, i can upload up to 20MB but if i want upload my files in db with blob var,i can only upload to the 1MB range,what should i do if i want to upload a larg file in my database?