Re: [PHP] large file uploads

2004-04-07 Thread Raditha Dissanayake
Arthur Radulescu wrote:

I have forgot to mention that I have tried this and modified the php.ini on
a windows system but had no success. There is no error but the file does not
get uploaded either.
 

The error message is in your log file.

Arthur

 



--
Raditha Dissanayake.
-
http://www.radinks.com/print/upload.php
SFTP, FTP and HTTP File Upload solutions 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] large file uploads

2004-04-07 Thread Jason Wong
On Wednesday 07 April 2004 22:14, Arthur Radulescu wrote:
> The code is below (pieces of it). The folders have write permissions. It
> works just fine with smaller files but nothing happens with larger files

1) What are your upload-related settings in php.ini?
2) Have you enabled FULL error reporting?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Uniforms only come in two sizes, too small and too large
-- Murphy's Bush Fire Brigade Laws n6
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] large file uploads

2004-04-07 Thread Arthur Radulescu
The code is below (pieces of it). The folders have write permissions. It
works just fine with smaller files but nothing happens with larger files


if(!is_uploaded_file($_FILES['file']['tmp_name'])){
$ERR['file']=1;
}

if(!sizeof($ERR)){
$try=copy_file($_FILES['file']['tmp_name'],
$TO_FILE);
// copy_file makes the upload using copy or
move_uploaded_file

if($try=="copy_err"){
echo "copy_err";
}
else{
echo "copy_success";
}

}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] large file uploads

2004-04-07 Thread Jay Blanchard
[snip]
Yes I restarted the server and then the computer... No success... The
page
timeouts after a while but the file does not gets uploaded
[/snip]

Please trim your replies, and please do not top post.

Can we see your upload code?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] large file uploads

2004-04-07 Thread Arthur Radulescu
Yes I restarted the server and then the computer... No success... The page
timeouts after a while but the file does not gets uploaded


Arthur





Looking for a job!? Use the smart search engine!!
Find a Job from Millions WorldWide...
http://search.jobsgrabber.com

- Original Message - 
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "Arthur Radulescu" <[EMAIL PROTECTED]>; "John Nichel" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, April 07, 2004 5:12 PM
Subject: RE: [PHP] large file uploads


> [snip]
> I have forgot to mention that I have tried this and modified the php.ini
> on
> a windows system but had no success. There is no error but the file does
> not
> get uploaded either.
> [/snip]
>
> Did you restart your web server?
>
>
>
> !DSPAM:40740ae1152691248315722!
>
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] large file uploads

2004-04-07 Thread Jay Blanchard
[snip]
I have forgot to mention that I have tried this and modified the php.ini
on
a windows system but had no success. There is no error but the file does
not
get uploaded either.
[/snip]

Did you restart your web server? 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] large file uploads

2004-04-07 Thread Arthur Radulescu
I have forgot to mention that I have tried this and modified the php.ini on
a windows system but had no success. There is no error but the file does not
get uploaded either.


Arthur


- Original Message - 
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "John Nichel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, April 07, 2004 5:05 PM
Subject: RE: [PHP] large file uploads


[snip]
...fried...

And it is served with a heaping serving of home fries, and covered with
a delicious white country gravy. (Low calorie fried manuals available
upon request).

Sorry...couldn't resist.  ;)
[/snip]

Thanks, I needed that!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] large file uploads

2004-04-07 Thread Jay Blanchard
[snip]
...fried...

And it is served with a heaping serving of home fries, and covered with 
a delicious white country gravy. (Low calorie fried manuals available 
upon request).

Sorry...couldn't resist.  ;)
[/snip]

Thanks, I needed that!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] large file uploads

2004-04-07 Thread John Nichel
Jay Blanchard wrote:
[snip]
Does any one now how I can handle large file uploads (around 10-20 MB)
with PHP.  I need this functionality into an intranet but I cannot
figure out what I must configure to handle this. 
[/snip]

http://us3.php.net/features.file-upload The manual is your fried, read
it, love it, use it.
And it is served with a heaping serving of home fries, and covered with 
a delicious white country gravy. (Low calorie fried manuals available 
upon request).

Sorry...couldn't resist.  ;)

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] large file uploads

2004-04-07 Thread Raditha Dissanayake
Arthur Radulescu wrote:

Hello!

Does any one now how I can handle large file uploads (around 10-20 MB) with PHP.  I need this functionality into an intranet but I cannot figure out what I must configure to handle this. 
 

http://www.radinks.com/upload/config.php will tell you all the 
parameters that you need to change. 
http://www.raditha.com/megaupload/upload.php will tell you how to get 
past the upload restrictions if you don't have access to the php.ini file.



--
Raditha Dissanayake.
-
http://www.radinks.com/print/upload.php
SFTP, FTP and HTTP File Upload solutions 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] large file uploads

2004-04-07 Thread Jay Blanchard
[snip]
Does any one now how I can handle large file uploads (around 10-20 MB)
with PHP.  I need this functionality into an intranet but I cannot
figure out what I must configure to handle this. 
[/snip]

http://us3.php.net/features.file-upload The manual is your fried, read
it, love it, use it.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread Fred

I believe that you must normally restart apache for php.ini changes to take
affect.  The fact that the changes show up in phpinfo() may or may not
indicate that the changes are actually in effect.  If your ISP has not
restarted apache, you may want to ask them to do so in order to save
yourself a lot of head aches.  If that is not the problem, then read on.

In your initial request you mentioned that you suspected that
HTTP_KEEP_ALIVE was suspect and you asked for information on how to change
that environmental variable.  The HTTP_KEEP_ALIVE setting in apache controls
how long the server wait for a second request on a single connection before
closing the connection.  This setting is typically set to something like 15
seconds and would not affect the behavior of your script.

If you look at your phpinfo() under the apache heading you will notice a row
called "Timeouts".  There are two settings listed here.  The first is
"Connection" which is typically 300 and the second is keep-alive which is
typically 15.

If your ISP has 300 set for keep-alive then you may want to advise them to
change it because it leaves unused connections open for 5 minutes clogging
up memory and child processes.

I suspect, however, that it is the "Connections" setting that is set to 300.
If that is the case then your ISP can open httpd.conf and edit the line that
says:

timeout 300

and change it to a larger number.  They could also change this setting to
"0" which means there is no timeout.  That could also cause problems,
however, because abandoned connections could tie up system resources.

This may solve your problem, but I dount it.  This timeout setting controls
the amount of time that apache waits for three things:

1. The total amount of time it takes to receive a GET request.
2. The amount of time between receipt of TCP packets on a POST or PUT
request.
3. The amount of time between ACKs on transmissions of TCP packets in
responses.

In other words, as long as data is flowing apache will not timeout.  I have
a script that automatically generates 20MB word files and apache has no
problem keeping the connection alive for the 30 minutes it takes to download
the data over a slow connection despite the fact that "Timeout" is set to
300.

If your php.ini settings are indeed correct, it may well be that apache is
timing out for some reason, but if that is the case it is caused by one of
the three reasons above.

The first reason is not the issue because you are not using the GET method.
The third reason is not the issue because ACKs are sent by the receiving
host rather than the sender, so apache is not expecting ACKs.

That leaves only the second reason:

The amount of time between receipt of TCP packets on a POST or PUT request.

If this is the problem, it would indicate that your browser has stopped
sending packets for more than 300 seconds.  If you have not done so, you may
wish to monitor the data flow to determine if this is the case.  If so, then
your browser is timing out for some reason unrelated to apache or php and
you may want to try another browser.

If this is not the problem then you have me stumped.

Fred

Fred <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Did you read my post?  I did all of that *before* I posted my question.
>
> Anyone else have a suggestion?
>
> TIA
>
> Fred
>
> On Wed, 05 Dec 2001 05:16:38 -0500, Mirek Novak wrote:
>
> > fred wrote:
> >
> >> After all of this, and you give me the wrong answer.  If you read the
> >> PHP manual, you will see that set_time_limit falls defaults to
> >> max_execution_time, which I already have set to 2400, so your answer is
> >> irrelevant.  That is not controlling HTTP_KEEP_ALIVE, which is
> >> defaulting to 300 seconds somewhere - probably httpd.conf.
> >>
> >> Now who is lazy?
> >
> > it was ONE question to google.com:  +"large file uploads" +php results
> > in
> >
http://www.phpbuilder.com/forum/read.php3?num=2&id=137901&loc=0&thread=11834
0
> >
> > -X-
> >
> >
> >



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Did you read my post?  I did all of that *before* I posted my question.

Anyone else have a suggestion?

TIA

Fred

On Wed, 05 Dec 2001 05:16:38 -0500, Mirek Novak wrote:

> fred wrote:
> 
>> After all of this, and you give me the wrong answer.  If you read the
>> PHP manual, you will see that set_time_limit falls defaults to
>> max_execution_time, which I already have set to 2400, so your answer is
>> irrelevant.  That is not controlling HTTP_KEEP_ALIVE, which is
>> defaulting to 300 seconds somewhere - probably httpd.conf.
>>
>> Now who is lazy?
> 
> it was ONE question to google.com:  +"large file uploads" +php results
> in
> http://www.phpbuilder.com/forum/read.php3?num=2&id=137901&loc=0&thread=118340
> 
> -X-
> 
> 
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread Mirek Novak

fred wrote:

> After all of this, and you give me the wrong answer.  If you read the PHP
> manual, you will see that set_time_limit falls defaults to
> max_execution_time, which I already have set to 2400, so your answer is
> irrelevant.  That is not controlling HTTP_KEEP_ALIVE, which is defaulting
> to 300 seconds somewhere - probably httpd.conf.
>
> Now who is lazy?

it was ONE question to google.com:  +"large file uploads" +php
results in
http://www.phpbuilder.com/forum/read.php3?num=2&id=137901&loc=0&thread=118340

-X-




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread fred

After all of this, and you give me the wrong answer.  If you read the PHP
manual, you will see that set_time_limit falls defaults to
max_execution_time, which I already have set to 2400, so your answer is
irrelevant.  That is not controlling HTTP_KEEP_ALIVE, which is defaulting
to 300 seconds somewhere - probably httpd.conf.

Now who is lazy?

On Wed, 05 Dec 2001 04:25:15 -0500, Fred wrote:

> Sorry, I don't know where you are coming from.  You don't know me, and
> are assuming things that just aren't true, calling me lazy?
> 
> Thank you for the info. Now to answer your accusation...
> 
> I searched the newsgroups all day and never found that function, and
> scoured php.net.  I searched the PHP bugs forum.  Sorry I missed that
> one function in the 1,259 page PHP manual.  I did find the other six
> items I listed, which stumped a lot of other people, 100's of them in
> fact, for many reasons.  I tested and debugged that script.  I posted it
> for the benefit of others, as well as to give all info about my problem.
> So, according to you, not only am I lazy, but I guess all the others
> with the file upload problem must be lazy too.
> 
> Is that work *your* definition of lazy?  It isn't mine.
> 
> If you want to help people, help them, otherwise, find something else to
> do.
> 
> I saw your post here in May asking for help. I guess you're glad someone
> helped *you* when you asked here, hmm?
> 
> On Wed, 05 Dec 2001 04:19:51 -0500, Mirek Novak wrote:
> 
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Sorry, I don't know where you are coming from.  You don't know me, and are
assuming things that just aren't true, calling me lazy?

Thank you for the info. Now to answer your accusation...

I searched the newsgroups all day and never found that function, and
scoured php.net.  I searched the PHP bugs forum.  Sorry I missed that one
function in the 1,259 page PHP manual.  I did find the other six items I
listed, which stumped a lot of other people, 100's of them in fact, for
many reasons.  I tested and debugged that script.  I posted it for the
benefit of others, as well as to give all info about my problem. So,
according to you, not only am I lazy, but I guess all the others with the
file upload problem must be lazy too.

Is that work *your* definition of lazy?  It isn't mine.

If you want to help people, help them, otherwise, find something else to
do.

I saw your post here in May asking for help. I guess you're glad someone
helped *you* when you asked here, hmm?

On Wed, 05 Dec 2001 04:19:51 -0500, Mirek Novak wrote:


> fred wrote:
> 
>> Now that you've "helped" me, go and help someone else...please.
>>
>> And yes, I did read the manual and several books on PHP already.
>>
>> Have you?
> 
> and have you seen function "set_time_limit()" while u were reading the
> manual?. BTW - this was on the list many times and as u were noting '...
> that is what are the newsgroupf for' instead of this they are for to be
> searched TOO! Just don't be lazy!
> 
> HTH
> M.N.
> 
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread Mirek Novak


fred wrote:

> Now that you've "helped" me, go and help someone else...please.
>
> And yes, I did read the manual and several books on PHP already.
>
> Have you?

and have you seen function "set_time_limit()" while u were reading the
manual?. BTW - this was on the list many times and as u were noting '...
that is what are the newsgroupf for' instead of this they are for to be
searched TOO! Just don't be lazy!

HTH
M.N.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Now that you've "helped" me, go and help someone else...please.

And yes, I did read the manual and several books on PHP already.

Have you?

On Wed, 05 Dec 2001 04:09:00 -0500, Mirek Novak wrote:

> so, RTFM
> 
> HTH
> 
> M.N.
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Now that you've "helped" me, go and help someone else...please.

And yes, I did read the manual and several books on PHP already.

Have you?

On Wed, 05 Dec 2001 04:09:00 -0500, Mirek Novak wrote:

> so, RTFM
> 
> HTH
> 
> M.N.
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Now that you've "helped" me, go and help someone else...please.

And yes, I did read the manual and several books on PHP already.

Have you?

On Wed, 05 Dec 2001 04:09:00 -0500, Mirek Novak wrote:

> so, RTFM
> 
> HTH
> 
> M.N.
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread Mirek Novak

so, RTFM

HTH

M.N.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Sorry, no can do, I can't stand SPAM, and I don't need any more email. 
Just reply to the newsgroup.  I can read it there, and it may help others
- that is what newsgroups are for!;-)

On Wed, 05 Dec 2001 03:57:05 -0500, Mirek Novak wrote:

> fix your email to receive answers FIRST!
> 
> M.N.
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Large file uploads timeout - ouch!

2001-12-05 Thread Mirek Novak

fix your email to receive answers FIRST!

M.N.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]