Quick question
am 08.12.2005 21:53:09 von Chris Payne
------=_NextPart_000_0004_01C5FC0F.7CF558D0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Hi there everyone,
How do I set the following items with ini_set()? I looked at the manual but
when I try nothing happens:
* file_uploads
* upload_max_filesize
* max_input_time
* memory_limit
* max_execution_time
* post_max_size
Basically I need to be able to upload 1gig files via FTP which is based on
PHP, when the file uploads successfully it then adds the info to a mysql
database so that the administration program can control the programs
uploaded, but I can't upload any large files only small ones.
Any help would REALLY be appreciated as this is quite urgent and I've
searched the net for examples but couldn't find what I needed.
Help me o-b-1, you're my only hope :-)
Thanks everyone.
Chris
------=_NextPart_000_0004_01C5FC0F.7CF558D0--
Re: Quick question
am 08.12.2005 22:12:06 von Joseph Crawford
------=_Part_23493_17206744.1134076326733
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
ini_set('max_execution_time', 9600);
that's how you set the max_execution_time, i would assume the rest follow
the same format.
notice the time is in seconds.
--
Joseph Crawford Jr.
Zend Certified Engineer
Codebowl Solutions, Inc.
1-802-671-2021
codebowl@gmail.com
------=_Part_23493_17206744.1134076326733--
Re: Quick question
am 09.12.2005 00:27:37 von Amol Hatwar
** Comments Inline **
*chop*
> Basically I need to be able to upload 1gig files via FTP which is based on
Whoa! Did I read ONE GIG? By FTP I understand *the* File Transfer
Protocol. How is it based on PHP?
> PHP, when the file uploads successfully it then adds the info to a mysql
> database so that the administration program can control the programs
> uploaded, but I can't upload any large files only small ones.
On FTP? Or from a PHP generated Web page?
> Any help would REALLY be appreciated as this is quite urgent and I've
> searched the net for examples but couldn't find what I needed.
For this answer I am assuming that you want to stick One Gig-o-files
using a PHP script. Let me know if this isn't the case. There are two
things to consider here:
1. The PHP script time-out (usually 30 secs) and the max-upload (2 MB)
2. The Apache Process recycle-time (look for settings in httpd.conf)
You can try playing around with these values. However, it is not good
for your scripts,Apache and PHP to stay in memory for such a long time
(till your huge file gets uploaded). They simply aren't designed to do
that. They are designed to just serve the requested page and shut up.
I'd suggest you use some different mechanism like SCP (if you don't want
to touch FTP) or rsync over SSH if you'd like the thing run unattended.
Regards,
ah
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Quick question
am 09.12.2005 12:55:22 von M.Ford
On 08 December 2005 20:53, Chris Payne wrote:
> Hi there everyone,
>=20
>=20
>=20
> How do I set the following items with ini_set()? I looked at
> the manual but
> when I try nothing happens:
>=20
>=20
>=20
> * file_uploads
> * upload_max_filesize
> * max_input_time
> * memory_limit
> * max_execution_time
> * post_max_size
Apart from max_execution_time, the things affected by those settings all ta=
ke place before your script even gains control -- so changing them in the s=
cript can never have any useful effect. To do any good, they must be set i=
n an appropriate config file (php.ini, httpd.conf, .htaccess, etc.) as perm=
itted.
Cheers!
Mike
------------------------------------------------------------ ---------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211=20
To view the terms under which this email is distributed, please go to http:=
//disclaimer.leedsmet.ac.uk/email.htm
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php