Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with file upload 1

Status
Not open for further replies.

Floof

Technical User
Apr 25, 2001
23
0
0
FR
Hello,

I have a problem with file uploading, on a form I have a <INPUT type=&quot;file&quot;> tag, but after submission, php acts as if there was no file (but my netscape form cache exists (nsformxxxxx in /tmp) and it has the right size)

Any idea with that ?

Thanx for any help ...
 
Errata :

It only works for files under 2Mo
It doesn'n for files over this size

Any idea ?
 
Do a phpinfo() and check the value for upload_max_filesize. You may need to increase the size in the php.ini file to upload larger files.


Calvin
 
Thanks, it solved one part of the problem, now's the next part :

When my user uploads a file, I compress it using bz2 compression, and then I read the compressed file to store in a BLOB ... (I know that's not the best way, but ...) But when I issue my SQL INSERT request, I have the following message :

2006 : The MySQL server has gone away ...

Any idea ?
 
If I may ask..exactly how big is the file you are trying to upload?? and how big is the BLOB?? Is the MySQL Daemon running??

The problem you are having can be for several different reasons. The file is too large, the connection timed out (MySQL automatically closes the connection after 8 hours).

BUT IT SOUNDS LIKE THIS WILL FIX YOUR PROBLEM:
(an excerpt from the manual)
&quot;If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by starting mysqld with the -O max_allowed_packet=# option (default 1M). The extra memory is allocated on demand, so mysqld will use more memory only when you issue a big query or when mysqld must return a big result row!&quot;

Here's a helpful link that may help you on the MySQL manual site: - PAINKILLER
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top