LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-24-2003, 03:23 PM   #1
Tomasfuego
Member
 
Registered: Nov 2002
Location: USA
Distribution: Lenny at work
Posts: 168

Rep: Reputation: 30
PHP and File Uploading


This is driving me nuts! I am using Mozilla to upload some files via PHP onto my webserver. On some files like PHP-Nuke-6.8.tar.gz it says that the document contains no data....on konqueror it says the connection was broken.

I checked the php.ini file and it says my max size on file uploads is 10M, which these packages are well under. Other files may upload, things like documents and smaller tar-balled stuff.
 
Old 09-24-2003, 04:29 PM   #2
LarryDoliver
Member
 
Registered: Mar 2003
Posts: 126

Rep: Reputation: 17
if you uploaded via a POST, see php.ini's max_post_size

I think there are a few other max's - the smallest one is your bottleneck.

grep -i max php.ini

to see what all is being limited...
 
Old 09-24-2003, 07:56 PM   #3
Tomasfuego
Member
 
Registered: Nov 2002
Location: USA
Distribution: Lenny at work
Posts: 168

Original Poster
Rep: Reputation: 30
Tried

i doubled the size of the memory limit and the post size limit, which were originally at 8M anyway. My test subject was only 4M. Browser still says the file contains no data.
 
Old 09-25-2003, 01:55 AM   #4
then
Member
 
Registered: Oct 2002
Location: FDR India
Distribution: RH9, Knoppix, MEPIS
Posts: 65

Rep: Reputation: 15
Re: PHP and File Uploading

Quote:
Originally posted by Tomasfuego
...On some files...it says that the document contains no data....on konqueror it says the connection was broken.
Does web upload works for other files, except for this particular file?

Maybe you could look at factors effecting script execution time.

regards
theN
 
Old 09-25-2003, 10:11 AM   #5
Tomasfuego
Member
 
Registered: Nov 2002
Location: USA
Distribution: Lenny at work
Posts: 168

Original Poster
Rep: Reputation: 30
File

it took a tar ball i had made this spring, about 2 Mb. How could I look into the execution time of it? My webserver is also my desktop and that is where I am tring to upload from.
 
Old 09-30-2003, 05:03 PM   #6
Tomasfuego
Member
 
Registered: Nov 2002
Location: USA
Distribution: Lenny at work
Posts: 168

Original Poster
Rep: Reputation: 30
I created a small test script....


So i try uploading a tgz file withthis size: 3,890,896 bytes.
And after a few dozen times, this shows up once in a while.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Request entity too large!

The POST method does not allow the data transmitted, or the data volume exceeds the capacity limit.

If you think this is a server error, please contact the webmaster

Error 413
~~~~~~~~~~~~~~~~~~~~~~~~~~

in my php.ini file,

; Maximum size of POST data that PHP will accept.
post_max_size = 50M
; Maximum allowed size for uploaded files.
upload_max_filesize = 40M

these are rediculously high and the files are still not being accepted!
<<<VERY FRUSTRATED>>>
 
Old 08-12-2004, 09:20 AM   #7
JLDixon
LQ Newbie
 
Registered: Sep 2003
Distribution: RedHat 8,9,EL4,Fedora,AIX5,Slackware10
Posts: 10

Rep: Reputation: 0
Have you tried using the actual size in bytes in the config directives. For example, insted of using 10M in the max_post_size and max_upload_size, use 10485760 as this is the number of bytes in 10MB. Check your memory limit in php.ini as well and use values in bytes and see how well that works.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
uploading multiple files with php dizzutch Programming 0 01-04-2005 04:29 PM
Error uploading file with PHP jacksmash Programming 8 11-22-2003 11:11 AM
uploading php on free server?? farhan Linux - General 1 04-24-2003 04:45 AM
uploading with apache and php chens_83 Linux - General 6 02-16-2003 05:09 AM
PHP and uploading files Syncrm Linux - General 5 07-02-2002 11:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration