upload

"the document contains no data" or can't upload file

symptom: Im trying to use an upload image module with drupal. when i
submit the form, I get a return from the server that says "the document
contains no data" or the site goes to a dead page.

solution: Apache is set to limit php pages to a maximum of 512 KB by
default. I increased the limit to 1 GB (the LimitRequestBody directive
in /etc/httpd/conf.d/php.conf).

There are also limits on file sizes in /etc/php.ini:
post_max_size = 8M
upload_max_filesize = 2M

You might want to change those values, depending on the files sizes you are using.

php mysql blob upload download

Using PHP to upload files into MySQL database sometimes needed by
some web application. For instance for storing pdf documents or images
to make som kind of online briefcase (like Yahoo briefcase).

For the first step, let's make the table for the upload files. The table will consist of.

1. id : Unique id for each file
2. name : File name
3. type : File content type
4. size : File size
5. content : The file itself

Syndicate content