[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mssql/php_mssql.h branches/PHP_5_4/NEWS branches/PHP_5_4/ext/mssql/php_mssql.h trunk/ext/mssql/php_mssql.h

2011-11-16 Thread Felipe Pena
felipe   Wed, 16 Nov 2011 12:13:22 +

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

Log:
- Fixed bug #60267 (Compile failure with freetds 0.91)

Bug: https://bugs.php.net/60267 (Open) Compile failure with freetds 0.91
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/mssql/php_mssql.h
U   php/php-src/branches/PHP_5_4/NEWS
U   php/php-src/branches/PHP_5_4/ext/mssql/php_mssql.h
U   php/php-src/trunk/ext/mssql/php_mssql.h

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-11-16 11:39:33 UTC (rev 319305)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-11-16 12:13:22 UTC (rev 319306)
@@ -20,6 +20,9 @@
 - Gd:
   . Fixed bug #60160 (imagefill() doesn't work correctly
 for small images). (Florian)
+
+- MS SQL:
+  . Fixed bug #60267 (Compile failure with freetds 0.91). (Felipe)

 - OpenSSL:
   . Fixed bug #60279 (Fixed NULL pointer dereference in

Modified: php/php-src/branches/PHP_5_3/ext/mssql/php_mssql.h
===
--- php/php-src/branches/PHP_5_3/ext/mssql/php_mssql.h  2011-11-16 11:39:33 UTC 
(rev 319305)
+++ php/php-src/branches/PHP_5_3/ext/mssql/php_mssql.h  2011-11-16 12:13:22 UTC 
(rev 319306)
@@ -26,6 +26,11 @@
 #if HAVE_MSSQL
 #define MSDBLIB

+/* FreeTDS checks for PHP_MSSQL_API for avoid type redefinition */
+#ifdef HAVE_FREETDS
+#define PHP_MSSQL_API
+#endif
+
 #include sqlfront.h
 #include sqldb.h


Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2011-11-16 11:39:33 UTC (rev 319305)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-11-16 12:13:22 UTC (rev 319306)
@@ -9,6 +9,9 @@
 (klightspeed at netspace dot net dot au)
   . Fixed bug #52624 (tempnam() by-pass open_basedir with nonexistent
 directory). (Felipe)
+
+- MS SQL:
+  . Fixed bug #60267 (Compile failure with freetds 0.91). (Felipe)

 - OpenSSL:
   . Fixed bug #60279 (Fixed NULL pointer dereference in

Modified: php/php-src/branches/PHP_5_4/ext/mssql/php_mssql.h
===
--- php/php-src/branches/PHP_5_4/ext/mssql/php_mssql.h  2011-11-16 11:39:33 UTC 
(rev 319305)
+++ php/php-src/branches/PHP_5_4/ext/mssql/php_mssql.h  2011-11-16 12:13:22 UTC 
(rev 319306)
@@ -26,6 +26,11 @@
 #if HAVE_MSSQL
 #define MSDBLIB

+/* FreeTDS checks for PHP_MSSQL_API for avoid type redefinition */
+#ifdef HAVE_FREETDS
+#define PHP_MSSQL_API
+#endif
+
 #include sqlfront.h
 #include sqldb.h


Modified: php/php-src/trunk/ext/mssql/php_mssql.h
===
--- php/php-src/trunk/ext/mssql/php_mssql.h 2011-11-16 11:39:33 UTC (rev 
319305)
+++ php/php-src/trunk/ext/mssql/php_mssql.h 2011-11-16 12:13:22 UTC (rev 
319306)
@@ -26,6 +26,11 @@
 #if HAVE_MSSQL
 #define MSDBLIB

+/* FreeTDS checks for PHP_MSSQL_API for avoid type redefinition */
+#ifdef HAVE_FREETDS
+#define PHP_MSSQL_API
+#endif
+
 #include sqlfront.h
 #include sqldb.h


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

[PHP-CVS] svn: /SVNROOT/ pear_avail

2011-11-16 Thread Daniel O'Connor
clockwerxWed, 16 Nov 2011 12:42:23 +

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

Log:
Updated karma for split of mail_mime mail_mimedecode

Changed paths:
U   SVNROOT/pear_avail

Modified: SVNROOT/pear_avail
===
--- SVNROOT/pear_avail  2011-11-16 12:37:52 UTC (rev 319308)
+++ SVNROOT/pear_avail  2011-11-16 12:42:23 UTC (rev 319309)
@@ -64,7 +64,7 @@
 avail|dbezborodov,jausions|pear/packages/Payment_Process2
 
avail|justinpatrin|pear/packages/DB_DataObject_FormBuilder,pear/packages/MDB2,pear/packages/HTML_QuickForm_ElementGrid
 avail|ryansking,aashley|pear/packages/Config
-avail|cipri|pear/packages/Mail_Mime,pear/packages/File_DNS,pear/packages/File
+avail|cipri|pear/packages/Mail_Mime,pear/packages/Mail_mimeDecode,pear/packages/File_DNS,pear/packages/File
 
avail|luckec|pear/packages/HTTP_SessionServer,pear/packages/Services_Ebay,pear/packages/Date_Holidays
 avail|jystewart|pear/packages/Services_Technorati,pear/packages/XML_Feed_Parser
 avail|msmarcal|pear/packages/Image_Barcode
@@ -154,7 +154,7 @@
 avail|kguest|pear/packages/VersionControl_SVN
 
avail|padraic|pear/packages/Crypt_DiffieHellman,pear/packages/Crypt_HMAC2,pear/packages/Services_Yadis,pear/peardoc
 avail|instance|pear/packages/PHP_LexerGenerator
-avail|walter|pear/packages/Mail_Mime,pear/peardoc
+avail|walter|pear/packages/Mail_Mime,pear/packages/Mail_mimeDecode,pear/peardoc
 avail|bastianonken|pear/packages/HTML_TagCloud,pear/peardoc
 avail|jschippers|pear/packages/Net_FTP
 
avail|izi|pear/packages/Console_CommandLine,pear/packages/Services_GeoNames,pear/packages/Testing_DocTest,pear/peardoc

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

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/sapi/litespeed/ lsapi_main.c

2011-11-16 Thread Johannes Schlüter
George,

please also keep trunk in sync.

And a short comment on this:

On Wed, 2011-11-16 at 04:00 +, George Wang wrote:
 Log:
 keep code to be compatible with PHP4

wow. PHP 4 had it's official end-of-life on 13 Jul 2007. That should
really be discouraged, or even better more than just discouraged, from
being used in any form ...

johannes



-- 
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_4/ NEWS

2011-11-16 Thread Rasmus Lerdorf
rasmus   Wed, 16 Nov 2011 16:43:12 +

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

Log:
Had the wrong bug number there

Changed paths:
U   php/php-src/branches/PHP_5_4/NEWS

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2011-11-16 16:41:50 UTC (rev 319345)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-11-16 16:43:12 UTC (rev 319346)
@@ -314,7 +314,7 @@
   . Improved unserialize() performance.
 (galaxy dot mipt at gmail dot com, Kalle)
   . Improved unix build system to allow building multiple PHP binary SAPIs and
-one SAPI module the same time. FR #53271, FR #52410. (Jani)
+one SAPI module the same time. FR #53271, FR #52419. (Jani)
   . Added optional argument to debug_backtrace() and debug_print_backtrace()
 to limit the amount of stack frames returned. (Sebastian, Patrick)
   . Added stream metadata API support and stream_metadata() stream class

-- 
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/NEWS branches/PHP_5_3/Zend/tests/bug60099.phpt branches/PHP_5_3/Zend/zend_compile.c branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/tests/bug60099.phpt branch

2011-11-16 Thread Felipe Pena
felipe   Wed, 16 Nov 2011 17:41:40 +

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

Log:
- Fixed bug #60099 (__halt_compiler() works in braced namespaces)

Bug: https://bugs.php.net/60099 (Closed) __halt_compiler() works in braced 
namespaces
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/Zend/tests/bug60099.phpt
U   php/php-src/branches/PHP_5_3/Zend/zend_compile.c
U   php/php-src/branches/PHP_5_4/NEWS
A   php/php-src/branches/PHP_5_4/Zend/tests/bug60099.phpt
U   php/php-src/branches/PHP_5_4/Zend/zend_compile.c
A   php/php-src/trunk/Zend/tests/bug60099.phpt
U   php/php-src/trunk/Zend/zend_compile.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-11-16 17:40:09 UTC (rev 319352)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-11-16 17:41:40 UTC (rev 319353)
@@ -3,6 +3,7 @@
 ?? ??? 2011, PHP 5.3.9

 - Core:
+  . Fixed bug #60099 (__halt_compiler() works in braced namespaces). (Felipe)
   . Fixed bug #55874 (GCC does not provide __sync_fetch_and_add on some archs).
 (klightspeed at netspace dot net dot au)
   . Fixed bug #52624 (tempnam() by-pass open_basedir with nonnexistent

Added: php/php-src/branches/PHP_5_3/Zend/tests/bug60099.phpt
===
--- php/php-src/branches/PHP_5_3/Zend/tests/bug60099.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug60099.phpt   2011-11-16 
17:41:40 UTC (rev 319353)
@@ -0,0 +1,10 @@
+--TEST--
+Bug #60099 (__halt_compiler() works in braced namespaces)
+--FILE--
+?php
+namespace foo {
+   __halt_compiler();
+
+?
+--EXPECTF--
+Fatal error: __HALT_COMPILER() can only be used from the outermost scope in %s 
on line %d

Modified: php/php-src/branches/PHP_5_3/Zend/zend_compile.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_compile.c2011-11-16 17:40:09 UTC 
(rev 319352)
+++ php/php-src/branches/PHP_5_3/Zend/zend_compile.c2011-11-16 17:41:40 UTC 
(rev 319353)
@@ -3757,6 +3757,11 @@
char *name, *cfilename;
char haltoff[] = __COMPILER_HALT_OFFSET__;
int len, clen;
+
+   if (CG(has_bracketed_namespaces)  CG(in_namespace)) {
+   zend_error(E_COMPILE_ERROR, __HALT_COMPILER() can only be used 
from the outermost scope);
+   }
+
cfilename = zend_get_compiled_filename(TSRMLS_C);
clen = strlen(cfilename);
zend_mangle_property_name(name, len, haltoff, sizeof(haltoff) - 1, 
cfilename, clen, 0);

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2011-11-16 17:40:09 UTC (rev 319352)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-11-16 17:41:40 UTC (rev 319353)
@@ -5,6 +5,7 @@
 - Core:
   . Fixed bug #60227 (header() cannot detect the multi-line header with
  CR(0x0D)). (rui)
+  . Fixed bug #60099 (__halt_compiler() works in braced namespaces). (Felipe)
   . Fixed bug #55874 (GCC does not provide __sync_fetch_and_add on some archs).
 (klightspeed at netspace dot net dot au)
   . Fixed bug #52624 (tempnam() by-pass open_basedir with nonexistent

Added: php/php-src/branches/PHP_5_4/Zend/tests/bug60099.phpt
===
--- php/php-src/branches/PHP_5_4/Zend/tests/bug60099.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_4/Zend/tests/bug60099.phpt   2011-11-16 
17:41:40 UTC (rev 319353)
@@ -0,0 +1,10 @@
+--TEST--
+Bug #60099 (__halt_compiler() works in braced namespaces)
+--FILE--
+?php
+namespace foo {
+   __halt_compiler();
+
+?
+--EXPECTF--
+Fatal error: __HALT_COMPILER() can only be used from the outermost scope in %s 
on line %d

Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-11-16 17:40:09 UTC 
(rev 319352)
+++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-11-16 17:41:40 UTC 
(rev 319353)
@@ -5311,6 +5311,11 @@
char *name, *cfilename;
char haltoff[] = __COMPILER_HALT_OFFSET__;
int len, clen;
+
+   if (CG(has_bracketed_namespaces)  CG(in_namespace)) {
+   zend_error(E_COMPILE_ERROR, __HALT_COMPILER() can only be used 
from the outermost scope);
+   }
+
cfilename = zend_get_compiled_filename(TSRMLS_C);
clen = strlen(cfilename);
zend_mangle_property_name(name, len, haltoff, sizeof(haltoff) - 1, 
cfilename, clen, 0);

Added: php/php-src/trunk/Zend/tests/bug60099.phpt
===
--- php/php-src/trunk/Zend/tests/bug60099.phpt  

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ ext/spl/tests/CallbackFilterIteratorTest-002.phpt tests/output/ob_start_error_001.phpt

2011-11-16 Thread Christopher Jones



On 11/13/2011 04:26 PM, Lars Strojny wrote:

lstrojny Mon, 14 Nov 2011 00:26:37 +

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

Log:
Adjusting error messages

Changed paths:
 U   
php/php-src/branches/PHP_5_4/ext/spl/tests/CallbackFilterIteratorTest-002.phpt
 U   php/php-src/branches/PHP_5_4/tests/output/ob_start_error_001.phpt





-Warning: ob_start(): no array or string given in %s on line 20
+Warning: ob_start(): no array, string, closure or functor given in %s on line 
20



Lars,

This is now failing for me and in CI:
http://ci.qa.php.net/job/php-src-5.4-matrix-tests/128/architecture=x86,os=bsd-freebsd-8.2/testReport/junit/tests_output_ob_start_error_001/phpt/Test_wrong_number_of_arguments_and_wrong_arg_types_for_ob_start__/
Can you check it out?

Thanks

Chris

--
Email: christopher.jo...@oracle.com
Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/

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



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pgsql/pgsql.c branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt branches/PHP_5_4/ext/pgsql/pgsql.c branches/PHP_5_4/ext/pgsql/t

2011-11-16 Thread Ilia Alshanetsky
Previous, missing news entry.

On Tue, Nov 15, 2011 at 1:06 PM, Felipe Pena felipe...@gmail.com wrote:
 2011/11/15 Ilia Alshanetsky il...@php.net:
 iliaa                                    Tue, 15 Nov 2011 18:02:58 +

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

 Log:
 Fixed bug #60244 (pg_fetch_* functions do not validate that row param is 0).

 Bug: https://bugs.php.net/60244 (Open) pg_fetch_* functions behave strangely 
 with row = -1

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c
    A   php/php-src/branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt
    U   php/php-src/branches/PHP_5_4/ext/pgsql/pgsql.c
    A   php/php-src/branches/PHP_5_4/ext/pgsql/tests/bug60244.phpt
    U   php/php-src/trunk/ext/pgsql/pgsql.c
    A   php/php-src/trunk/ext/pgsql/tests/bug60244.phpt


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


 There is change in NEWS that seems accidentaly:

 +- Json:
 +  . Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects
 +    with numeric string properties). (Ilia, dchurch at sciencelogic dot com)
 +

 --
 Regards,
 Felipe Pena

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



--
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_4/sapi/cli/tests/php_cli_server.inc trunk/sapi/cli/tests/php_cli_server.inc

2011-11-16 Thread Xinchen Hui
laruence Thu, 17 Nov 2011 02:22:06 +

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

Log:
improve the test,  let it say about errors

Changed paths:
U   php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc
U   php/php-src/trunk/sapi/cli/tests/php_cli_server.inc

Modified: php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc
===
--- php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc  
2011-11-17 00:17:22 UTC (rev 319381)
+++ php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc  
2011-11-17 02:22:06 UTC (rev 319382)
@@ -12,7 +12,7 @@
$descriptorspec = array(
0 = STDIN,
1 = STDOUT,
-   2 = STDERR,
+   2 = array(pipe, w),
);

if (substr(PHP_OS, 0, 3) == 'WIN') {
@@ -21,25 +21,35 @@
$cmd .=  {$router};
}

-   $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, 
$doc_root, NULL, array(bypass_shell = true,  suppress_errors = true));
+   $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, 
$doc_root, NULL, array(bypass_shell = true));
} else {
$cmd = exec {$php_executable} -t {$doc_root} -S  . 
PHP_CLI_SERVER_ADDRESS;
if (!$no_router) {
$cmd .=  {$router};
}
-   $cmd .=  2/dev/null;

$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
}

+   //@FIXME is there a better way to make sure the process is ready?
+   usleep(5);
+
+   stream_set_blocking($pipes[2], 0);
+   if ($err = stream_get_contents($pipes[2])) {
+   fclose($pipes[2]);
+   proc_terminate($handle);
+   @unlink(__DIR__ . /{$router});
+   die(Cli sever could not be started:  . $err);
+   }
+
register_shutdown_function(
-   function($handle) use($router) {
+   function($handle, $router, $pipes) {
+   stream_get_contents($pipes[2]);
+   fclose($pipes[2]);
proc_terminate($handle);
@unlink(__DIR__ . /{$router});
},
-   $handle
+   $handle, $router, $pipes
);
-   usleep(5);
 }
 ?
-

Modified: php/php-src/trunk/sapi/cli/tests/php_cli_server.inc
===
--- php/php-src/trunk/sapi/cli/tests/php_cli_server.inc 2011-11-17 00:17:22 UTC 
(rev 319381)
+++ php/php-src/trunk/sapi/cli/tests/php_cli_server.inc 2011-11-17 02:22:06 UTC 
(rev 319382)
@@ -12,7 +12,7 @@
$descriptorspec = array(
0 = STDIN,
1 = STDOUT,
-   2 = STDERR,
+   2 = array(pipe, w),
);

if (substr(PHP_OS, 0, 3) == 'WIN') {
@@ -21,25 +21,35 @@
$cmd .=  {$router};
}

-   $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, 
$doc_root, NULL, array(bypass_shell = true,  suppress_errors = true));
+   $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, 
$doc_root, NULL, array(bypass_shell = true));
} else {
$cmd = exec {$php_executable} -t {$doc_root} -S  . 
PHP_CLI_SERVER_ADDRESS;
if (!$no_router) {
$cmd .=  {$router};
}
-   $cmd .=  2/dev/null;

$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
}

+   //@FIXME is there a better way to make sure the process is ready?
+   usleep(5);
+
+   stream_set_blocking($pipes[2], 0);
+   if ($err = stream_get_contents($pipes[2])) {
+   fclose($pipes[2]);
+   proc_terminate($handle);
+   @unlink(__DIR__ . /{$router});
+   die(Cli sever could not be started:  . $err);
+   }
+
register_shutdown_function(
-   function($handle) use($router) {
+   function($handle, $router, $pipes) {
+   stream_get_contents($pipes[2]);
+   fclose($pipes[2]);
proc_terminate($handle);
@unlink(__DIR__ . /{$router});
},
-   $handle
+   $handle, $router, $pipes
);
-   usleep(5);
 }
 ?
-

-- 
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_4/sapi/cli/tests/php_cli_server.inc trunk/sapi/cli/tests/php_cli_server.inc

2011-11-16 Thread Xinchen Hui
laruence Thu, 17 Nov 2011 02:32:21 +

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

Log:
revert my previous change, tests hangs on windows

Changed paths:
U   php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc
U   php/php-src/trunk/sapi/cli/tests/php_cli_server.inc

Modified: php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc
===
--- php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc  
2011-11-17 02:22:06 UTC (rev 319382)
+++ php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server.inc  
2011-11-17 02:32:21 UTC (rev 319383)
@@ -12,7 +12,7 @@
$descriptorspec = array(
0 = STDIN,
1 = STDOUT,
-   2 = array(pipe, w),
+   2 = STDERR,
);

if (substr(PHP_OS, 0, 3) == 'WIN') {
@@ -21,35 +21,25 @@
$cmd .=  {$router};
}

-   $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, 
$doc_root, NULL, array(bypass_shell = true));
+   $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, 
$doc_root, NULL, array(bypass_shell = true,  suppress_errors = true));
} else {
$cmd = exec {$php_executable} -t {$doc_root} -S  . 
PHP_CLI_SERVER_ADDRESS;
if (!$no_router) {
$cmd .=  {$router};
}
+   $cmd .=  2/dev/null;

$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
}

-   //@FIXME is there a better way to make sure the process is ready?
-   usleep(5);
-
-   stream_set_blocking($pipes[2], 0);
-   if ($err = stream_get_contents($pipes[2])) {
-   fclose($pipes[2]);
-   proc_terminate($handle);
-   @unlink(__DIR__ . /{$router});
-   die(Cli sever could not be started:  . $err);
-   }
-
register_shutdown_function(
-   function($handle, $router, $pipes) {
-   stream_get_contents($pipes[2]);
-   fclose($pipes[2]);
+   function($handle) use($router) {
proc_terminate($handle);
@unlink(__DIR__ . /{$router});
},
-   $handle, $router, $pipes
+   $handle
);
+   usleep(5);
 }
 ?
+

Modified: php/php-src/trunk/sapi/cli/tests/php_cli_server.inc
===
--- php/php-src/trunk/sapi/cli/tests/php_cli_server.inc 2011-11-17 02:22:06 UTC 
(rev 319382)
+++ php/php-src/trunk/sapi/cli/tests/php_cli_server.inc 2011-11-17 02:32:21 UTC 
(rev 319383)
@@ -12,7 +12,7 @@
$descriptorspec = array(
0 = STDIN,
1 = STDOUT,
-   2 = array(pipe, w),
+   2 = STDERR,
);

if (substr(PHP_OS, 0, 3) == 'WIN') {
@@ -21,35 +21,25 @@
$cmd .=  {$router};
}

-   $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, 
$doc_root, NULL, array(bypass_shell = true));
+   $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, 
$doc_root, NULL, array(bypass_shell = true,  suppress_errors = true));
} else {
$cmd = exec {$php_executable} -t {$doc_root} -S  . 
PHP_CLI_SERVER_ADDRESS;
if (!$no_router) {
$cmd .=  {$router};
}
+   $cmd .=  2/dev/null;

$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
}

-   //@FIXME is there a better way to make sure the process is ready?
-   usleep(5);
-
-   stream_set_blocking($pipes[2], 0);
-   if ($err = stream_get_contents($pipes[2])) {
-   fclose($pipes[2]);
-   proc_terminate($handle);
-   @unlink(__DIR__ . /{$router});
-   die(Cli sever could not be started:  . $err);
-   }
-
register_shutdown_function(
-   function($handle, $router, $pipes) {
-   stream_get_contents($pipes[2]);
-   fclose($pipes[2]);
+   function($handle) use($router) {
proc_terminate($handle);
@unlink(__DIR__ . /{$router});
},
-   $handle, $router, $pipes
+   $handle
);
+   usleep(5);
 }
 ?
+

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