cvs: /php4 ChangeLog main.c output.c php.ini-dist php4dll.dsp php_globals.h /php4/ext/com COM.c
| From: | Zeev Suraski | Date: | Tue, 24 Aug 1999 23:12:50 +0000 |
| Subject: | cvs: /php4 ChangeLog main.c output.c php.ini-dist php4dll.dsp php_globals.h /php4/ext/com COM.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-3694@lists.php.net to get a copy of this message | ||
zeev Tue Aug 24 19:12:50 1999 EDT
Modified files:
/php4 ChangeLog main.c output.c php.ini-dist php4dll.dsp
php_globals.h
/php4/ext/com COM.c
Log:
Add output_buffering directive
Index: php4/ChangeLog
diff -u php4/ChangeLog:1.66 php4/ChangeLog:1.67
--- php4/ChangeLog:1.66 Sun Aug 22 14:48:57 1999
+++ php4/ChangeLog Tue Aug 24 19:12:49 1999
@@ -2,6 +2,10 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ?? 1999, Version 4.0 Beta 3
+- Added output_buffering directive to php.ini, to enable output buffering
+ for all PHP scripts (default is off).
+- Fix some more class inheritance issues (Zeev, Zend library)
+- Fixed array_walk to always reset array pointer before working (Andrey)
- Fixed Apache build wrt to shared modules on FreeBSD/Linux (Sascha)
- Added session.extern_referer_chk which checks whether session ids were
referred to by an external site and eliminates them (Sascha)
@@ -17,7 +21,7 @@
- Fixed persistency of MHASH_* constants (Sascha)
- Oracle is now ZTS-Save (Thies)
- Fixed flushing of cached information to disk in DBA's DB2 module (Sascha)
-- OCI8 is now ZTS-Save (Thies)
+- OCI8 is now ZTS-Safe (Thies)
- Fixed is_writeable/is_writable problem; they are both defined now (Andrey)
- Imported PHP 3.0 diskfreespace() function (Thies)
- Fixed thread-safety issues in the MySQL module (Zeev)
@@ -57,13 +61,13 @@
- Fixed various inheritance problems (Andi & Zeev, Zend library)
- Children now inherit their parent's constructor, if they do not supply a
constructor of their own.
-- Fixed runtime inheritence of classes (parent methods/properties were
+- Fixed runtime inheritance of classes (parent methods/properties were
overriding their children) (Zeev, Zend library)
- Fixed backwards incompatibility with the "new" operator (Andi, Zend library)
- Fixed bugs in uksort() and ksort() sort ordering (Andrey)
- Fixed a memory leak when using assignment-op operators with lvalue of type
string (Zeev, Zend library)
-- Fixed a problem in inheritence from classes that are defined in include()d
+- Fixed a problem in inheritance from classes that are defined in include()d
files (Zeev, Zend library)
- Fixed a problem with the PHP error handler that could result in a crash
on certain operating systems (Zeev)
Index: php4/main.c
diff -u php4/main.c:1.98 php4/main.c:1.99
--- php4/main.c:1.98 Thu Aug 19 12:52:51 1999
+++ php4/main.c Tue Aug 24 19:12:49 1999
@@ -19,7 +19,7 @@
*/
-/* $Id: main.c,v 1.98 1999/08/19 16:52:51 andi Exp $ */
+/* $Id: main.c,v 1.99 1999/08/24 23:12:49 zeev Exp $ */
#include <stdio.h>
@@ -174,6 +174,7 @@
STD_PHP_INI_BOOLEAN("short_open_tag", "1", PHP_INI_ALL, OnUpdateInt, short_tags, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("asp_tags", "0", PHP_INI_ALL, OnUpdateInt, asp_tags, php_core_globals, core_globals)
PHP_INI_ENTRY("precision", "14", PHP_INI_ALL, OnSetPrecision)
+ STD_PHP_INI_BOOLEAN("output_buffering", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateInt, output_buffering, php_core_globals, core_globals)
PHP_INI_ENTRY_EX("highlight.comment", HL_COMMENT_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb)
PHP_INI_ENTRY_EX("highlight.default", HL_DEFAULT_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb)
@@ -640,6 +641,9 @@
{
zend_output_startup();
+ if (PG(output_buffering)) {
+ zend_start_ob_buffering();
+ }
#if APACHE
/*
* For the Apache module version, this bit of code registers a cleanup
Index: php4/output.c
diff -u php4/output.c:1.10 php4/output.c:1.11
--- php4/output.c:1.10 Fri Jul 16 09:12:42 1999
+++ php4/output.c Tue Aug 24 19:12:50 1999
@@ -45,6 +45,7 @@
* Main
*/
+/* Start output layer */
PHPAPI void zend_output_startup()
{
ob_buffer = NULL;
@@ -53,6 +54,7 @@
}
+/* Start output buffering */
void zend_start_ob_buffering()
{
zend_ob_init(4096, 1024);
@@ -60,6 +62,7 @@
}
+/* End output buffering */
void zend_end_ob_buffering(int send_buffer)
{
SLS_FETCH();
@@ -92,7 +95,7 @@
}
-void zend_ob_init(uint initial_size, uint block_size)
+static void zend_ob_init(uint initial_size, uint block_size)
{
if (ob_buffer) {
return;
@@ -104,7 +107,7 @@
}
-void zend_ob_destroy()
+static void zend_ob_destroy()
{
if (ob_buffer) {
efree(ob_buffer);
@@ -113,7 +116,7 @@
}
-void zend_ob_append(const char *text, uint text_length)
+static void zend_ob_append(const char *text, uint text_length)
{
char *target;
int original_ob_text_length=ob_text_length;
@@ -126,7 +129,7 @@
}
-void zend_ob_prepend(const char *text, uint text_length)
+static void zend_ob_prepend(const char *text, uint text_length)
{
char *p, *start;
@@ -152,6 +155,7 @@
}
+/* Return the current output buffer */
int zend_ob_get_buffer(pval *p)
{
if (!ob_buffer) {
Index: php4/php.ini-dist
diff -u php4/php.ini-dist:1.4 php4/php.ini-dist:1.5
--- php4/php.ini-dist:1.4 Fri Aug 13 17:03:26 1999
+++ php4/php.ini-dist Tue Aug 24 19:12:50 1999
@@ -38,9 +38,16 @@
asp_tags = Off ; allow ASP-style <% %> tags
precision = 14 ; number of significant digits displayed in floating point numbers
y2k_compliance = Off ; whether to be year 2000 compliant (will cause problems with non y2k
compliant browsers)
+output_buffering = Off ; Output buffering allows you to send header lines (including cookies)
+ ; even after you send body content, in the price of slowing PHP's
+ ; output layer a bit.
+ ; You can enable output buffering by in runtime by calling the output
+ ; buffering functions, or enable output buffering for all files
+ ; by setting this directive to On.
; Safe Mode
safe_mode = Off
safe_mode_exec_dir =
+
; Colors for Syntax Highlighting mode. Anything that's acceptable in <font color=???>
would work.
highlight.string = #DD0000
highlight.comment = #FF8000
@@ -48,6 +55,7 @@
highlight.bg = #FFFFFF
highlight.default = #0000BB
highlight.html = #000000
+
; Misc
allow_builtin_links = Off ; Sets whether phpinfo() will generate built-in links that display the
PHP
; and Zend logos, and tells PHP whether to honor them or not.
Index: php4/php4dll.dsp
diff -u php4/php4dll.dsp:1.12 php4/php4dll.dsp:1.13
--- php4/php4dll.dsp:1.12 Sat Aug 7 13:52:11 1999
+++ php4/php4dll.dsp Tue Aug 24 19:12:50 1999
@@ -795,5 +795,17 @@
# End Source File
# End Group
+# Begin Group "Text Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\ChangeLog
+# End Source File
+# Begin Source File
+
+SOURCE=.\LICENSE
+# End Source File
+# End Group
# End Target
# End Project
Index: php4/php_globals.h
diff -u php4/php_globals.h:1.18 php4/php_globals.h:1.19
--- php4/php_globals.h:1.18 Fri Jul 16 09:12:42 1999
+++ php4/php_globals.h Tue Aug 24 19:12:50 1999
@@ -50,6 +50,7 @@
long asp_tags;
long short_tags;
+ long output_buffering;
long safe_mode;
long sql_safe_mode;
Index: php4/ext/com/COM.c
diff -u php4/ext/com/COM.c:1.11 php4/ext/com/COM.c:1.12
--- php4/ext/com/COM.c:1.11 Mon Aug 2 15:16:39 1999
+++ php4/ext/com/COM.c Tue Aug 24 19:12:50 1999
@@ -680,9 +680,7 @@
int type;
VARIANTARG var_result;
- /*printf("Reading a property from a TestClass object:\n");*/
-
/* fetch the IDispatch interface */
zend_hash_index_find(object->value.obj.properties, 0, (void **) &idispatch_handle);
i_dispatch = php3_list_find((*idispatch_handle)->value.lval,&type);
@@ -752,8 +750,6 @@
IDispatch *i_dispatch;
int type;
VARIANTARG var_result;
-
- /*printf("Reading a property from a TestClass object:\n");*/
/* fetch the IDispatch interface */