[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2012-02-17 Thread Rasmus Lerdorf
rasmus   Fri, 17 Feb 2012 17:54:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=323296

Log:
I think we should let this be settable from .htaccess to match the other 
post/upload
related limits like upload_max_filesize, post_max_size, and max_input_vars.

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2012-02-17 17:45:36 UTC (rev 323295)
+++ php/php-src/trunk/main/main.c   2012-02-17 17:54:11 UTC (rev 323296)
@@ -552,7 +552,7 @@
PHP_INI_ENTRY(mail.force_extra_parameters,NULL,   
PHP_INI_SYSTEM|PHP_INI_PERDIR,  OnChangeMailForceExtra)
PHP_INI_ENTRY(disable_functions,  , 
PHP_INI_SYSTEM, NULL)
PHP_INI_ENTRY(disable_classes,, 
PHP_INI_SYSTEM, NULL)
-   PHP_INI_ENTRY(max_file_uploads,   20,   
PHP_INI_SYSTEM, NULL)
+   PHP_INI_ENTRY(max_file_uploads,   20,   
PHP_INI_SYSTEM|PHP_INI_PERDIR,  NULL)

STD_PHP_INI_BOOLEAN(allow_url_fopen,  1,
PHP_INI_SYSTEM, OnUpdateBool,   allow_url_fopen,
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(allow_url_include,0,
PHP_INI_SYSTEM, OnUpdateBool,   allow_url_include,  
php_core_globals,   core_globals)

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

[PHP-CVS] svn: /php/php-src/trunk/ main/main.c main/output.c sapi/cli/php_cli_server.c

2012-01-31 Thread Michael Wallner
mike Tue, 31 Jan 2012 08:51:24 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=322963

Log:
fix headers print to stdout/stderr if no output written; need to make some more 
testsbefore committing to PHP_5_4; fix crashes and invalid usage of output 
control in cli server while passing by

Changed paths:
U   php/php-src/trunk/main/main.c
U   php/php-src/trunk/main/output.c
U   php/php-src/trunk/sapi/cli/php_cli_server.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2012-01-31 07:17:05 UTC (rev 322962)
+++ php/php-src/trunk/main/main.c   2012-01-31 08:51:24 UTC (rev 322963)
@@ -1738,12 +1738,11 @@
} else {
php_output_end_all(TSRMLS_C);
}
-   php_output_deactivate(TSRMLS_C);
} zend_end_try();

-   /* 4. Send the set HTTP headers (note: This must be done AFTER 
php_output_discard_all() / php_output_end_all() !!) */
+   /* 4. Shutdown output layer (send the set HTTP headers, cleanup output 
handlers, etc.) */
zend_try {
-   sapi_send_headers(TSRMLS_C);
+   php_output_deactivate(TSRMLS_C);
} zend_end_try();

/* 5. Reset max_execution_time (no longer executing php code after 
response sent) */

Modified: php/php-src/trunk/main/output.c
===
--- php/php-src/trunk/main/output.c 2012-01-31 07:17:05 UTC (rev 322962)
+++ php/php-src/trunk/main/output.c 2012-01-31 08:51:24 UTC (rev 322963)
@@ -103,6 +103,29 @@
 static int (*php_output_direct)(const char *str, size_t str_len) = 
php_output_stderr;
 /* }}} */

+/* {{{ void php_output_header(TSRMLS_D) */
+static void php_output_header(TSRMLS_D)
+{
+   if (!SG(headers_sent)) {
+   if (!OG(output_start_filename)) {
+   if (zend_is_compiling(TSRMLS_C)) {
+   OG(output_start_filename) = 
zend_get_compiled_filename(TSRMLS_C);
+   OG(output_start_lineno) = 
zend_get_compiled_lineno(TSRMLS_C);
+   } else if (zend_is_executing(TSRMLS_C)) {
+   OG(output_start_filename) = 
zend_get_executed_filename(TSRMLS_C);
+   OG(output_start_lineno) = 
zend_get_executed_lineno(TSRMLS_C);
+   }
+#if PHP_OUTPUT_DEBUG
+   fprintf(stderr, !!! output started at: %s (%d)\n, 
OG(output_start_filename), OG(output_start_lineno));
+#endif
+   }
+   if (!php_header(TSRMLS_C)) {
+   OG(flags) |= PHP_OUTPUT_DISABLED;
+   }
+   }
+}
+/* }}} */
+
 /* {{{ void php_output_startup(void)
  * Set up module globals and initalize the conflict and reverse conflict hash 
tables */
 PHPAPI void php_output_startup(void)
@@ -149,6 +172,9 @@
 {
php_output_handler **handler = NULL;

+   php_output_header(TSRMLS_C);
+
+   OG(flags) ^= PHP_OUTPUT_ACTIVATED;
OG(active) = NULL;
OG(running) = NULL;

@@ -161,7 +187,6 @@
zend_stack_destroy(OG(handlers));
}

-   OG(flags) ^= PHP_OUTPUT_ACTIVATED;
 }
 /* }}} */

@@ -1045,26 +1070,20 @@
}

if (context.out.data  context.out.used) {
+   php_output_header(TSRMLS_C);
+
+   if (!(OG(flags)  PHP_OUTPUT_DISABLED)) {
 #if PHP_OUTPUT_DEBUG
-   fprintf(stderr, ::: sapi_write('%s', %zu)\n, 
context.out.data, context.out.used);
+   fprintf(stderr, ::: sapi_write('%s', %zu)\n, 
context.out.data, context.out.used);
 #endif
-   if (!SG(headers_sent)  php_header(TSRMLS_C)) {
-   if (zend_is_compiling(TSRMLS_C)) {
-   OG(output_start_filename) = 
zend_get_compiled_filename(TSRMLS_C);
-   OG(output_start_lineno) = 
zend_get_compiled_lineno(TSRMLS_C);
-   } else if (zend_is_executing(TSRMLS_C)) {
-   OG(output_start_filename) = 
zend_get_executed_filename(TSRMLS_C);
-   OG(output_start_lineno) = 
zend_get_executed_lineno(TSRMLS_C);
+   sapi_module.ub_write(context.out.data, context.out.used 
TSRMLS_CC);
+
+   if (OG(flags)  PHP_OUTPUT_IMPLICITFLUSH) {
+   sapi_flush(TSRMLS_C);
}
-#if PHP_OUTPUT_DEBUG
-   fprintf(stderr, !!! output started at: %s (%d)\n, 
OG(output_start_filename), OG(output_start_lineno));
-#endif
+
+   OG(flags) |= PHP_OUTPUT_SENT;
}
-   sapi_module.ub_write(context.out.data, context.out.used 
TSRMLS_CC);
-   if (OG(flags)  PHP_OUTPUT_IMPLICITFLUSH) {
-   

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2011-10-15 Thread Xinchen Hui
laruence Sun, 16 Oct 2011 01:19:55 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=318139

Log:
Merge r316812 to trunk

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2011-10-16 00:56:35 UTC (rev 318138)
+++ php/php-src/trunk/main/main.c   2011-10-16 01:19:55 UTC (rev 318139)
@@ -93,15 +93,26 @@
 #include SAPI.h
 #include rfc1867.h

-#if HAVE_SYS_MMAN_H
-# include sys/mman.h
-# ifndef PAGE_SIZE
-#  define PAGE_SIZE 4096
+#if HAVE_MMAP
+# if HAVE_UNISTD_H
+#  include unistd.h
+#  if defined(_SC_PAGESIZE)
+#define REAL_PAGE_SIZE sysconf(_SC_PAGESIZE);
+#  elif defined(_SC_PAGE_SIZE)
+#define REAL_PAGE_SIZE sysconf(_SC_PAGE_SIZE);
+#  endif
 # endif
+# if HAVE_SYS_MMAN_H
+#  include sys/mman.h
+# endif
+# ifndef REAL_PAGE_SIZE
+#  ifdef PAGE_SIZE
+#   define REAL_PAGE_SIZE PAGE_SIZE
+#  else
+#   define REAL_PAGE_SIZE 4096
+#  endif
+# endif
 #endif
-#ifdef PHP_WIN32
-# define PAGE_SIZE 4096
-#endif
 /* }}} */

 PHPAPI int (*php_register_internal_extensions_func)(TSRMLS_D) = 
php_register_internal_extensions;
@@ -1234,6 +1245,10 @@
php_stream *stream = php_stream_open_wrapper((char *)filename, rb, 
mode, handle-opened_path);

if (stream) {
+#if HAVE_MMAP
+   size_t page_size = REAL_PAGE_SIZE;
+#endif
+
handle-filename = (char*)filename;
handle-free_filename = 0;
handle-handle.stream.handle  = stream;
@@ -1244,7 +1259,9 @@
memset(handle-handle.stream.mmap, 0, 
sizeof(handle-handle.stream.mmap));
len = php_zend_stream_fsizer(stream TSRMLS_CC);
if (len != 0
-((len - 1) % PAGE_SIZE) = PAGE_SIZE - ZEND_MMAP_AHEAD
+#if HAVE_MMAP
+((len - 1) % page_size) = page_size - ZEND_MMAP_AHEAD
+#endif
 php_stream_mmap_possible(stream)
 (p = php_stream_mmap_range(stream, 0, len, 
PHP_STREAM_MAP_MODE_SHARED_READONLY, mapped_len)) != NULL) {
handle-handle.stream.closer   = 
php_zend_stream_mmap_closer;

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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2011-06-15 Thread Felipe Pena
felipe   Thu, 16 Jun 2011 01:41:34 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312202

Log:
- Removed win debug stuff

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2011-06-16 01:31:10 UTC (rev 312201)
+++ php/php-src/trunk/main/main.c   2011-06-16 01:41:34 UTC (rev 312202)
@@ -1885,13 +1885,7 @@
 #else
php_os=PHP_OS;
 #endif
-   {
-   char dll_dir[MAX_PATH];
-   sprintf(dll_dir, %s\\%s, module_path, ..\\..\\deps\\bin);
-   SetDllDirectory(dll_dir);
-   }
-// GetModuleFileName (NULL, module_path, MAX_PATH);
-//__debugbreak();
+
 #ifdef ZTS
tsrm_ls = ts_resource(0);
 #endif

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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2011-04-19 Thread Pierre Joye
pajoye   Tue, 19 Apr 2011 21:57:01 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=310370

Log:
- not desired yt

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2011-04-19 21:43:22 UTC (rev 310369)
+++ php/php-src/trunk/main/main.c   2011-04-19 21:57:01 UTC (rev 310370)
@@ -1863,13 +1863,7 @@
 #else
php_os=PHP_OS;
 #endif
-   {
-   char dll_dir[MAX_PATH];
-   sprintf(dll_dir, %s\\%s, module_path, ..\\..\\deps\\bin);
-   SetDllDirectory(dll_dir);
-   }
-// GetModuleFileName (NULL, module_path, MAX_PATH);
-//__debugbreak();
+
 #ifdef ZTS
tsrm_ls = ts_resource(0);
 #endif

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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2011-01-20 Thread Pierre Joye
pajoye   Thu, 20 Jan 2011 12:23:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=307624

Log:
- should not have been applied

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2011-01-20 11:22:00 UTC (rev 307623)
+++ php/php-src/trunk/main/main.c   2011-01-20 12:23:30 UTC (rev 307624)
@@ -1864,13 +1864,7 @@
 #endif
GetModuleFileName((HINSTANCE)__ImageBase, module_path, MAX_PATH);
php_dirname(module_path, strlen(module_path));
-   {
-   char dll_dir[MAX_PATH];
-   sprintf(dll_dir, %s\\%s, module_path, ..\\..\\deps\\bin);
-   SetDllDirectory(dll_dir);
-   }
-// GetModuleFileName (NULL, module_path, MAX_PATH);
-//__debugbreak();
+
 #ifdef ZTS
tsrm_ls = ts_resource(0);
 #endif

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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2011-01-20 Thread Felipe Pena
felipe   Thu, 20 Jan 2011 12:32:41 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=307625

Log:
- Removed accidental changes

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2011-01-20 12:23:30 UTC (rev 307624)
+++ php/php-src/trunk/main/main.c   2011-01-20 12:32:41 UTC (rev 307625)
@@ -1823,7 +1823,6 @@
}
 }
 #endif
-EXTERN_C IMAGE_DOS_HEADER __ImageBase;

 /* {{{ php_module_startup
  */
@@ -1862,8 +1861,6 @@
 #else
php_os=PHP_OS;
 #endif
-   GetModuleFileName((HINSTANCE)__ImageBase, module_path, MAX_PATH);
-   php_dirname(module_path, strlen(module_path));

 #ifdef ZTS
tsrm_ls = ts_resource(0);

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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2010-11-17 Thread Jani Taskinen
jani Wed, 17 Nov 2010 14:09:46 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=305458

Log:
- Fix possible crashes in 64bit builds caused by usage of int instead of size_t

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2010-11-17 14:08:39 UTC (rev 305457)
+++ php/php-src/trunk/main/main.c   2010-11-17 14:09:46 UTC (rev 305458)
@@ -623,8 +623,9 @@

/* get error text into buffer and escape for html if necessary */
buffer_len = vspprintf(buffer, 0, format, args);
+
if (PG(html_errors)) {
-   int len;
+   size_t len;
char *replace = php_escape_html_entities(buffer, buffer_len, 
len, 0, ENT_COMPAT, NULL TSRMLS_CC);
efree(buffer);
buffer = replace;
@@ -682,7 +683,7 @@
}

if (PG(html_errors)) {
-   int len;
+   size_t len;
char *replace = php_escape_html_entities(origin, origin_len, 
len, 0, ENT_COMPAT, NULL TSRMLS_CC);
efree(origin);
origin = replace;
@@ -981,7 +982,7 @@

if (PG(html_errors)) {
if (type == E_ERROR) {
-   int len;
+   size_t len;
char *buf = 
php_escape_html_entities(buffer, buffer_len, len, 0, ENT_COMPAT, NULL 
TSRMLS_CC);
php_printf(%sbr 
/\nb%s/b:  %s in b%s/b on line b%d/bbr /\n%s, 
STR_PRINT(prepend_string), error_type_str, buf, error_filename, error_lineno, 
STR_PRINT(append_string));
efree(buf);

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

Re: [PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2010-04-25 Thread Hannes Magnusson
On Tue, Apr 13, 2010 at 13:14, Kalle Sommer Nielsen ka...@php.net wrote:
 kalle                                    Tue, 13 Apr 2010 11:14:04 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=297956

 Log:
 PHP_OS is now always WINNT on Windows, since we don't support anything prior 
 to XP SP2

Is that new?
I thought 5.3 supported windows 2000? If so, please mention in it in
the upgrade guide.

-Hannes

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



Re: [PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2010-04-25 Thread Kalle Sommer Nielsen
Hi

2010/4/25 Hannes Magnusson hannes.magnus...@gmail.com:
 Is that new?
 I thought 5.3 supported windows 2000? If so, please mention in it in
 the upgrade guide.

 -Hannes

All other values than WINNT is for Windows 9x/ME and other non-NT
based systems.

We don't support Windows 2000 due to a bug in the dynamic linker code.
Since if we fix it so one of the functions that we dynamiclly load at
runtime from the Windows API then it will fail since it was
implemented in Windows XP SP2. If fixed then it will try to emulate
the function on all other supported systems which in the end is a huge
slowdown which is one of the reasons for it havn't been fixed nor
probably will. Sure we could do some macro magic but then we have to
provide a binary for Windows 2000/XP/XP SP1 which I don't think is
worth it.



-- 
regards,

Kalle Sommer Nielsen
ka...@php.net

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



[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2010-04-20 Thread Dmitry Stogov
dmitry   Tue, 20 Apr 2010 11:07:05 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=298205

Log:
Added concept of interned strings. All strings constants known at compile time 
are allocated in a single copy and never changed.

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2010-04-20 11:05:54 UTC (rev 298204)
+++ php/php-src/trunk/main/main.c   2010-04-20 11:07:05 UTC (rev 298205)
@@ -1508,6 +1508,7 @@
/* used to close fd's in the 3..255 range here, but it's problematic
 */
shutdown_memory_manager(1, 1 TSRMLS_CC);
+   CG(interned_strings_restore)(TSRMLS_C);
 }
 /* }}} */

@@ -1550,6 +1551,8 @@
shutdown_memory_manager(CG(unclean_shutdown), 0 TSRMLS_CC);
} zend_end_try();

+   CG(interned_strings_restore)(TSRMLS_C);
+
zend_try {
zend_unset_timeout(TSRMLS_C);
} zend_end_try();
@@ -1648,6 +1651,7 @@
zend_try {
shutdown_memory_manager(CG(unclean_shutdown) || 
!report_memleaks, 0 TSRMLS_CC);
} zend_end_try();
+   CG(interned_strings_restore)(TSRMLS_C);

/* 12. Reset max_execution_time */
zend_try {
@@ -2103,6 +2107,7 @@
module_startup = 0;

shutdown_memory_manager(1, 0 TSRMLS_CC);
+   CG(interned_strings_snapshot)(TSRMLS_C);

/* we're done */
return SUCCESS;

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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2010-04-13 Thread Kalle Sommer Nielsen
kalleTue, 13 Apr 2010 11:14:04 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=297956

Log:
PHP_OS is now always WINNT on Windows, since we don't support anything prior to 
XP SP2

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2010-04-13 11:02:15 UTC (rev 297955)
+++ php/php-src/trunk/main/main.c   2010-04-13 11:14:04 UTC (rev 297956)
@@ -1745,7 +1745,7 @@
 }
 /* }}} */

-#if defined(PHP_WIN32)  defined(_MSC_VER)  (_MSC_VER = 1400)
+#if defined(PHP_WIN32)  _MSC_VER = 1400
 static _invalid_parameter_handler old_invalid_parameter_handler;

 void dummy_invalid_parameter_handler(
@@ -1795,14 +1795,8 @@
WSADATA wsaData;
 #endif
 #ifdef PHP_WIN32
-   DWORD dwVersion = GetVersion();
-   /* Get build numbers for Windows NT or Win95 */
-   if (dwVersion  0x8000){
-   php_os=WINNT;
-   } else {
-   php_os=WIN32;
-   }
-#if defined(_MSC_VER)  (_MSC_VER = 1400)
+   php_os = WINNT;
+#if _MSC_VER = 1400
old_invalid_parameter_handler =
_set_invalid_parameter_handler(dummy_invalid_parameter_handler);
if (old_invalid_parameter_handler != NULL) {

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

Re: [PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-15 Thread Pierre Joye
On Tue, Dec 15, 2009 at 5:27 AM, Kalle Sommer Nielsen ka...@php.net wrote:
 2009/12/14 Jani Taskinen jani.taski...@sci.fi:
 14.12.2009 20:10, Kalle Sommer Nielsen wrote:

 I only added the note.

 I only added the entries, there was no sign of any of the other
 directives in 'Makefile.global', and neither do I understand the Unix
 build system code, so if it broke some tests on Unix then fair enough,
 go and fix them. Same as everyone who breaks things on Windows without
 caring to test there.

If someone does bad things, that does not give us the right to do the same.

Please take a look at Makefile.global:82 and add the new deprecated
directives, thanks.


Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-14 Thread Kalle Sommer Nielsen
kalleMon, 14 Dec 2009 10:55:06 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=292126

Log:
Change to E_CORE_ERROR as advertised (Fixes #50435) - Patch by ar...@php.net

Bug: http://bugs.php.net/50435 (Open) Fatal error thrown for removed ini 
directives isn't fatal
  
Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-14 09:51:14 UTC (rev 292125)
+++ php/php-src/trunk/main/main.c   2009-12-14 10:55:06 UTC (rev 292126)
@@ -2083,7 +2083,7 @@

while (*p) {
if (cfg_get_long((char*)*p, val) == SUCCESS  val) {
-   zend_error(E_ERROR, Directive '%s' no longer 
exist in PHP 6 and greater, *p);
+   zend_error(E_CORE_ERROR, Directive '%s' no 
longer exists in PHP 6 and greater, *p);
}
++p;
}

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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-14 Thread Kalle Sommer Nielsen
kalleMon, 14 Dec 2009 10:56:34 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=292128

Log:
Add some more removed ini directives

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-14 10:56:14 UTC (rev 292127)
+++ php/php-src/trunk/main/main.c   2009-12-14 10:56:34 UTC (rev 292128)
@@ -2068,10 +2068,19 @@
/* NOTE: If you add anything here, remember to add it also in 
Makefile.global! */
{
static const char *directives[] = {
+   allow_call_time_pass_reference,
define_syslog_variables,
+   detect_unicode,
+   enable_dl,
+   highlight_bg,
register_globals,
register_long_arrays,
safe_mode,
+   safe_mode_gid,
+   safe_mode_include_dir,
+   safe_mode_exec_dir,
+   safe_mode_allowed_env_vars,
+   safe_mode_protected_env_vars,
magic_quotes_gpc,
magic_quotes_runtime,
magic_quotes_sybase,

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

Re: [PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-14 Thread Jani Taskinen

14.12.2009 12:56, Kalle Sommer Nielsen wrote:

kalleMon, 14 Dec 2009 10:56:34 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=292128

Log:
Add some more removed ini directives


Couple of issues here..


Changed paths:
 U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-14 10:56:14 UTC (rev 292127)
+++ php/php-src/trunk/main/main.c   2009-12-14 10:56:34 UTC (rev 292128)
@@ -2068,10 +2068,19 @@
/* NOTE: If you add anything here, remember to add it also in 
Makefile.global! */


You can read, right?


{
static const char *directives[] = {
+   allow_call_time_pass_reference,
define_syslog_variables,
+   detect_unicode,


This never existed in anything but HEAD, why does it need to be deprecated?!

--Jani




+   enable_dl,
+   highlight_bg,
register_globals,
register_long_arrays,
safe_mode,
+   safe_mode_gid,
+   safe_mode_include_dir,
+   safe_mode_exec_dir,
+   safe_mode_allowed_env_vars,
+   safe_mode_protected_env_vars,
magic_quotes_gpc,
magic_quotes_runtime,
magic_quotes_sybase,




ä

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



Re: [PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-14 Thread Kalle Sommer Nielsen
2009/12/14 Jani Taskinen jani.taski...@sci.fi:
        /* NOTE: If you add anything here, remember to add it also in
 Makefile.global! */

 You can read, right?

Right, since that comment recently have been added, then why is it
that theres only magic_quotes_* and some zend_extension_* stuff in
there and not all the other options before I added these? And why is
it again that the Unix build system can't figure out these values or
even need them unlike the Windows build system?



        {
                static const char *directives[] = {
 +                       allow_call_time_pass_reference,
                        define_syslog_variables,
 +                       detect_unicode,

 This never existed in anything but HEAD, why does it need to be deprecated?!

 --Jani


detect_unicode is for Zend Multibyte support, and have existed since
5.1.0, and since Zend Multibyte support obv. doesn't exists in HEAD,
then this option won't unless its assigned a new function, which in
that case should be noted in the documentation.

-- 
regrads,

Kalle Sommer Nielsen
ka...@php.net

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



Re: [PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-14 Thread Jani Taskinen

14.12.2009 20:10, Kalle Sommer Nielsen wrote:

2009/12/14 Jani Taskinenjani.taski...@sci.fi:

/* NOTE: If you add anything here, remember to add it also in
Makefile.global! */


You can read, right?


Right, since that comment recently have been added, then why is it
that theres only magic_quotes_* and some zend_extension_* stuff in
there and not all the other options before I added these?


I only added the note.

 And why is it again that the Unix build system can't figure out these values 
or

even need them unlike the Windows build system?


I have no idea how you run 'make test' on Winblows, but I bet not all tests pass 
anyway there. (yes, they're only for the tests to pass..)


--Jani

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



Re: [PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-14 Thread Kalle Sommer Nielsen
2009/12/14 Jani Taskinen jani.taski...@sci.fi:
 14.12.2009 20:10, Kalle Sommer Nielsen wrote:

 I only added the note.

I only added the entries, there was no sign of any of the other
directives in 'Makefile.global', and neither do I understand the Unix
build system code, so if it broke some tests on Unix then fair enough,
go and fix them. Same as everyone who breaks things on Windows without
caring to test there.



 I have no idea how you run 'make test' on Winblows, but I bet not all tests
 pass anyway there. (yes, they're only for the tests to pass..)

Well if you tried to build on Windows it would be pretty logical to
try `nmake test`.


 --Jani

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





-- 
regrads,

Kalle Sommer Nielsen
ka...@php.net

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



[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-11 Thread Jani Taskinen
jani Fri, 11 Dec 2009 15:42:16 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291992

Log:
MF53:- Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit) #Ilia..

Bug: http://bugs.php.net/45392 (Closed) ob_start()/ob_end_clean() and 
memory_limit
  
Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-11 15:38:15 UTC (rev 291991)
+++ php/php-src/trunk/main/main.c   2009-12-11 15:42:16 UTC (rev 291992)
@@ -1667,7 +1667,15 @@

/* 3. Flush all output buffers */
zend_try {
-   if (SG(request_info).headers_only) {
+   zend_bool send_buffer = SG(request_info).headers_only ? 0 : 1;
+
+   if (CG(unclean_shutdown)  PG(last_error_type) == E_ERROR 
+   PG(memory_limit)  zend_memory_usage(1 TSRMLS_CC)
+   ) {
+   send_buffer = 0;
+   }
+
+   if (!send_buffer) {
php_output_discard_all(TSRMLS_C);
} else {
php_output_end_all(TSRMLS_C);

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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 08:21:25 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291865

Log:
MF52: Fixed memory leak on require() error (Thanks again Ilia. r220154)

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-08 08:20:12 UTC (rev 291864)
+++ php/php-src/trunk/main/main.c   2009-12-08 08:21:25 UTC (rev 291865)
@@ -883,8 +883,6 @@
if (docref_buf) {
efree(docref_buf);
}
-   php_error(type, %s, message);
-   efree(message);

if (PG(track_errors)  module_initialized 
(!EG(user_error_handler) || 
!(EG(user_error_handler_error_reporting)  type))) {
@@ -899,6 +897,9 @@
}
}
efree(buffer);
+
+   php_error(type, %s, message);
+   efree(message);
 }
 /* }}} */


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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 08:21:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291866

Log:
- ws

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-08 08:21:25 UTC (rev 291865)
+++ php/php-src/trunk/main/main.c   2009-12-08 08:21:56 UTC (rev 291866)
@@ -284,17 +284,17 @@
 /* }}} */

 #define PHP_INI_OPTION_HEADERS_SENT(option_name)   

 \
-   if (SG(headers_sent)) { 

\
-   char *output_start_filename = 
php_output_get_start_filename(TSRMLS_C);
  \
-   int output_start_lineno = 
php_output_get_start_lineno(TSRMLS_C);  
  \
-   if (output_start_filename) {

\
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Option  #option_name  cannot be changed after headers have been sent (output 
started at %s:%d), \
-   

output_start_filename, output_start_lineno);
\
-   } else {

\
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Option  #option_name  cannot be changed after headers have been sent);  
\
-   }   

\
-   return FAILURE; 

\
-   }
+   if (SG(headers_sent)) { 

\
+   char *output_start_filename = 
php_output_get_start_filename(TSRMLS_C);
  \
+   int output_start_lineno = 
php_output_get_start_lineno(TSRMLS_C);  
  \
+   if (output_start_filename) {

\
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Option  
#option_name  cannot be changed after headers have been sent (output started 
at %s:%d), \
+   

output_start_filename, output_start_lineno);\
+   } else {

\
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Option  
#option_name  cannot be changed after headers have been sent);
  \
+   }   

\
+   return FAILURE; 

\
+   }

 /* {{{ PHP_INI_MH
  */
@@ -570,7 +570,7 @@
STD_PHP_INI_ENTRY(auto_prepend_file,  NULL,   
PHP_INI_SYSTEM|PHP_INI_PERDIR,  OnUpdateString, 
auto_prepend_file,  php_core_globals,   core_globals)
STD_PHP_INI_ENTRY(doc_root,   NULL,   
PHP_INI_SYSTEM, OnUpdateStringUnempty,  doc_root,   
php_core_globals,   core_globals)
STD_PHP_INI_ENTRY(default_charset,SAPI_DEFAULT_CHARSET,   
PHP_INI_ALL,OnUpdateDefaultCharset, default_charset,
sapi_globals_struct,sapi_globals)
-   STD_PHP_INI_ENTRY(default_mimetype,   

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 08:34:53 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291867

Log:
No tabs here

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-08 08:21:56 UTC (rev 291866)
+++ php/php-src/trunk/main/main.c   2009-12-08 08:34:53 UTC (rev 291867)
@@ -1352,11 +1352,11 @@

snprintf(memory_leak_buf, 512, Last 
leak repeated %ld time%s\n, leak_count, (leak_count1?s:));
}
-#  if defined(PHP_WIN32)
+# if defined(PHP_WIN32)
OutputDebugString(memory_leak_buf);
-#  else
+# else
fprintf(stderr, %s, memory_leak_buf);
-#  endif
+# endif
}
 #endif
break;
@@ -1366,11 +1366,11 @@
char memory_leak_buf[512];

snprintf(memory_leak_buf, 512, === Total %d 
memory leaks detected ===\n, *((zend_uint *) data));
-#  if defined(PHP_WIN32)
+# if defined(PHP_WIN32)
OutputDebugString(memory_leak_buf);
-#  else
+# else
fprintf(stderr, %s, memory_leak_buf);
-#  endif
+# endif
}
 #endif
break;
@@ -1389,11 +1389,11 @@
} else {
snprintf(memory_leak_buf, 
sizeof(memory_leak_buf), [null]  Script:  '%s'\n, 
SAFE_FILENAME(SG(request_info).path_translated));
}
-#  if defined(PHP_WIN32)
+#if defined(PHP_WIN32)
OutputDebugString(memory_leak_buf);
-#  else
+# else
fprintf(stderr, %s, memory_leak_buf);
-#  endif
+#endif
}
break;
}

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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 11:00:03 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291873

Log:
- Fix the comment again

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-08 10:56:41 UTC (rev 291872)
+++ php/php-src/trunk/main/main.c   2009-12-08 11:00:03 UTC (rev 291873)
@@ -1675,7 +1675,7 @@
php_output_deactivate(TSRMLS_C);
} zend_end_try();

-   /* 4. Send the set HTTP headers (note: This must be done AFTER 
php_end_ob_buffers() !!) */
+   /* 4. Send the set HTTP headers (note: This must be done AFTER 
php_output_discard_all() / php_output_end_all() !!) */
zend_try {
sapi_send_headers(TSRMLS_C);
} zend_end_try();

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

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-11-14 Thread Rasmus Lerdorf
rasmus   Sun, 15 Nov 2009 00:24:06 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=290767

Log:
Fix bug #49868

Bug: http://bugs.php.net/49868 (Assigned) max_execution_time affected by 
max_input_time
  
Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-11-15 00:21:31 UTC (rev 290766)
+++ php/php-src/trunk/main/main.c   2009-11-15 00:24:06 UTC (rev 290767)
@@ -2344,7 +2344,7 @@
 #ifdef PHP_WIN32
zend_unset_timeout(TSRMLS_C);
 #endif
-   zend_set_timeout(EG(timeout_seconds), 0);
+zend_set_timeout(INI_INT(max_execution_time), 0);
}
retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, 
prepend_file_p, primary_file, append_file_p) == SUCCESS);


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