CVS update: php3
| From: | rasmus | Date: | Tue, 25 Aug 1998 19:56:30 +0000 |
| Subject: | CVS update: php3 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-576@lists.php.net to get a copy of this message | ||
Date: Tuesday August 25, 1998 @ 15:56
Author: rasmus
Update of /repository/php3
In directory asf:/export/home/rasmus/php3
Modified Files:
ChangeLog main.c mod_php3.c mod_php3.h php3.ini-dist
Log Message:
Add upload_max_filesize directive
Index: php3/ChangeLog
diff -c php3/ChangeLog:1.463 php3/ChangeLog:1.464
*** php3/ChangeLog:1.463 Tue Aug 25 14:48:55 1998
--- php3/ChangeLog Tue Aug 25 15:56:25 1998
***************
*** 22,27 ****
--- 22,30 ----
name changed to "parameters" to match the documentation and to be consistent
with the rest of the API.
- Delete uploaded temporary files automatically at the end of a request
+ - Add upload_max_filesize and correponsing php3_upload_max_filesize directive
+ to control the maximum size of an uploaded file. Setting this to 0 would
+ completely eliminate file uploads.
August 15, 1998 Version 3.0.3
- Changed the name of fopen_basedir to open_basedir, to be a little more
Index: php3/main.c
diff -c php3/main.c:1.463 php3/main.c:1.464
*** php3/main.c:1.463 Fri Aug 21 15:12:26 1998
--- php3/main.c Tue Aug 25 15:56:26 1998
***************
*** 29,35 ****
+----------------------------------------------------------------------+
*/
! /* $Id: main.c,v 1.463 1998/08/21 19:12:26 zeev Exp $ */
/* #define CRASH_DETECTION */
--- 29,35 ----
+----------------------------------------------------------------------+
*/
! /* $Id: main.c,v 1.464 1998/08/25 19:56:26 rasmus Exp $ */
/* #define CRASH_DETECTION */
***************
*** 1002,1007 ****
--- 1002,1010 ----
if (cfg_get_string("upload_tmp_dir", &php3_ini.upload_tmp_dir) == FAILURE) {
/* php3_ini.upload_tmp_dir = UPLOAD_TMPDIR; */
php3_ini.upload_tmp_dir = NULL;
+ }
+ if (cfg_get_long("upload_max_filesize", &php3_ini.upload_max_filesize) == FAILURE)
{
+ php3_ini.upload_max_filesize = 2097152; /* 2 Meg default */
}
if (cfg_get_string("extension_dir", &php3_ini.extension_dir) == FAILURE) {
php3_ini.extension_dir = NULL;
Index: php3/mod_php3.c
diff -c php3/mod_php3.c:1.80 php3/mod_php3.c:1.81
*** php3/mod_php3.c:1.80 Fri Aug 14 19:47:12 1998
--- php3/mod_php3.c Tue Aug 25 15:56:27 1998
***************
*** 27,33 ****
| (with helpful hints from Dean Gaudet <dgaudet@arctic.org> |
+----------------------------------------------------------------------+
*/
! /* $Id: mod_php3.c,v 1.80 1998/08/14 23:47:12 steffann Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
--- 27,33 ----
| (with helpful hints from Dean Gaudet <dgaudet@arctic.org> |
+----------------------------------------------------------------------+
*/
! /* $Id: mod_php3.c,v 1.81 1998/08/25 19:56:27 rasmus Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
***************
*** 302,307 ****
--- 302,308 ----
if (add->auto_prepend_file != orig.auto_prepend_file) new->auto_prepend_file =
add->auto_prepend_file;
if (add->auto_append_file != orig.auto_append_file) new->auto_append_file =
add->auto_append_file;
if (add->upload_tmp_dir != orig.upload_tmp_dir) new->upload_tmp_dir =
add->upload_tmp_dir;
+ if (add->upload_max_filesize != orig.upload_max_filesize) new->upload_max_filesize =
add->upload_max_filesize;
if (add->extension_dir != orig.extension_dir) new->extension_dir = add->extension_dir;
if (add->short_open_tag != orig.short_open_tag) new->short_open_tag =
add->short_open_tag;
if (add->debugger_host != orig.debugger_host) new->debugger_host = add->debugger_host;
***************
*** 456,461 ****
--- 457,465 ----
case 18:
conf->open_basedir = pstrdup(cmd->pool, arg);
break;
+ case 19:
+ conf->upload_max_filesize = atol(arg);
+ break;
}
return NULL;
}
***************
*** 515,520 ****
--- 519,525 ----
{"php3_error_prepend_string", php3take1handler, (void *)16, OR_OPTIONS, TAKE1,
"String to add before an error message from PHP"},
{"php3_error_append_string", php3take1handler, (void *)17, OR_OPTIONS, TAKE1,
"String to add after an error message from PHP"},
{"php3_open_basedir", php3take1handler, (void *)18, OR_OPTIONS|RSRC_CONF, TAKE1,
"Limit opening of files to this directory"},
+ {"php3_upload_max_filesize", php3take1handler, (void *)19, OR_OPTIONS|RSRC_CONF, TAKE1,
"Limit uploaded files to this many bytes"},
{"php3_track_errors", php3flaghandler, (void *)0, OR_OPTIONS, FLAG,
"on|off"},
{"php3_magic_quotes_gpc", php3flaghandler, (void *)1, OR_OPTIONS, FLAG,
"on|off"},
Index: php3/mod_php3.h
diff -c php3/mod_php3.h:1.43 php3/mod_php3.h:1.44
*** php3/mod_php3.h:1.43 Fri Aug 14 19:47:12 1998
--- php3/mod_php3.h Tue Aug 25 15:56:28 1998
***************
*** 26,32 ****
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
! /* $Id: mod_php3.h,v 1.43 1998/08/14 23:47:12 steffann Exp $ */
#ifndef _MOD_PHP3_H
#define _MOD_PHP3_H
--- 26,32 ----
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
! /* $Id: mod_php3.h,v 1.44 1998/08/25 19:56:28 rasmus Exp $ */
#ifndef _MOD_PHP3_H
#define _MOD_PHP3_H
***************
*** 62,67 ****
--- 62,68 ----
char *auto_prepend_file;
char *auto_append_file;
char *upload_tmp_dir;
+ long upload_max_filesize;
char *extension_dir;
long short_open_tag;
char *debugger_host;
Index: php3/php3.ini-dist
diff -c php3/php3.ini-dist:1.44 php3/php3.ini-dist:1.45
*** php3/php3.ini-dist:1.44 Fri Aug 14 17:57:44 1998
--- php3/php3.ini-dist Tue Aug 25 15:56:28 1998
***************
*** 94,100 ****
include_path = ; UNIX: "/path1:/path2" Windows:
"\path1;\path2"
doc_root = ; the root of the php pages, used only if nonempty
user_dir = ; the directory under which php opens the script using /~username, used only if
nonempty
! upload_tmp_dir = \windows\temp ; temporary directory for HTTP uploaded files
extension_dir = ./ ; directory in which the loadable extensions (modules) reside
--- 94,101 ----
include_path = ; UNIX: "/path1:/path2" Windows:
"\path1;\path2"
doc_root = ; the root of the php pages, used only if nonempty
user_dir = ; the directory under which php opens the script using /~username, used only if
nonempty
! ;upload_tmp_dir = ; temporary directory for HTTP uploaded files (will use system
default if not specified)
! upload_max_filesize = 2097152 ; 2 Meg default limit on file uploads
extension_dir = ./ ; directory in which the loadable extensions (modules) reside
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net