Large file upload
am 10.12.2002 08:58:49 von Kelvin Varst
Hi,
I'm trying to upload large files via my homepage. I'm using a form:
print "
method=\"POST\">";
And with files up to approx 500kb it works. But with larger files, the
browser can't find the page, and if I refresh the page, I get some query
errors. In the php.ini the post_max_size is set to 8M.
Kelvin :-)
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Re: Large file upload
am 10.12.2002 11:30:45 von sharmad
Thanks everyone,
The problem was lying in the hostname not specified which php as usual
wouldn't tell me
pg_connect("host=$rr dbname=$rr user=$rr");
Thanks
Sharmad
Kelvin Varst writes:
>
> Hi,
>
> I'm trying to upload large files via my homepage. I'm using a form:
> print "
> method=\"POST\">";
>
> And with files up to approx 500kb it works. But with larger files, the
> browser can't find the page, and if I refresh the page, I get some query
> errors. In the php.ini the post_max_size is set to 8M.
>
> Kelvin :-)
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
Feel free to contact me (flames about my english and the useless of this
driver will be redirected to /dev/null, oh no, it's full...). (Michael
Beck, describing the PC-speaker sound device)
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Re: Large file upload
am 10.12.2002 12:40:31 von Vince Vielhaber
On Tue, 10 Dec 2002, Kelvin Varst wrote:
>
> Hi,
>
> I'm trying to upload large files via my homepage. I'm using a form:
> print "
> method=\"POST\">";
>
> And with files up to approx 500kb it works. But with larger files, the
> browser can't find the page, and if I refresh the page, I get some query
> errors. In the php.ini the post_max_size is set to 8M.
If it's taking longer than about 25-30 seconds you could be timing out.
Try putting set_time_limit(0) at the top of the script. If it works you
might want to try replacing the 0 with a reasonable time limit. The time
is in seconds.
Vince.
--
Fast, inexpensive internet service 56k and beyond! http://www.pop4.net/
http://www.meanstreamradio.com http://www.unknown-artists.com
Internet radio: It's not file sharing, it's just radio.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Re: Large file upload
am 10.12.2002 14:56:40 von jco
This is a multipart message in MIME format.
--=_alternative 004CA5A5C1256C8B_=
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
If it's taking longer than about 25-30 seconds you could be timing out.
Try putting set_time_limit(0) at the top of the script. If it works you
might want to try replacing the 0 with a reasonable time limit. The time
is in seconds.
Vince.
Are you sure that would work? I may be wrong, but my gues would be that=20
the "set_time_limit(0)" would not be evaluated until the posted file has=20
been received and then the php starts executing. I would think that one=20
has to change a php-setting hard.
/J=F8rn Cornelius Olsen
--=_alternative 004CA5A5C1256C8B_=
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
If it's taking longer than about 25=
-30 seconds you could be timing out.
Try putting set_time_limit(0) at the top of the script. If it works y=
ou
might want to try replacing the 0 with a reasonable time limit. The t=
ime
is in seconds.
Vince.
Are you sure that would work? I may=
be wrong, but my gues would be that the "set_time_limit(0)" woul=
d not be evaluated until the posted file has been received and then the php=
starts executing. I would think that one has to change a php-setting hard.=
/J=F8rn Cornelius Olsen
--=_alternative 004CA5A5C1256C8B_=--
Re: Large file upload
am 10.12.2002 15:16:54 von Vince Vielhaber
On Tue, 10 Dec 2002 jco@cornelius-olsen.dk wrote:
> If it's taking longer than about 25-30 seconds you could be timing out.
> Try putting set_time_limit(0) at the top of the script. If it works you
> might want to try replacing the 0 with a reasonable time limit. The time
> is in seconds.
>
> Vince.
>
> Are you sure that would work? I may be wrong, but my gues would be that
> the "set_time_limit(0)" would not be evaluated until the posted file has
> been received and then the php starts executing. I would think that one
> has to change a php-setting hard.
Not sure if it will or not. I used it recently for a similar problem
but right now I don't recall if it was for an upload or something else.
Vince.
--
Fast, inexpensive internet service 56k and beyond! http://www.pop4.net/
http://www.meanstreamradio.com http://www.unknown-artists.com
Internet radio: It's not file sharing, it's just radio.
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
Re: Large file upload
am 10.12.2002 20:03:52 von Kelvin Varst
Hi,
The upload takes more than 30 seconds, but I get the error immediately. I
dont think that the webserver is aware of the page will take longer than 30
seconds to upload and therefore sends an error at the beginning of the
upload.
Kelvin :-)
-----Oprindelig meddelelse-----
Fra: Vince Vielhaber [mailto:vev@michvhf.com]
Sendt: 10. december 2002 12:41
Til: Kelvin Varst
Cc: Postgresql PHP
Emne: Re: [PHP] Large file upload
On Tue, 10 Dec 2002, Kelvin Varst wrote:
>
> Hi,
>
> I'm trying to upload large files via my homepage. I'm using a form:
> print "
action=\"approve_element.php\"
> method=\"POST\">";
>
> And with files up to approx 500kb it works. But with larger files, the
> browser can't find the page, and if I refresh the page, I get some query
> errors. In the php.ini the post_max_size is set to 8M.
If it's taking longer than about 25-30 seconds you could be timing out.
Try putting set_time_limit(0) at the top of the script. If it works you
might want to try replacing the 0 with a reasonable time limit. The time
is in seconds.
Vince.
--
Fast, inexpensive internet service 56k and beyond! http://www.pop4.net/
http://www.meanstreamradio.com http://www.unknown-artists.com
Internet radio: It's not file sharing, it's just radio.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
Re: Large file upload
am 10.12.2002 20:29:26 von jco
This is a multipart message in MIME format.
--=_alternative 006B1E82C1256C8B_=
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
At www.php.net someone writes:
"When uploading very large files (greater than the default 8M) I found=20
that I had alter not only the "max_file_size" input and the php.ini=20
max_file_size limit, but ALSO the "post_max_size" variable in the php.ini=
=20
file.
Because I was submitting the file via a POST request, it would hit this=20
limit and deny the upload."
If that still doesn't help you might consider telling us what error=20
messages you are getting.
Regards
/J=F8rn
"Kelvin Varst"
Sent by: pgsql-php-owner@postgresql.org
10-12-2002 20:03
=20
To: "Vince Vielhaber"
cc: "Postgresql PHP"
Subject: Re: [PHP] Large file upload
Hi,
The upload takes more than 30 seconds, but I get the error immediately. I
dont think that the webserver is aware of the page will take longer than=20
30
seconds to upload and therefore sends an error at the beginning of the
upload.
Kelvin :-)
-----Oprindelig meddelelse-----
Fra: Vince Vielhaber [mailto:vev@michvhf.com]
Sendt: 10. december 2002 12:41
Til: Kelvin Varst
Cc: Postgresql PHP
Emne: Re: [PHP] Large file upload
On Tue, 10 Dec 2002, Kelvin Varst wrote:
>
> Hi,
>
> I'm trying to upload large files via my homepage. I'm using a form:
> print "
action=3D\"approve_element.php\"
> method=3D\"POST\">";
>
> And with files up to approx 500kb it works. But with larger files, the
> browser can't find the page, and if I refresh the page, I get some query
> errors. In the php.ini the post_max_size is set to 8M.
If it's taking longer than about 25-30 seconds you could be timing out.
Try putting set_time_limit(0) at the top of the script. If it works you
might want to try replacing the 0 with a reasonable time limit. The time
is in seconds.
Vince.
--
Fast, inexpensive internet service 56k and beyond! http://www.pop4.net/
http://www.meanstreamradio.com http://www.unknown-artists.com
Internet radio: It's not file sharing, it's just radio.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
--=_alternative 006B1E82C1256C8B_=
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
At www.php.net someone writes:
"When uploading very large file=
s (greater than the default 8M) I found that I had alter not only the "=
;max_file_size" input and the php.ini max_file_size limit, but ALSO th=
e "post_max_size" variable in the php.ini file.
Because I was submitting the file vi=
a a POST request, it would hit this limit and deny the upload."
If that still doesn't help you might=
consider telling us what error messages you are getting.
Regards
/J=F8rn
| "Kelvin Varst" <kelv=
in@varst.dk>
Sent by: pgsql-php-owner@postgresql.=
org
10-12-2002 20:03
|
To: &nbs=
p; "Vince Vielhaber" <vev@michvhf.com><=
/font>
cc: &nbs=
p; "Postgresql PHP" <pgsql-php@postgresql.=
org>
Subject:=
Re: [PHP] Large file upload |
Hi,
The upload takes more than 30 seconds, but I get the error immediately. I
r>
dont think that the webserver is aware of the page will take longer than 30=
seconds to upload and therefore sends an error at the beginning of the
upload.
Kelvin :-)
-----Oprindelig meddelelse-----
Fra: Vince Vielhaber [mailto:vev@michvhf.com]
Sendt: 10. december 2002 12:41
Til: Kelvin Varst
Cc: Postgresql PHP
Emne: Re: [PHP] Large file upload
On Tue, 10 Dec 2002, Kelvin Varst wrote:
>
> Hi,
>
> I'm trying to upload large files via my homepage. I'm using a form:
> print &q=
uot;<form enctype=3D\"multipart/form-data\"
action=3D\"approve_element.php\"
> method=3D\"POST\">";
>
> And with files up to approx 500kb it works. But with larger files, the=
> browser can't find the page, and if I refresh the page, I get some que=
ry
> errors. In the php.ini the post_max_size is set to 8M.
If it's taking longer than about 25-30 seconds you could be timing out.
Try putting set_time_limit(0) at the top of the script. If it works y=
ou
might want to try replacing the 0 with a reasonable time limit. The t=
ime
is in seconds.
Vince.
--
Fast, inexpensive internet service 56k and beyond! http://www.pop4.n=
et/
http://www.meanstreamradio.com http://www.unkn=
own-artists.com
Internet radio: It's not file sharing, it's ju=
st radio.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
--=_alternative 006B1E82C1256C8B_=--
Re: Large file upload
am 10.12.2002 21:20:21 von Vince Vielhaber
On Tue, 10 Dec 2002, Kelvin Varst wrote:
>
> Hi,
>
> The upload takes more than 30 seconds, but I get the error immediately. I
> dont think that the webserver is aware of the page will take longer than 30
> seconds to upload and therefore sends an error at the beginning of the
> upload.
I seem to have trimmed the message out. What exactly does the message
say and what server and browser are you using?
>
> Kelvin :-)
>
> -----Oprindelig meddelelse-----
> Fra: Vince Vielhaber [mailto:vev@michvhf.com]
> Sendt: 10. december 2002 12:41
> Til: Kelvin Varst
> Cc: Postgresql PHP
> Emne: Re: [PHP] Large file upload
>
>
>
> On Tue, 10 Dec 2002, Kelvin Varst wrote:
>
> >
> > Hi,
> >
> > I'm trying to upload large files via my homepage. I'm using a form:
> > print "
> action=\"approve_element.php\"
> > method=\"POST\">";
> >
> > And with files up to approx 500kb it works. But with larger files, the
> > browser can't find the page, and if I refresh the page, I get some query
> > errors. In the php.ini the post_max_size is set to 8M.
>
> If it's taking longer than about 25-30 seconds you could be timing out.
> Try putting set_time_limit(0) at the top of the script. If it works you
> might want to try replacing the 0 with a reasonable time limit. The time
> is in seconds.
>
> Vince.
> --
> Fast, inexpensive internet service 56k and beyond! http://www.pop4.net/
> http://www.meanstreamradio.com http://www.unknown-artists.com
> Internet radio: It's not file sharing, it's just radio.
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
Vince.
--
Fast, inexpensive internet service 56k and beyond! http://www.pop4.net/
http://www.meanstreamradio.com http://www.unknown-artists.com
Internet radio: It's not file sharing, it's just radio.
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org