[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/ zlog.c

2009-12-14 Thread Antony Dovgal
tony2001 Mon, 14 Dec 2009 09:17:21 +

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

Log:
show debugging info onle when log_level is set to 'debug' (patch by Jerome 
Loyet)

Changed paths:
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/zlog.c

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/zlog.c
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/zlog.c2009-12-14 
09:08:25 UTC (rev 292113)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/zlog.c2009-12-14 
09:17:21 UTC (rev 292114)
@@ -73,7 +73,11 @@
saved_errno = errno;
gettimeofday(tv, 0);
len = zlog_print_time(tv, buf, buf_size);
-   len += snprintf(buf + len, buf_size - len,  [%s] %s(), line %d: , 
level_names[flags  ZLOG_LEVEL_MASK], function, line);
+   if (zlog_level == ZLOG_DEBUG) {
+   len += snprintf(buf + len, buf_size - len,  [%s] pid %d, %s(), 
line %d: , level_names[flags  ZLOG_LEVEL_MASK], getpid(), function, line);
+   } else {
+   len += snprintf(buf + len, buf_size - len,  [%s] , 
level_names[flags  ZLOG_LEVEL_MASK]);
+   }

if (len  buf_size - 1) {
truncated = 1;

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/ fastcgi.h fpm_atomic.h fpm_main.c

2009-12-14 Thread Antony Dovgal
tony2001 Mon, 14 Dec 2009 09:18:53 +

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

Log:
fix ws (patch by Jerome Loyet)

Changed paths:
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.h
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_atomic.h
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_main.c

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.h
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.h 2009-12-14 
09:17:21 UTC (rev 292114)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.h 2009-12-14 
09:18:53 UTC (rev 292115)
@@ -76,12 +76,12 @@
 } fcgi_begin_request_rec;

 typedef struct _fcgi_end_request {
-unsigned char appStatusB3;
-unsigned char appStatusB2;
-unsigned char appStatusB1;
-unsigned char appStatusB0;
-unsigned char protocolStatus;
-unsigned char reserved[3];
+   unsigned char appStatusB3;
+   unsigned char appStatusB2;
+   unsigned char appStatusB1;
+   unsigned char appStatusB0;
+   unsigned char protocolStatus;
+   unsigned char reserved[3];
 } fcgi_end_request;

 typedef struct _fcgi_end_request_rec {

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_atomic.h
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_atomic.h  2009-12-14 
09:17:21 UTC (rev 292114)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_atomic.h  2009-12-14 
09:18:53 UTC (rev 292115)
@@ -35,7 +35,7 @@
__asm__ volatile ( lock; cmpxchgl %3, %1; sete %0; :
=a (res) : m (*lock), a (old), r (set) : memory);

-return res;
+   return res;
 }
 /* }}} */


Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_main.c
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_main.c2009-12-14 
09:17:21 UTC (rev 292114)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_main.c2009-12-14 
09:18:53 UTC (rev 292115)
@@ -164,7 +164,7 @@
{'v', 0, version},
{'y', 1, fpm-config},
{'z', 1, zend-extension},
-   {'T', 1, timing},
+   {'T', 1, timing},
{'-', 0, NULL} /* end of args */
 };

@@ -348,8 +348,8 @@
 #define SAPI_CGI_MAX_HEADER_LENGTH 1024

 typedef struct _http_error {
-  int code;
-  const char* msg;
+   int code;
+   const char* msg;
 } http_error;

 static const http_error http_error_codes[] = {
@@ -989,8 +989,8 @@
  -s   Display colour syntax 
highlighted source.\n
  -v   Version number\n
  -w   Display source with 
stripped comments and whitespace.\n
-  -y, --fpm-config file\n
-   Specify alternative path to FastCGI 
process manager config file.\n
+ -y, --fpm-config file\n
+  Specify alternative path to 
FastCGI process manager config file.\n
  -z fileLoad Zend extension 
file.\n
  -T count   Measure execution time of 
script repeated count times.\n,
prog, prog);
@@ -1166,8 +1166,8 @@
}

if (env_path_translated != NULL  env_redirect_url != 
NULL 
-   env_path_translated != script_path_translated 
-   strcmp(env_path_translated, script_path_translated) 
!= 0) {
+   env_path_translated != script_path_translated 
+   strcmp(env_path_translated, script_path_translated) 
!= 0) {
/*
 * pretty much apache specific.  If we have a 
redirect_url
 * then our script_filename and script_name 
point to the
@@ -1688,9 +1688,9 @@
 #else
php_printf(PHP %s (%s) (built: %s 
%s)\nCopyright (c) 1997-2009 The PHP Group\n%s, PHP_VERSION, sapi_module.name, 
__DATE__, __TIME__,  get_zend_version());
 #endif
-php_request_shutdown((void *) 0);
-exit_status = 0;
-goto out;
+   php_request_shutdown((void *) 0);
+   exit_status = 0;
+   goto out;
}
}
php_optind = orig_optind;

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_FPM/sapi/fpm/ config.m4

2009-12-14 Thread Antony Dovgal
tony2001 Mon, 14 Dec 2009 09:20:11 +

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

Log:
fix non-POSIX find usage

Changed paths:
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4 2009-12-14 09:18:53 UTC 
(rev 292115)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4 2009-12-14 09:20:11 UTC 
(rev 292116)
@@ -654,7 +654,7 @@
   PHP_SUBST(SAPI_FPM_PATH)

   mkdir -p sapi/fpm/fpm
-  PHP_FPM_FILES=`cd $abs_srcdir/sapi/fpm  find fpm/ \( -name *.c -not -name 
fpm_trace*.c \) -exec printf {}  \;`
+  PHP_FPM_FILES=`cd $abs_srcdir/sapi/fpm  find fpm/ \( -name *.c \! -name 
fpm_trace*.c \) -exec printf {}  \;`

   if test $fpm_trace_type ; then
 PHP_FPM_TRACE_FILES=`cd $abs_srcdir/sapi/fpm  find fpm/ \( -name 
fpm_trace.c -or -name fpm_trace_$fpm_trace_type.c \) -exec printf {}  \;`

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/filter/tests/ bug42718-2.phpt

2009-12-14 Thread Jani Taskinen
jani Mon, 14 Dec 2009 09:26:49 +

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

Log:
- Fix test

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/filter/tests/bug42718-2.phpt

Modified: php/php-src/branches/PHP_5_3/ext/filter/tests/bug42718-2.phpt
===
--- php/php-src/branches/PHP_5_3/ext/filter/tests/bug42718-2.phpt   
2009-12-14 09:20:11 UTC (rev 292116)
+++ php/php-src/branches/PHP_5_3/ext/filter/tests/bug42718-2.phpt   
2009-12-14 09:26:49 UTC (rev 292117)
@@ -3,6 +3,7 @@
 --SKIPIF--
 ?php if (!extension_loaded(filter)) die(skip); ?
 --INI--
+display_errors=0
 magic_quotes_gpc=1
 filter.default=unsafe_raw
 filter.default_flags=

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

[PHP-CVS] svn: /php/php-src/trunk/ext/xml/tests/ bug32001.phpt

2009-12-14 Thread Jani Taskinen
jani Mon, 14 Dec 2009 09:37:33 +

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

Log:
MFB: fix test

Changed paths:
U   php/php-src/trunk/ext/xml/tests/bug32001.phpt

Modified: php/php-src/trunk/ext/xml/tests/bug32001.phpt
===
--- php/php-src/trunk/ext/xml/tests/bug32001.phpt   2009-12-14 09:34:34 UTC 
(rev 292119)
+++ php/php-src/trunk/ext/xml/tests/bug32001.phpt   2009-12-14 09:37:33 UTC 
(rev 292120)
@@ -159,9 +159,7 @@
 );

 if (XML_SAX_IMPL == 'libxml') {
-  $php = getenv('TEST_PHP_EXECUTABLE');
-  preg_match(/^libxml2 Version.*\$/im, `$php -i`, $match);
-  echo $match[0], \n;
+  echo libxml2 Version =  . LIBXML_DOTTED_VERSION. \n;
 } else {
   echo libxml2 Version = NONE\n;
 }

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

[PHP-CVS] svn: /php/php-src/trunk/ext/xml/tests/ bug32001b.phpt

2009-12-14 Thread Jani Taskinen
jani Mon, 14 Dec 2009 09:41:39 +

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

Log:
MFB: fix test

Changed paths:
U   php/php-src/trunk/ext/xml/tests/bug32001b.phpt

Modified: php/php-src/trunk/ext/xml/tests/bug32001b.phpt
===
--- php/php-src/trunk/ext/xml/tests/bug32001b.phpt  2009-12-14 09:37:33 UTC 
(rev 292120)
+++ php/php-src/trunk/ext/xml/tests/bug32001b.phpt  2009-12-14 09:41:39 UTC 
(rev 292121)
@@ -95,9 +95,7 @@
 );

 if (XML_SAX_IMPL == 'libxml') {
-  $php = getenv('TEST_PHP_EXECUTABLE');
-  preg_match(/^libxml2 Version.*\$/im, `$php -i`, $match);
-  echo $match[0], \n;
+  echo libxml2 Version =  . LIBXML_DOTTED_VERSION. \n;
 } else {
   echo libxml2 Version = NONE\n;
 }

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ext/xml/tests/ bug32001b.phpt

2009-12-14 Thread Jani Taskinen
jani Mon, 14 Dec 2009 09:42:32 +

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

Log:
- Fix test

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/xml/tests/bug32001b.phpt

Modified: php/php-src/branches/PHP_5_2/ext/xml/tests/bug32001b.phpt
===
--- php/php-src/branches/PHP_5_2/ext/xml/tests/bug32001b.phpt   2009-12-14 
09:41:39 UTC (rev 292121)
+++ php/php-src/branches/PHP_5_2/ext/xml/tests/bug32001b.phpt   2009-12-14 
09:42:32 UTC (rev 292122)
@@ -95,9 +95,7 @@
 );

 if (XML_SAX_IMPL == 'libxml') {
-  $php = getenv('TEST_PHP_EXECUTABLE');
-  preg_match(/^libxml2 Version.*\$/im, `$php -i`, $match);
-  echo $match[0], \n;
+  echo libxml2 Version =  . LIBXML_DOTTED_VERSION. \n;
 } else {
   echo libxml2 Version = NONE\n;
 }

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/xml/tests/ bug32001b.phpt

2009-12-14 Thread Jani Taskinen
jani Mon, 14 Dec 2009 09:42:55 +

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

Log:
- Fix test

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/xml/tests/bug32001b.phpt

Modified: php/php-src/branches/PHP_5_3/ext/xml/tests/bug32001b.phpt
===
--- php/php-src/branches/PHP_5_3/ext/xml/tests/bug32001b.phpt   2009-12-14 
09:42:32 UTC (rev 292122)
+++ php/php-src/branches/PHP_5_3/ext/xml/tests/bug32001b.phpt   2009-12-14 
09:42:55 UTC (rev 292123)
@@ -95,9 +95,7 @@
 );

 if (XML_SAX_IMPL == 'libxml') {
-  $php = getenv('TEST_PHP_EXECUTABLE');
-  preg_match(/^libxml2 Version.*\$/im, `$php -i`, $match);
-  echo $match[0], \n;
+  echo libxml2 Version =  . LIBXML_DOTTED_VERSION. \n;
 } else {
   echo libxml2 Version = NONE\n;
 }

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/ fpm_stdio.c

2009-12-14 Thread Antony Dovgal
tony2001 Mon, 14 Dec 2009 09:51:14 +

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

Log:
set log_level always (patch by Jerome Loyet)

Changed paths:
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_stdio.c

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_stdio.c
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_stdio.c   2009-12-14 
09:47:41 UTC (rev 292124)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_stdio.c   2009-12-14 
09:51:14 UTC (rev 292125)
@@ -41,6 +41,7 @@

 int fpm_stdio_init_final() /* {{{ */
 {
+   zlog_set_level(fpm_globals.log_level);
if (fpm_global_config.daemonize) {
if (fpm_globals.error_log_fd != STDERR_FILENO) {
/* there might be messages to stderr from libevent, we 
need to log them all */
@@ -49,7 +50,6 @@
return -1;
}
}
-   zlog_set_level(fpm_globals.log_level);
zlog_set_fd(fpm_globals.error_log_fd);
}
return 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

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/branches/PHP_5_3_FPM/sapi/fpm/ config.m4

2009-12-14 Thread Antony Dovgal
tony2001 Mon, 14 Dec 2009 10:56:14 +

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

Log:
get rid of `find` completely

Changed paths:
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4 2009-12-14 10:55:06 UTC 
(rev 292126)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4 2009-12-14 10:56:14 UTC 
(rev 292127)
@@ -653,11 +653,8 @@
   SAPI_FPM_PATH=sapi/fpm/php-fpm
   PHP_SUBST(SAPI_FPM_PATH)

-  mkdir -p sapi/fpm/fpm
-  PHP_FPM_FILES=`cd $abs_srcdir/sapi/fpm  find fpm/ \( -name *.c \! -name 
fpm_trace*.c \) -exec printf {}  \;`
-
-  if test $fpm_trace_type ; then
-PHP_FPM_TRACE_FILES=`cd $abs_srcdir/sapi/fpm  find fpm/ \( -name 
fpm_trace.c -or -name fpm_trace_$fpm_trace_type.c \) -exec printf {}  \;`
+  if test $fpm_trace_type  test -f 
$abs_srcdir/sapi/fpm/fpm/fpm_trace_$fpm_trace_type.c; then
+PHP_FPM_TRACE_FILES=fpm/fpm_trace.c fpm/fpm_trace_$fpm_trace_type.c
   fi

   PHP_FPM_CFLAGS=$LIBEVENT_CFLAGS -I$abs_srcdir/sapi/fpm
@@ -666,6 +663,29 @@
   PHP_SUBST(SAPI_EXTRA_LIBS)

   INSTALL_IT=:
+  PHP_FPM_FILES=fpm/fastcgi.c \
+fpm/fpm.c \
+fpm/fpm_children.c \
+fpm/fpm_cleanup.c \
+fpm/fpm_clock.c \
+fpm/fpm_conf.c \
+fpm/fpm_env.c \
+fpm/fpm_events.c \
+fpm/fpm_main.c \
+fpm/fpm_php.c \
+fpm/fpm_php_trace.c \
+fpm/fpm_process_ctl.c \
+fpm/fpm_request.c \
+fpm/fpm_shm.c \
+fpm/fpm_shm_slots.c \
+fpm/fpm_signals.c \
+fpm/fpm_sockets.c \
+fpm/fpm_stdio.c \
+fpm/fpm_unix.c \
+fpm/fpm_worker_pool.c \
+fpm/xml_config.c \
+fpm/zlog.c \
+  
   PHP_SELECT_SAPI(fpm, program, $PHP_FPM_FILES $PHP_FPM_TRACE_FILES, 
$PHP_FPM_CFLAGS, '$(SAPI_FPM_PATH)')

   case $host_alias in

-- 
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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_FPM/sapi/fpm/ Makefile.frag config.m4 init.d.php-fpm.in php-fpm.1.in php-fpm.conf.in

2009-12-14 Thread Antony Dovgal
tony2001 Mon, 14 Dec 2009 11:57:21 +

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

Log:
drop conf/ and man/
simplify config.m4 a bit
fix exec_prefix issue

Changed paths:
_U  php/php-src/branches/PHP_5_3_FPM/sapi/fpm/
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag
D   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/conf/
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4
A   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/init.d.php-fpm.in
D   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/man/
A   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/php-fpm.1.in
A   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/php-fpm.conf.in


Property changes on: php/php-src/branches/PHP_5_3_FPM/sapi/fpm
___
Modified: svn:ignore
   - .deps
.libs
php-fpm
php-fpm.1

   + .deps
.libs
php-fpm
php-fpm.1
init.d.php-fpm
php-fpm.conf


Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag	2009-12-14 10:56:34 UTC (rev 292128)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag	2009-12-14 11:57:21 UTC (rev 292129)
@@ -17,7 +17,7 @@
 	@echo Installing PHP FPM config:$(INSTALL_ROOT)$(php_fpm_conf_dir)/  \
 	$(mkinstalldirs) $(INSTALL_ROOT)$(php_fpm_conf_dir) || :

-	@$(INSTALL_DATA) sapi/fpm/conf/php-fpm.conf $(INSTALL_ROOT)$(php_fpm_conf_dir)/php-fpm.conf.default || :
+	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(php_fpm_conf_dir)/php-fpm.conf.default || :

 	@echo Installing PHP FPM man page:  $(INSTALL_ROOT)$(mandir)/man1/
 	@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4	2009-12-14 10:56:34 UTC (rev 292128)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4	2009-12-14 11:57:21 UTC (rev 292129)
@@ -539,7 +539,7 @@
   fi

   if test -z $exec_prefix -o $exec_prefix = NONE; then
-exec_prefix=/usr/local
+exec_prefix=`eval echo $prefix`
   fi

   php_fpm_bin_path=`eval echo $bindir`
@@ -606,21 +606,6 @@

 ])

-
-AC_DEFUN([AC_FPM_OUTPUT],
-[
-  PHP_OUTPUT(sapi/fpm/conf/php-fpm.conf:sapi/fpm/conf/php-fpm.conf.in)
-  PHP_OUTPUT(sapi/fpm/conf/init.d.php-fpm:sapi/fpm/conf/init.d.php-fpm.in)
-  PHP_OUTPUT(sapi/fpm/php-fpm.1:sapi/fpm/man/php-fpm.1.in)
-])
-
-
-AC_DEFUN([AC_FPM_CONF],
-[
-  AC_FPM_ARGS
-  AC_FPM_VARS
-  AC_FPM_OUTPUT
-])
 dnl }}}


@@ -646,8 +631,10 @@
   ])

   AC_FPM_CHECKS
-  AC_FPM_CONF
+  AC_FPM_ARGS
+  AC_FPM_VARS

+  PHP_OUTPUT(sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.1)
   PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/fpm/Makefile.frag], [$abs_srcdir/sapi/fpm], [sapi/fpm])

   SAPI_FPM_PATH=sapi/fpm/php-fpm

Added: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/init.d.php-fpm.in
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/init.d.php-fpm.in	(rev 0)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/init.d.php-fpm.in	2009-12-14 11:57:21 UTC (rev 292129)
@@ -0,0 +1,135 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides:  php-fpm
+# Required-Start:$all
+# Required-Stop: $all
+# Default-Start: 2 3 4 5
+# Default-Stop:  0 1 6
+# Short-Description: starts php-fpm
+# Description:   starts the PHP FastCGI Process Manager daemon
+### END INIT INFO
+
+php_fpm_b...@php_fpm_bin_path@
+php_fpm_co...@php_fpm_conf_path@
+php_fpm_p...@php_fpm_pid_path@
+
+
+php_opts=--fpm-config $php_fpm_CONF
+
+
+wait_for_pid () {
+	try=0
+
+	while test $try -lt 35 ; do
+
+		case $1 in
+			'created')
+			if [ -f $2 ] ; then
+try=''
+break
+			fi
+			;;
+
+			'removed')
+			if [ ! -f $2 ] ; then
+try=''
+break
+			fi
+			;;
+		esac
+
+		echo -n .
+		try=`expr $try + 1`
+		sleep 1
+
+	done
+
+}
+
+case $1 in
+	start)
+		echo -n Starting php-fpm 
+
+		$php_fpm_BIN $php_opts
+
+		if [ $? != 0 ] ; then
+			echo  failed
+			exit 1
+		fi
+
+		wait_for_pid created $php_fpm_PID
+
+		if [ -n $try ] ; then
+			echo  failed
+			exit 1
+		else
+			echo  done
+		fi
+	;;
+
+	stop)
+		echo -n Gracefully shutting down php-fpm 
+
+		if [ ! -r $php_fpm_PID ] ; then
+			echo warning, no pid file found - php-fpm is not running ?
+			exit 1
+		fi
+
+		kill -QUIT `cat $php_fpm_PID`
+
+		wait_for_pid removed $php_fpm_PID
+
+		if [ -n $try ] ; then
+			echo  failed. Use force-exit
+			exit 1
+		else
+			echo  done
+		fi
+	;;
+
+	force-quit)
+		echo -n Terminating php-fpm 
+
+		if [ ! -r $php_fpm_PID ] ; then
+			echo warning, no pid file found - php-fpm is not running ?
+			exit 1
+		fi
+
+		kill -TERM `cat $php_fpm_PID`
+
+		wait_for_pid removed $php_fpm_PID
+
+		if [ -n $try ] ; then
+			echo  failed
+			exit 1
+		else
+			

[PHP-CVS] svn: /php/php-src/trunk/ Zend/tests/null_argument_001.phpt ext/standard/tests/url/rawurldecode_variation_001.phpt ext/standard/tests/url/urldecode_variation_001.phpt ext/standard/url.c

2009-12-14 Thread Dmitry Stogov
dmitry   Mon, 14 Dec 2009 13:46:46 +

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

Log:
Fixed urldecode() and rawurldecode() to accept ASCII-Unicode strings

Changed paths:
U   php/php-src/trunk/Zend/tests/null_argument_001.phpt
U   php/php-src/trunk/ext/standard/tests/url/rawurldecode_variation_001.phpt
U   php/php-src/trunk/ext/standard/tests/url/urldecode_variation_001.phpt
U   php/php-src/trunk/ext/standard/url.c

Modified: php/php-src/trunk/Zend/tests/null_argument_001.phpt
===
--- php/php-src/trunk/Zend/tests/null_argument_001.phpt	2009-12-14 13:04:27 UTC (rev 292130)
+++ php/php-src/trunk/Zend/tests/null_argument_001.phpt	2009-12-14 13:46:46 UTC (rev 292131)
@@ -19,18 +19,16 @@
 --EXPECTF--
 string(0) 
 string(0) 
+string(0) 

-Warning: urldecode() expects parameter 1 to be strictly a binary string, Unicode string given in %s on line %d
+Warning: urldecode() expects parameter 1 to be string (Unicode or binary), array given in /home/dmitry/php/php6/Zend/tests/null_argument_001.php on line 6
 NULL
-
-Warning: urldecode() expects parameter 1 to be binary string, array given in %s on line %d
-NULL
 string(1) 1
 string(0) 

-Warning: urldecode() expects parameter 1 to be binary string, object given in %s on line %d
+Warning: urldecode() expects parameter 1 to be string (Unicode or binary), object given in /home/dmitry/php/php6/Zend/tests/null_argument_001.php on line 9
 NULL

-Warning: urldecode() expects parameter 1 to be binary string, resource given in %s on line %d
+Warning: urldecode() expects parameter 1 to be string (Unicode or binary), resource given in /home/dmitry/php/php6/Zend/tests/null_argument_001.php on line 12
 NULL
 Done

Modified: php/php-src/trunk/ext/standard/tests/url/rawurldecode_variation_001.phpt
===
--- php/php-src/trunk/ext/standard/tests/url/rawurldecode_variation_001.phpt	2009-12-14 13:04:27 UTC (rev 292130)
+++ php/php-src/trunk/ext/standard/tests/url/rawurldecode_variation_001.phpt	2009-12-14 13:46:46 UTC (rev 292131)
@@ -60,6 +60,9 @@
   ,
   '',

+  // non ASCII UNICODE
+  привет,
+
   // object data
   new stdclass(),

@@ -81,8 +84,8 @@
 ?
 --EXPECTF--
 *** Testing rawurldecode() : usage variations ***
-Error: 8 - Undefined variable: undefined_var, %s(64)
-Error: 8 - Undefined variable: unset_var, %s(67)
+Error: 8 - Undefined variable: undefined_var, %s(%d)
+Error: 8 - Undefined variable: unset_var, %s(%d)

 Arg value 0
 string(1) 0
@@ -110,30 +113,30 @@

 Arg value 0.5
 string(3) 0.5
-Error: 8 - Array to string conversion, %s(73)
+Error: 8 - Array to string conversion, %s(%d)

 Arg value Array
-Error: 2 - rawurldecode() expects parameter 1 to be binary string, array given, %s(74)
+Error: 2 - rawurldecode() expects parameter 1 to be string (Unicode or binary), array given, %s(%d)
 NULL
-Error: 8 - Array to string conversion, %s(73)
+Error: 8 - Array to string conversion, %s(%d)

 Arg value Array
-Error: 2 - rawurldecode() expects parameter 1 to be binary string, array given, %s(74)
+Error: 2 - rawurldecode() expects parameter 1 to be string (Unicode or binary), array given, %s(%d)
 NULL
-Error: 8 - Array to string conversion, %s(73)
+Error: 8 - Array to string conversion, %s(%d)

 Arg value Array
-Error: 2 - rawurldecode() expects parameter 1 to be binary string, array given, %s(74)
+Error: 2 - rawurldecode() expects parameter 1 to be string (Unicode or binary), array given, %s(%d)
 NULL
-Error: 8 - Array to string conversion, %s(73)
+Error: 8 - Array to string conversion, %s(%d)

 Arg value Array
-Error: 2 - rawurldecode() expects parameter 1 to be binary string, array given, %s(74)
+Error: 2 - rawurldecode() expects parameter 1 to be string (Unicode or binary), array given, %s(%d)
 NULL
-Error: 8 - Array to string conversion, %s(73)
+Error: 8 - Array to string conversion, %s(%d)

 Arg value Array
-Error: 2 - rawurldecode() expects parameter 1 to be binary string, array given, %s(74)
+Error: 2 - rawurldecode() expects parameter 1 to be string (Unicode or binary), array given, %s(%d)
 NULL

 Arg value
@@ -155,16 +158,18 @@
 string(0) 

 Arg value
-Error: 2 - rawurldecode() expects parameter 1 to be strictly a binary string, Unicode string given, %s(74)
-NULL
+string(0) 

 Arg value
-Error: 2 - rawurldecode() expects parameter 1 to be strictly a binary string, Unicode string given, %s(74)
-NULL
-Error: 4096 - Object of class stdClass could not be converted to string, %s(73)
+string(0) 

+Arg value привет
+Error: 2 - rawurldecode(): Binary or ASCII-Unicode string expected, non-ASCII-Unicode string received, %s(%d)
+bool(false)
+Error: 4096 - Object of class stdClass could not be converted to string, %s(%d)
+
 Arg value
-Error: 2 - rawurldecode() expects parameter 1 to be binary string, object given, %s(74)
+Error: 2 - rawurldecode() expects parameter 1 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_FPM/sapi/fpm/ fpm/fastcgi.c fpm/fpm_children.c fpm/fpm_children.h fpm/fpm_conf.c fpm/fpm_conf.h fpm/fpm_config.h fpm/fpm_events.c fpm/fpm_process_ctl.c fpm

2009-12-14 Thread Antony Dovgal
tony2001 Mon, 14 Dec 2009 14:02:34 +

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

Log:
add experimental dynamic process spawning support (patch by Jerome Loyet)

Changed paths:
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_children.c
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_children.h
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_conf.c
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_conf.h
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_config.h
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_events.c
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_process_ctl.c
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_process_ctl.h
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_request.c
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_request.h
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_worker_pool.c
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_worker_pool.h
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/php-fpm.conf.in

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c	2009-12-14 13:50:21 UTC (rev 292132)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c	2009-12-14 14:02:34 UTC (rev 292133)
@@ -986,13 +986,13 @@
 		int n = 0;
 		int allowed = 0;

-			while (allowed_clients[n] != INADDR_NONE) {
-if (allowed_clients[n] == sa.sa_inet.sin_addr.s_addr) {
-	allowed = 1;
-	break;
-}
-n++;
+		while (allowed_clients[n] != INADDR_NONE) {
+			if (allowed_clients[n] == sa.sa_inet.sin_addr.s_addr) {
+allowed = 1;
+break;
 			}
+			n++;
+		}
 		if (!allowed) {
 			fprintf(stderr, Connection from disallowed IP address '%s' is dropped.\n, inet_ntoa(sa.sa_inet.sin_addr));
 			closesocket(req-fd);

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_children.c
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_children.c	2009-12-14 13:50:21 UTC (rev 292132)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fpm_children.c	2009-12-14 14:02:34 UTC (rev 292133)
@@ -32,8 +32,6 @@
 static time_t *last_faults;
 static int fault;

-static int fpm_children_make(struct fpm_worker_pool_s *wp, int in_event_loop);
-
 static void fpm_children_cleanup(int which, void *arg) /* {{{ */
 {
 	free(last_faults);
@@ -180,6 +178,7 @@
 	while ( (pid = waitpid(-1, status, WNOHANG | WUNTRACED))  0) {
 		char buf[128];
 		int severity = ZLOG_NOTICE;
+		int restart_child = 1;

 		child = fpm_child_find(pid);

@@ -187,6 +186,13 @@

 			snprintf(buf, sizeof(buf), with code %d, WEXITSTATUS(status));

+			/* if it's been killed because of dynamic process management
+			 * don't restart it automaticaly
+			 */
+			if (child  child-idle_kill) {
+restart_child = 0;
+			}
+
 			if (WEXITSTATUS(status) != 0) {
 severity = ZLOG_WARNING;
 			}
@@ -201,6 +207,13 @@

 			snprintf(buf, sizeof(buf), on signal %d %s%s, WTERMSIG(status), signame, have_core);

+			/* if it's been killed because of dynamic process management
+			 * don't restart it automaticaly
+			 */
+			if (child  child-idle_kill  WTERMSIG(status) == SIGTERM) {
+restart_child = 0;
+			}
+
 			if (WTERMSIG(status) != SIGQUIT) { /* possible request loss */
 severity = ZLOG_WARNING;
 			}
@@ -227,8 +240,11 @@

 			timersub(tv1, child-started, tv2);

-			zlog(ZLOG_STUFF, severity, child %d (pool %s) exited %s after %ld.%06d seconds from start, (int) pid,
-		child-wp-config-name, buf, tv2.tv_sec, (int) tv2.tv_usec);
+			if (restart_child) {
+zlog(ZLOG_STUFF, severity, child %d (pool %s) exited %s after %ld.%06d seconds from start, (int) pid, child-wp-config-name, buf, tv2.tv_sec, (int) tv2.tv_usec);
+			} else {
+zlog(ZLOG_STUFF, severity, child %d (pool %s) has been killed by the process managment after %ld.%06d seconds from start, (int) pid, child-wp-config-name, tv2.tv_sec, (int) tv2.tv_usec);
+			}

 			fpm_child_close(child, 1 /* in event_loop */);

@@ -254,17 +270,18 @@

 if (restart_condition) {

-	zlog(ZLOG_STUFF, ZLOG_WARNING, failed processes threshold (%d in %d sec) is reached, initiating reload,
-		fpm_global_config.emergency_restart_threshold, fpm_global_config.emergency_restart_interval);
+	zlog(ZLOG_STUFF, ZLOG_WARNING, failed processes threshold (%d in %d sec) is reached, initiating reload, fpm_global_config.emergency_restart_threshold, fpm_global_config.emergency_restart_interval);

 	fpm_pctl(FPM_PCTL_STATE_RELOADING, FPM_PCTL_ACTION_SET);
 }
 			}

-			fpm_children_make(wp, 1 /* in event loop */);
+			if (restart_child) {
+fpm_children_make(wp, 1 /* 

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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo/pdo_stmt.c branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt trunk/ext/pdo/pdo_stmt.c trunk/ext/pdo_sqlite/tests/pdo_fetch_func_001.ph

2009-12-14 Thread Felipe Pena
felipe   Mon, 14 Dec 2009 21:44:56 +

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

Log:
- Fixed memory leak when E_STRICT message is getted

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c
A   
php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt
U   php/php-src/trunk/ext/pdo/pdo_stmt.c
A   php/php-src/trunk/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt

Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c
===
--- php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c	2009-12-14 21:29:08 UTC (rev 292142)
+++ php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c	2009-12-14 21:44:56 UTC (rev 292143)
@@ -795,6 +795,10 @@
 		}
 		return 0;
 	}
+	if (is_callable_error) {
+		/* Possible E_STRICT error message */
+		efree(is_callable_error);
+	}

 	fci-param_count = num_args; /* probably less */
 	fci-params = safe_emalloc(sizeof(zval**), num_args, 0);

Added: php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt
===
--- php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt	2009-12-14 21:44:56 UTC (rev 292143)
@@ -0,0 +1,126 @@
+--TEST--
+Testing several callbacks using PDO::FETCH_FUNC
+--FILE--
+?php
+
+$db = new PDO('sqlite::memory:');
+$db-exec('CREATE TABLE testing (id INTEGER , name VARCHAR)');
+$db-exec('INSERT INTO testing VALUES(1, php)');
+$db-exec('INSERT INTO testing VALUES(2, )');
+
+$st = $db-query('SELECT * FROM testing');
+$st-fetchAll(PDO::FETCH_FUNC, function($x, $y) use ($st) { var_dump($st); print data: $x, $y\n; });
+
+$st = $db-query('SELECT name FROM testing');
+var_dump($st-fetchAll(PDO::FETCH_FUNC, 'strtoupper'));
+
+$st = $db-query('SELECT * FROM testing');
+var_dump($st-fetchAll(PDO::FETCH_FUNC, 'nothing'));
+
+$st = $db-query('SELECT * FROM testing');
+var_dump($st-fetchAll(PDO::FETCH_FUNC, ''));
+
+$st = $db-query('SELECT * FROM testing');
+var_dump($st-fetchAll(PDO::FETCH_FUNC, NULL));
+
+$st = $db-query('SELECT * FROM testing');
+var_dump($st-fetchAll(PDO::FETCH_FUNC, 1));
+
+$st = $db-query('SELECT * FROM testing');
+var_dump($st-fetchAll(PDO::FETCH_FUNC, array('self', 'foo')));
+
+class foo {
+	public function foo($x) {
+		return --- $x ---;
+	}
+}
+class bar extends foo {
+	public function __construct($db) {
+		$st = $db-query('SELECT * FROM testing');
+		var_dump($st-fetchAll(PDO::FETCH_FUNC, array($this, 'parent::foo')));
+	}
+
+	static public function test($x, $y) {
+		return $x .'---'. $y;
+	}
+
+	private function test2($x, $y) {
+		return $x;
+	}
+
+	public function test3($x, $y) {
+		return $x .'==='. $y;
+	}
+}
+
+new bar($db);
+
+$st = $db-query('SELECT * FROM testing');
+var_dump($st-fetchAll(PDO::FETCH_FUNC, array('bar', 'test')));
+
+$st = $db-query('SELECT * FROM testing');
+var_dump($st-fetchAll(PDO::FETCH_FUNC, array('bar', 'test2')));
+
+$st = $db-query('SELECT * FROM testing');
+var_dump($st-fetchAll(PDO::FETCH_FUNC, array('bar', 'test3')));
+
+$st = $db-query('SELECT * FROM testing');
+var_dump($st-fetchAll(PDO::FETCH_FUNC, array('bar', 'inexistent')));
+
+?
+--EXPECTF--
+object(PDOStatement)#%d (1) {
+  [%u|b%queryString]=
+  %string|unicode%(21) SELECT * FROM testing
+}
+data: 1, php
+object(PDOStatement)#%d (1) {
+  [%u|b%queryString]=
+  %string|unicode%(21) SELECT * FROM testing
+}
+data: 2,
+array(2) {
+  [0]=
+  %string|unicode%(3) PHP
+  [1]=
+  %string|unicode%(0) 
+}
+
+Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function 'nothing' not found or invalid function name in %s on line %d
+bool(false)
+
+Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function '' not found or invalid function name in %s on line %d
+bool(false)
+
+Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: no array or string given in %s on line %d
+bool(false)
+
+Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: no array or string given in %s on line %d
+bool(false)
+
+Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: cannot access self:: when no class scope is active in %s on line %d
+bool(false)
+array(2) {
+  [0]=
+  %string|unicode%(9) --- 1 ---
+  [1]=
+  %string|unicode%(9) --- 2 ---
+}
+array(2) {
+  [0]=
+  %string|unicode%(7) 1---php
+  [1]=
+  %string|unicode%(4) 2---
+}
+
+Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: cannot access private method bar::test2() in %s on line %d
+bool(false)
+array(2) {
+  [0]=
+  %string|unicode%(7) 1===php
+  [1]=
+  %string|unicode%(4) 2===
+}
+
+Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class 'bar' does not have a method 'inexistent' in %s on line %d
+bool(false)


Property changes on: 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt trunk/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt

2009-12-14 Thread Felipe Pena
felipe   Tue, 15 Dec 2009 00:37:43 +

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

Log:
- Added SKIPIF

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt
U   php/php-src/trunk/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt
===
--- php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt   
2009-12-14 22:20:06 UTC (rev 292144)
+++ php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt   
2009-12-15 00:37:43 UTC (rev 292145)
@@ -1,5 +1,9 @@
 --TEST--
 Testing several callbacks using PDO::FETCH_FUNC
+--SKIPIF--
+?php
+if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
+?
 --FILE--
 ?php


Modified: php/php-src/trunk/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt
===
--- php/php-src/trunk/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt  
2009-12-14 22:20:06 UTC (rev 292144)
+++ php/php-src/trunk/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt  
2009-12-15 00:37:43 UTC (rev 292145)
@@ -1,5 +1,9 @@
 --TEST--
 Testing several callbacks using PDO::FETCH_FUNC
+--SKIPIF--
+?php
+if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
+?
 --FILE--
 ?php


-- 
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