Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/cli/config.m4 branches/PHP_5_4/sapi/cli/config.w32 branches/PHP_5_4/sapi/cli/php_cli.c branches/PHP_5_4/sapi/cli/php_cli_server.c branches/PHP_5_

2011-06-22 Thread Alexey Shein
2011/6/22 Christopher Jones :
>
>
> On 06/21/2011 11:01 PM, Alexey Shein wrote:
>>
>> Anybody? It seems Pierre fixed only windows build, at least, mine is
>> still broken:
>
> I've built 5.4 & trunk OK on a couple of Linux machines.  Have you
> cleaned up before building, e.g. with vcsclean?
>

You were right, thank you. I've just only done make clean without
vcsclean. After vcsclean trunk, 5.4 and 5.3 builds ok.

> There are a few things Moriyoshi said he'd look at, including crashes
> and directory handling issues.
>
> Chris
>
>>
>> sapi/cli/php_cli.o: In function `main':
>> /home/conf/php-src/trunk/sapi/cli/php_cli.c:1301: undefined reference
>> to `cli_server_sapi_module'
>> /home/conf/php-src/trunk/sapi/cli/php_cli.c:1361: undefined reference
>> to `do_cli_server'
>> collect2: ld returned 1 exit status
>> make: *** [sapi/cli/php] Error 1
>>
>> 2011/6/21 Pierre Joye:
>>>
>>> The build is still broken. Can you fix it please?
>>>
>>> On Tue, Jun 21, 2011 at 11:12 AM, Moriyoshi Koizumi  wrote:

 Thanks!

 On 2011/06/21, at 8:36, Felipe Pena wrote:

> Fixed.
>
> 2011/6/20 Johannes Schlüter
>
>> Hi,
>>
>> On Mon, 2011-06-20 at 20:27 +, Moriyoshi Koizumi wrote:
>>>
>>> moriyoshi                                Mon, 20 Jun 2011 20:27:39
>>> +
>>>
>>> Revision: http://svn.php.net/viewvc?view=revision&revision=312344
>>>
>>> Log:
>>> - Add built-in web server to CLI SAPI. See the RFC for detail.
>>
>> This broke the -d option. Causing this error on make:
>>
>> | Generating phar.phar
>> | PEAR package PHP_Archive not installed: generated phar will require
>> | PHP's phar extension be enabled.
>> | Creating phar files is disabled by ini setting 'phar.readonly'.
>> | make: *** [ext/phar/phar.phar] Error 1
>>
>> which can be reduced to this simple test case:
>>
>> $ sapi/cli/php -n -d phar.readonly=0 -r 'echo
>> ini_get("phar.readonly");'
>> 1
>>
>> I see that php_cli.c now handles parsing -d options before calling
>> sapi_startup() whic seems to cause this.
>>
>>
>> johannes
>>
>>
>>
>> --
>> PHP CVS Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
> --
> Regards,
> Felipe Pena


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


>>>
>>>
>>>
>>> --
>>> Pierre
>>>
>>> @pierrejoye | 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
>>>
>>>
>>
>>
>>
>
> --
> Email: [email protected]
> Tel:  +1 650 506 8630
> Blog:  http://blogs.oracle.com/opal/
>



-- 
Regards,
Shein Alexey

--
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/dom/tests/DOMDocument_validate_on_parse_variation.phpt branches/PHP_5_3/ext/dom/tests/dom004.phpt branches/PHP_5_3/ext/dom/tests/dom_xinclude.phpt bra

2011-06-22 Thread Shein Alexey
sheinWed, 22 Jun 2011 09:28:14 +

Revision: http://svn.php.net/viewvc?view=revision&revision=312375

Log:
Fixed dom tests.

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
U   php/php-src/branches/PHP_5_3/ext/dom/tests/dom004.phpt
U   php/php-src/branches/PHP_5_3/ext/dom/tests/dom_xinclude.phpt
U   
php/php-src/branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
U   php/php-src/branches/PHP_5_4/ext/dom/tests/dom004.phpt
U   php/php-src/branches/PHP_5_4/ext/dom/tests/dom_xinclude.phpt
U   
php/php-src/trunk/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
U   php/php-src/trunk/ext/dom/tests/dom004.phpt
U   php/php-src/trunk/ext/dom/tests/dom_xinclude.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
 2011-06-22 09:09:01 UTC (rev 312374)
+++ 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
 2011-06-22 09:28:14 UTC (rev 312375)
@@ -6,17 +6,14 @@
 --SKIPIF--
 http://www.php.net/docs.php') === FALSE )
-exit('skip network not available');
 ?>
 --FILE--
 http://www.php.net/docs.php');
+chdir(__DIR__ . "/../examples");
+$XMLStringGood = file_get_contents('note.xml');

 $dom = new DOMDocument;
 $dom->resolveExternals = TRUE;
@@ -27,7 +24,7 @@
 echo "No Error Report Above\n";

 $BogusElement = $dom->createElement('NYPHP','DOMinatrix');
-$Body = $dom->getElementsByTagName('body')->item(0);
+$Body = $dom->getElementsByTagName('from')->item(0);
 $Body->appendChild($BogusElement);
 $XMLStringBad = $dom->saveXML();

@@ -42,12 +39,8 @@
 No Error Report Above
 validateOnParse set to TRUE:

-Warning: DOMDocument::loadXML(): Entity 'nbsp' not defined in Entity, line: %d 
in %s on line %d
-
-Warning: DOMDocument::loadXML(): Entity 'copy' not defined in Entity, line: %d 
in %s on line %d
-
 Warning: DOMDocument::loadXML(): No declaration for element NYPHP in Entity, 
line: %d in %s on line %d

-Warning: DOMDocument::loadXML(): Element body content does not follow the DTD, 
expecting (p | h1 | h2 | h3 | h4 | h5 | h6 | div | ul | ol | dl | pre | hr | 
blockquote | address | fieldset | table | form | noscript | ins | del | 
script)*, got (div div div div div NYPHP) in Entity, line: %d in %s on line %d
+Warning: DOMDocument::loadXML(): Element from was declared #PCDATA but 
contains non text nodes in Entity, line: %d in %s on line %d
 Error Report Above


Modified: php/php-src/branches/PHP_5_3/ext/dom/tests/dom004.phpt
===
--- php/php-src/branches/PHP_5_3/ext/dom/tests/dom004.phpt  2011-06-22 
09:09:01 UTC (rev 312374)
+++ php/php-src/branches/PHP_5_3/ext/dom/tests/dom004.phpt  2011-06-22 
09:28:14 UTC (rev 312375)
@@ -3,7 +3,7 @@
 --SKIPIF--
 
 --FILE--
 
 --FILE--
 
 --FILE--
 
 --FILE--
 
 --FILE--
 
 --FILE--
 -- 
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/ext/dom/examples/note.dtd branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt trunk/ext/dom/examples/note.dtd trunk/ext/dom/te

2011-06-22 Thread Alexey Shein
Hi, Hannes!
Could you also apply this trivial fix to note.dtd on PHP_5_3 branch? I
don't have enough karma to do it myself. Thank you.

Index: branches/PHP_5_3/ext/dom/examples/note.dtd
===
--- branches/PHP_5_3/ext/dom/examples/note.dtd  (revision 312367)
+++ branches/PHP_5_3/ext/dom/examples/note.dtd  (working copy)
@@ -1,6 +1,6 @@
-
+
 
 
 
 
-
\ No newline at end of file
+


2011/6/9 Hannes Magnusson :
> Is it actually broken there?
> I just removed the external dependencies so I wouldn't have to wait 5
> minutes for the test to run.
>
> -Hannes
>
> On Thu, Jun 9, 2011 at 11:09, Alexey Shein  wrote:
>> PHP_5_3 version?
>>
>> 2011/6/5 Hannes Magnusson :
>>> bjori                                    Sun, 05 Jun 2011 11:31:18 +
>>>
>>> Revision: http://svn.php.net/viewvc?view=revision&revision=311827
>>>
>>> Log:
>>> No need to fetch external files and endless amount of DTDs for this test
>>>
>>> Changed paths:
>>>    U   php/php-src/branches/PHP_5_4/ext/dom/examples/note.dtd
>>>    U   
>>> php/php-src/branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
>>>    U   php/php-src/trunk/ext/dom/examples/note.dtd
>>>    U   
>>> php/php-src/trunk/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
>>
>> --
>> Regards,
>> Shein Alexey
>>
>



-- 
Regards,
Shein Alexey
Index: branches/PHP_5_3/ext/dom/examples/note.dtd
===
--- branches/PHP_5_3/ext/dom/examples/note.dtd  (revision 312367)
+++ branches/PHP_5_3/ext/dom/examples/note.dtd  (working copy)
@@ -1,6 +1,6 @@
-
+
 
 
 
 
-
\ No newline at end of file
+
-- 
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/cli/config.m4 branches/PHP_5_4/sapi/cli/config.w32 branches/PHP_5_4/sapi/cli/php_cli.c branches/PHP_5_4/sapi/cli/php_cli_server.c branches/PHP_5_

2011-06-22 Thread Johannes Schlüter

On Wed, 22 Jun 2011 11:01:11 +0500, Alexey Shein  wrote:
> Anybody? It seems Pierre fixed only windows build, at least, mine is
> still broken:
> 
> sapi/cli/php_cli.o: In function `main':
> /home/conf/php-src/trunk/sapi/cli/php_cli.c:1301: undefined reference
> to `cli_server_sapi_module'
> /home/conf/php-src/trunk/sapi/cli/php_cli.c:1361: undefined reference
> to `do_cli_server'
> collect2: ld returned 1 exit status
> make: *** [sapi/cli/php] Error 1

This looks like you didn't run buildconf.

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_3/ext/dom/examples/ note.dtd

2011-06-22 Thread Hannes Magnusson
bjoriWed, 22 Jun 2011 14:59:20 +

Revision: http://svn.php.net/viewvc?view=revision&revision=312379

Log:
Add charset, fixes the validate_on_parse test (confik)

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/dom/examples/note.dtd

Modified: php/php-src/branches/PHP_5_3/ext/dom/examples/note.dtd
===
(Binary files differ)

-- 
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/Zend/ zend_hash.c

2011-06-22 Thread Felipe Pena
felipe   Wed, 22 Jun 2011 15:12:47 +

Revision: http://svn.php.net/viewvc?view=revision&revision=312381

Log:
- Fix ZTS build

Changed paths:
U   php/php-src/branches/PHP_5_4/Zend/zend_hash.c

Modified: php/php-src/branches/PHP_5_4/Zend/zend_hash.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_hash.c   2011-06-22 15:00:58 UTC 
(rev 312380)
+++ php/php-src/branches/PHP_5_4/Zend/zend_hash.c   2011-06-22 15:12:47 UTC 
(rev 312381)
@@ -368,6 +368,9 @@
 {
uint nIndex;
Bucket *p;
+#ifdef ZEND_SIGNALS
+   TSRMLS_FETCH();
+#endif

IS_CONSISTENT(ht);
CHECK_INIT(ht);

-- 
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/ NEWS TSRM/TSRM.c TSRM/TSRM.h TSRM/tsrm.m4 Zend/Makefile.am Zend/Zend.m4 Zend/zend.c Zend/zend.h Zend/zend_alloc.c Zend/zend_execute_API.c Zend/zend_ha

2011-06-22 Thread Jérôme Loyet
Hi

it breaks FPM in 5.4 branch on my server:

fat@dev:~/dev/php-src/branches/PHP_5_4$ gdb ./sapi/fpm/php-fpm
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from
/home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm...done.
(gdb) run
Starting program: /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x76ec8394 in pthread_mutex_lock () from
/lib/x86_64-linux-gnu/libpthread.so.0
(gdb) bt
#0  0x76ec8394 in pthread_mutex_lock () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x005dc336 in tsrm_mutex_lock (mutexp=0x0) at
/home/fat/dev/php-src/branches/PHP_5_4/TSRM/TSRM.c:666
#2  0x005dbaff in ts_resource_ex (id=0, th_id=0x0) at
/home/fat/dev/php-src/branches/PHP_5_4/TSRM/TSRM.c:345
#3  0x0065858a in zend_strndup (s=0x98ec46 "0", length=1) at
/home/fat/dev/php-src/branches/PHP_5_4/Zend/zend_alloc.c:2612
#4  0x0080f290 in fcgi_set_mgmt_var (name=0x98ec48
"FCGI_MPXS_CONNS", name_len=15, value=0x98ec46 "0", value_len=1) at
/home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:1109
#5  0x0080cf9f in fcgi_init () at
/home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:195
#6  0x00818e16 in main (argc=1, argv=0x7fffe158) at
/home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c:1590

fat@dev:~/dev/php-src/branches/PHP_5_4$ cat config.nice
#! /bin/sh
#
# Created by configure

'./configure' \
'--disable-all' \
'--enable-fpm' \
'--prefix=/home/fat/php/5.4.x' \
'--enable-session' \
'--enable-phar' \
'--enable-debug' \
'--enable-maintainer-zts' \
"$@"

the code arround line 1109 in sapi/fpm/fpm/fastcgi.c

void fcgi_set_mgmt_var(const char * name, size_t name_len, const char
* value, size_t value_len)
{
  zval * zvalue;
  zvalue = pemalloc(sizeof(*zvalue), 1);
  Z_TYPE_P(zvalue) = IS_STRING;
  Z_STRVAL_P(zvalue) = pestrndup(value, value_len, 1); /* <--
this line */
  Z_STRLEN_P(zvalue) = value_len;
  zend_hash_add(&fcgi_mgmt_vars, name, name_len + 1, &zvalue,
sizeof(zvalue), NULL);
}

is there something to change in the call to pestrndup ?

++ Jerome

2011/6/22 Ilia Alshanetsky :
> iliaa                                    Wed, 22 Jun 2011 14:23:21 +
>
> Revision: http://svn.php.net/viewvc?view=revision&revision=312377
>
> Log:
> Zend Signal Handling
>
> Changed paths:
>    U   php/php-src/branches/PHP_5_4/NEWS
>    U   php/php-src/branches/PHP_5_4/TSRM/TSRM.c
>    U   php/php-src/branches/PHP_5_4/TSRM/TSRM.h
>    U   php/php-src/branches/PHP_5_4/TSRM/tsrm.m4
>    U   php/php-src/branches/PHP_5_4/Zend/Makefile.am
>    U   php/php-src/branches/PHP_5_4/Zend/Zend.m4
>    U   php/php-src/branches/PHP_5_4/Zend/zend.c
>    U   php/php-src/branches/PHP_5_4/Zend/zend.h
>    U   php/php-src/branches/PHP_5_4/Zend/zend_alloc.c
>    U   php/php-src/branches/PHP_5_4/Zend/zend_execute_API.c
>    U   php/php-src/branches/PHP_5_4/Zend/zend_hash.c
>    A   php/php-src/branches/PHP_5_4/Zend/zend_signal.c
>    A   php/php-src/branches/PHP_5_4/Zend/zend_signal.h
>    U   php/php-src/branches/PHP_5_4/configure.in
>    U   php/php-src/branches/PHP_5_4/ext/pcntl/pcntl.c
>    U   php/php-src/branches/PHP_5_4/ext/pcntl/php_signal.c
>    U   php/php-src/branches/PHP_5_4/ext/pcntl/tests/pcntl_signal.phpt
>    U   php/php-src/branches/PHP_5_4/ext/standard/info.c
>    U   php/php-src/branches/PHP_5_4/ext/standard/tests/file/bug22414.phpt
>    U   
> php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/phpinfo.phpt
>    U   php/php-src/branches/PHP_5_4/main/SAPI.c
>    U   php/php-src/branches/PHP_5_4/main/main.c
>
>
> --
> 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/fpm/fpm/fpm_main.c trunk/sapi/fpm/fpm/fpm_main.c

2011-06-22 Thread Felipe Pena
felipe   Thu, 23 Jun 2011 00:25:54 +

Revision: http://svn.php.net/viewvc?view=revision&revision=312389

Log:
- Fixed crash on startup

Changed paths:
U   php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c
U   php/php-src/trunk/sapi/fpm/fpm/fpm_main.c

Modified: php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c
===
--- php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c2011-06-22 
21:22:06 UTC (rev 312388)
+++ php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c2011-06-23 
00:25:54 UTC (rev 312389)
@@ -1587,8 +1587,6 @@
char *fpm_prefix = NULL;
int test_conf = 0;

-   fcgi_init();
-
 #ifdef HAVE_SIGNAL_H
 #if defined(SIGPIPE) && defined(SIG_IGN)
signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE in standalone mode so
@@ -1605,6 +1603,8 @@
tsrm_ls = ts_resource(0);
 #endif

+   fcgi_init();
+
sapi_startup(&cgi_sapi_module);
cgi_sapi_module.php_ini_path_override = NULL;
cgi_sapi_module.php_ini_ignore_cwd = 1;

Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c
===
--- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c   2011-06-22 21:22:06 UTC (rev 
312388)
+++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c   2011-06-23 00:25:54 UTC (rev 
312389)
@@ -1587,8 +1587,6 @@
char *fpm_prefix = NULL;
int test_conf = 0;

-   fcgi_init();
-
 #ifdef HAVE_SIGNAL_H
 #if defined(SIGPIPE) && defined(SIG_IGN)
signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE in standalone mode so
@@ -1605,6 +1603,8 @@
tsrm_ls = ts_resource(0);
 #endif

+   fcgi_init();
+
sapi_startup(&cgi_sapi_module);
cgi_sapi_module.php_ini_path_override = NULL;
cgi_sapi_module.php_ini_ignore_cwd = 1;

-- 
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/ NEWS TSRM/TSRM.c TSRM/TSRM.h TSRM/tsrm.m4 Zend/Makefile.am Zend/Zend.m4 Zend/zend.c Zend/zend.h Zend/zend_alloc.c Zend/zend_execute_API.c Zend/zend_ha

2011-06-22 Thread Felipe Pena
Hi,

I've committed a fix, can you check if it's ok?

2011/6/22 Jérôme Loyet :
> Hi
>
> it breaks FPM in 5.4 branch on my server:
>
> fat@dev:~/dev/php-src/branches/PHP_5_4$ gdb ./sapi/fpm/php-fpm
> GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later 
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> For bug reporting instructions, please see:
> ...
> Reading symbols from
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm...done.
> (gdb) run
> Starting program: /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm
> [Thread debugging using libthread_db enabled]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x76ec8394 in pthread_mutex_lock () from
> /lib/x86_64-linux-gnu/libpthread.so.0
> (gdb) bt
> #0  0x76ec8394 in pthread_mutex_lock () from
> /lib/x86_64-linux-gnu/libpthread.so.0
> #1  0x005dc336 in tsrm_mutex_lock (mutexp=0x0) at
> /home/fat/dev/php-src/branches/PHP_5_4/TSRM/TSRM.c:666
> #2  0x005dbaff in ts_resource_ex (id=0, th_id=0x0) at
> /home/fat/dev/php-src/branches/PHP_5_4/TSRM/TSRM.c:345
> #3  0x0065858a in zend_strndup (s=0x98ec46 "0", length=1) at
> /home/fat/dev/php-src/branches/PHP_5_4/Zend/zend_alloc.c:2612
> #4  0x0080f290 in fcgi_set_mgmt_var (name=0x98ec48
> "FCGI_MPXS_CONNS", name_len=15, value=0x98ec46 "0", value_len=1) at
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:1109
> #5  0x0080cf9f in fcgi_init () at
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:195
> #6  0x00818e16 in main (argc=1, argv=0x7fffe158) at
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c:1590
>
> fat@dev:~/dev/php-src/branches/PHP_5_4$ cat config.nice
> #! /bin/sh
> #
> # Created by configure
>
> './configure' \
> '--disable-all' \
> '--enable-fpm' \
> '--prefix=/home/fat/php/5.4.x' \
> '--enable-session' \
> '--enable-phar' \
> '--enable-debug' \
> '--enable-maintainer-zts' \
> "$@"
>
> the code arround line 1109 in sapi/fpm/fpm/fastcgi.c
>
> void fcgi_set_mgmt_var(const char * name, size_t name_len, const char
> * value, size_t value_len)
> {
>  zval * zvalue;
>  zvalue = pemalloc(sizeof(*zvalue), 1);
>  Z_TYPE_P(zvalue) = IS_STRING;
>  Z_STRVAL_P(zvalue) = pestrndup(value, value_len, 1); /* <--
> this line */
>  Z_STRLEN_P(zvalue) = value_len;
>  zend_hash_add(&fcgi_mgmt_vars, name, name_len + 1, &zvalue,
> sizeof(zvalue), NULL);
> }
>
> is there something to change in the call to pestrndup ?
>
> ++ Jerome
>
> 2011/6/22 Ilia Alshanetsky :
>> iliaa                                    Wed, 22 Jun 2011 14:23:21 +
>>
>> Revision: http://svn.php.net/viewvc?view=revision&revision=312377
>>
>> Log:
>> Zend Signal Handling
>>
>> Changed paths:
>>    U   php/php-src/branches/PHP_5_4/NEWS
>>    U   php/php-src/branches/PHP_5_4/TSRM/TSRM.c
>>    U   php/php-src/branches/PHP_5_4/TSRM/TSRM.h
>>    U   php/php-src/branches/PHP_5_4/TSRM/tsrm.m4
>>    U   php/php-src/branches/PHP_5_4/Zend/Makefile.am
>>    U   php/php-src/branches/PHP_5_4/Zend/Zend.m4
>>    U   php/php-src/branches/PHP_5_4/Zend/zend.c
>>    U   php/php-src/branches/PHP_5_4/Zend/zend.h
>>    U   php/php-src/branches/PHP_5_4/Zend/zend_alloc.c
>>    U   php/php-src/branches/PHP_5_4/Zend/zend_execute_API.c
>>    U   php/php-src/branches/PHP_5_4/Zend/zend_hash.c
>>    A   php/php-src/branches/PHP_5_4/Zend/zend_signal.c
>>    A   php/php-src/branches/PHP_5_4/Zend/zend_signal.h
>>    U   php/php-src/branches/PHP_5_4/configure.in
>>    U   php/php-src/branches/PHP_5_4/ext/pcntl/pcntl.c
>>    U   php/php-src/branches/PHP_5_4/ext/pcntl/php_signal.c
>>    U   php/php-src/branches/PHP_5_4/ext/pcntl/tests/pcntl_signal.phpt
>>    U   php/php-src/branches/PHP_5_4/ext/standard/info.c
>>    U   php/php-src/branches/PHP_5_4/ext/standard/tests/file/bug22414.phpt
>>    U   
>> php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/phpinfo.phpt
>>    U   php/php-src/branches/PHP_5_4/main/SAPI.c
>>    U   php/php-src/branches/PHP_5_4/main/main.c
>>
>>
>> --
>> 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
>
>



-- 
Regards,
Felipe Pena

--
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/ NEWS TSRM/TSRM.c TSRM/TSRM.h TSRM/tsrm.m4 Zend/Makefile.am Zend/Zend.m4 Zend/zend.c Zend/zend.h Zend/zend_alloc.c Zend/zend_execute_API.c Zend/zend_ha

2011-06-22 Thread Jérôme Loyet
Le 23 juin 2011 02:26, Felipe Pena  a écrit :
> Hi,
>
> I've committed a fix, can you check if it's ok?

nope:

fat@dev:~/dev/php-src/branches/PHP_5_4$ gdb ./sapi/fpm/php-fpm
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from
/home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm...done.
(gdb) r
Starting program: /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x0065868c in zend_strndup (s=0x990946 "0", length=1) at
/home/fat/dev/php-src/branches/PHP_5_4/Zend/zend_alloc.c:2615
2615HANDLE_BLOCK_INTERRUPTIONS();
(gdb) bt
#0  0x0065868c in zend_strndup (s=0x990946 "0", length=1) at
/home/fat/dev/php-src/branches/PHP_5_4/Zend/zend_alloc.c:2615
#1  0x0080f418 in fcgi_set_mgmt_var (name=0x990948
"FCGI_MPXS_CONNS", name_len=15, value=0x990946 "0", value_len=1) at
/home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:1113
#2  0x0080d07f in fcgi_init () at
/home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:197
#3  0x0081a93c in main (argc=1, argv=0x7fffe158) at
/home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c:1607


>
> 2011/6/22 Jérôme Loyet :
>> Hi
>>
>> it breaks FPM in 5.4 branch on my server:
>>
>> fat@dev:~/dev/php-src/branches/PHP_5_4$ gdb ./sapi/fpm/php-fpm
>> GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
>> Copyright (C) 2010 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later 
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "x86_64-linux-gnu".
>> For bug reporting instructions, please see:
>> ...
>> Reading symbols from
>> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm...done.
>> (gdb) run
>> Starting program: /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm
>> [Thread debugging using libthread_db enabled]
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x76ec8394 in pthread_mutex_lock () from
>> /lib/x86_64-linux-gnu/libpthread.so.0
>> (gdb) bt
>> #0  0x76ec8394 in pthread_mutex_lock () from
>> /lib/x86_64-linux-gnu/libpthread.so.0
>> #1  0x005dc336 in tsrm_mutex_lock (mutexp=0x0) at
>> /home/fat/dev/php-src/branches/PHP_5_4/TSRM/TSRM.c:666
>> #2  0x005dbaff in ts_resource_ex (id=0, th_id=0x0) at
>> /home/fat/dev/php-src/branches/PHP_5_4/TSRM/TSRM.c:345
>> #3  0x0065858a in zend_strndup (s=0x98ec46 "0", length=1) at
>> /home/fat/dev/php-src/branches/PHP_5_4/Zend/zend_alloc.c:2612
>> #4  0x0080f290 in fcgi_set_mgmt_var (name=0x98ec48
>> "FCGI_MPXS_CONNS", name_len=15, value=0x98ec46 "0", value_len=1) at
>> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:1109
>> #5  0x0080cf9f in fcgi_init () at
>> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:195
>> #6  0x00818e16 in main (argc=1, argv=0x7fffe158) at
>> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c:1590
>>
>> fat@dev:~/dev/php-src/branches/PHP_5_4$ cat config.nice
>> #! /bin/sh
>> #
>> # Created by configure
>>
>> './configure' \
>> '--disable-all' \
>> '--enable-fpm' \
>> '--prefix=/home/fat/php/5.4.x' \
>> '--enable-session' \
>> '--enable-phar' \
>> '--enable-debug' \
>> '--enable-maintainer-zts' \
>> "$@"
>>
>> the code arround line 1109 in sapi/fpm/fpm/fastcgi.c
>>
>> void fcgi_set_mgmt_var(const char * name, size_t name_len, const char
>> * value, size_t value_len)
>> {
>>  zval * zvalue;
>>  zvalue = pemalloc(sizeof(*zvalue), 1);
>>  Z_TYPE_P(zvalue) = IS_STRING;
>>  Z_STRVAL_P(zvalue) = pestrndup(value, value_len, 1); /* <--
>> this line */
>>  Z_STRLEN_P(zvalue) = value_len;
>>  zend_hash_add(&fcgi_mgmt_vars, name, name_len + 1, &zvalue,
>> sizeof(zvalue), NULL);
>> }
>>
>> is there something to change in the call to pestrndup ?
>>
>> ++ Jerome
>>
>> 2011/6/22 Ilia Alshanetsky :
>>> iliaa                                    Wed, 22 Jun 2011 14:23:21 +
>>>
>>> Revision: http://svn.php.net/viewvc?view=revision&revision=312377
>>>
>>> Log:
>>> Zend Signal Handling
>>>
>>> Changed paths:
>>>    U   php/php-src/branches/PHP_5_4/NEWS
>>>    U   php/php-src/branches/PHP_5_4/TSRM/TSRM.c
>>>    U   php/php-src/branches/PHP_5_4/TSRM/TSRM.h
>>>    U   php/php-src/branches/PHP_5_4/TSRM/tsrm.m4
>>>    U   php/php-src

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c trunk/sapi/fpm/fpm/fpm_main.c

2011-06-22 Thread Felipe Pena
felipe   Thu, 23 Jun 2011 00:40:31 +

Revision: http://svn.php.net/viewvc?view=revision&revision=312390

Log:
- Fixed crash (take 2)

Changed paths:
U   php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c
U   php/php-src/trunk/sapi/fpm/fpm/fpm_main.c

Modified: php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c
===
--- php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c2011-06-23 
00:25:54 UTC (rev 312389)
+++ php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c2011-06-23 
00:40:31 UTC (rev 312390)
@@ -1603,11 +1603,11 @@
tsrm_ls = ts_resource(0);
 #endif

-   fcgi_init();
-
sapi_startup(&cgi_sapi_module);
cgi_sapi_module.php_ini_path_override = NULL;
cgi_sapi_module.php_ini_ignore_cwd = 1;
+
+   fcgi_init();

 #ifdef PHP_WIN32
_fmode = _O_BINARY; /* sets default for file streams to binary */

Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c
===
--- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c   2011-06-23 00:25:54 UTC (rev 
312389)
+++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c   2011-06-23 00:40:31 UTC (rev 
312390)
@@ -1603,11 +1603,11 @@
tsrm_ls = ts_resource(0);
 #endif

-   fcgi_init();
-
sapi_startup(&cgi_sapi_module);
cgi_sapi_module.php_ini_path_override = NULL;
cgi_sapi_module.php_ini_ignore_cwd = 1;
+
+   fcgi_init();

 #ifdef PHP_WIN32
_fmode = _O_BINARY; /* sets default for file streams to binary */

-- 
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/ NEWS TSRM/TSRM.c TSRM/TSRM.h TSRM/tsrm.m4 Zend/Makefile.am Zend/Zend.m4 Zend/zend.c Zend/zend.h Zend/zend_alloc.c Zend/zend_execute_API.c Zend/zend_ha

2011-06-22 Thread Felipe Pena
Try again, please. :)

2011/6/22 Jérôme Loyet :
> Le 23 juin 2011 02:26, Felipe Pena  a écrit :
>> Hi,
>>
>> I've committed a fix, can you check if it's ok?
>
> nope:
>
> fat@dev:~/dev/php-src/branches/PHP_5_4$ gdb ./sapi/fpm/php-fpm
> GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later 
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> For bug reporting instructions, please see:
> ...
> Reading symbols from
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm...done.
> (gdb) r
> Starting program: /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm
> [Thread debugging using libthread_db enabled]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0065868c in zend_strndup (s=0x990946 "0", length=1) at
> /home/fat/dev/php-src/branches/PHP_5_4/Zend/zend_alloc.c:2615
> 2615            HANDLE_BLOCK_INTERRUPTIONS();
> (gdb) bt
> #0  0x0065868c in zend_strndup (s=0x990946 "0", length=1) at
> /home/fat/dev/php-src/branches/PHP_5_4/Zend/zend_alloc.c:2615
> #1  0x0080f418 in fcgi_set_mgmt_var (name=0x990948
> "FCGI_MPXS_CONNS", name_len=15, value=0x990946 "0", value_len=1) at
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:1113
> #2  0x0080d07f in fcgi_init () at
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:197
> #3  0x0081a93c in main (argc=1, argv=0x7fffe158) at
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c:1607
>
>
>>
>> 2011/6/22 Jérôme Loyet :
>>> Hi
>>>
>>> it breaks FPM in 5.4 branch on my server:
>>>
>>> fat@dev:~/dev/php-src/branches/PHP_5_4$ gdb ./sapi/fpm/php-fpm
>>> GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
>>> Copyright (C) 2010 Free Software Foundation, Inc.
>>> License GPLv3+: GNU GPL version 3 or later 
>>> 
>>> This is free software: you are free to change and redistribute it.
>>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>>> and "show warranty" for details.
>>> This GDB was configured as "x86_64-linux-gnu".
>>> For bug reporting instructions, please see:
>>> ...
>>> Reading symbols from
>>> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm...done.
>>> (gdb) run
>>> Starting program: /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm
>>> [Thread debugging using libthread_db enabled]
>>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> 0x76ec8394 in pthread_mutex_lock () from
>>> /lib/x86_64-linux-gnu/libpthread.so.0
>>> (gdb) bt
>>> #0  0x76ec8394 in pthread_mutex_lock () from
>>> /lib/x86_64-linux-gnu/libpthread.so.0
>>> #1  0x005dc336 in tsrm_mutex_lock (mutexp=0x0) at
>>> /home/fat/dev/php-src/branches/PHP_5_4/TSRM/TSRM.c:666
>>> #2  0x005dbaff in ts_resource_ex (id=0, th_id=0x0) at
>>> /home/fat/dev/php-src/branches/PHP_5_4/TSRM/TSRM.c:345
>>> #3  0x0065858a in zend_strndup (s=0x98ec46 "0", length=1) at
>>> /home/fat/dev/php-src/branches/PHP_5_4/Zend/zend_alloc.c:2612
>>> #4  0x0080f290 in fcgi_set_mgmt_var (name=0x98ec48
>>> "FCGI_MPXS_CONNS", name_len=15, value=0x98ec46 "0", value_len=1) at
>>> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:1109
>>> #5  0x0080cf9f in fcgi_init () at
>>> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:195
>>> #6  0x00818e16 in main (argc=1, argv=0x7fffe158) at
>>> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c:1590
>>>
>>> fat@dev:~/dev/php-src/branches/PHP_5_4$ cat config.nice
>>> #! /bin/sh
>>> #
>>> # Created by configure
>>>
>>> './configure' \
>>> '--disable-all' \
>>> '--enable-fpm' \
>>> '--prefix=/home/fat/php/5.4.x' \
>>> '--enable-session' \
>>> '--enable-phar' \
>>> '--enable-debug' \
>>> '--enable-maintainer-zts' \
>>> "$@"
>>>
>>> the code arround line 1109 in sapi/fpm/fpm/fastcgi.c
>>>
>>> void fcgi_set_mgmt_var(const char * name, size_t name_len, const char
>>> * value, size_t value_len)
>>> {
>>>  zval * zvalue;
>>>  zvalue = pemalloc(sizeof(*zvalue), 1);
>>>  Z_TYPE_P(zvalue) = IS_STRING;
>>>  Z_STRVAL_P(zvalue) = pestrndup(value, value_len, 1); /* <--
>>> this line */
>>>  Z_STRLEN_P(zvalue) = value_len;
>>>  zend_hash_add(&fcgi_mgmt_vars, name, name_len + 1, &zvalue,
>>> sizeof(zvalue), NULL);
>>> }
>>>
>>> is there something to change in the call to pestrndup ?
>>>
>>> ++ Jerome
>>>
>>> 2011/6/22 Ilia Alshanetsky :
 iliaa                                    Wed, 22 Jun 2011 14:23:21 +

 Revision: http://svn.php.net/viewvc?view=revision&revision=312377

 Log:
 Zend Signal Handling

 Changed paths:
    U   php/

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/sapi/cgi/ cgi_main.c

2011-06-22 Thread Felipe Pena
felipe   Thu, 23 Jun 2011 02:28:04 +

Revision: http://svn.php.net/viewvc?view=revision&revision=312393

Log:
- Fix crash on cgi

Changed paths:
U   php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c

Modified: php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c
===
--- php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c2011-06-23 02:23:12 UTC 
(rev 312392)
+++ php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c2011-06-23 02:28:04 UTC 
(rev 312393)
@@ -1744,7 +1744,7 @@

int max_requests = 500;
int requests = 0;
-   int fastcgi = fcgi_is_fastcgi();
+   int fastcgi;
char *bindpath = NULL;
int fcgi_fd = 0;
fcgi_request *request = NULL;
@@ -1786,6 +1786,7 @@
 #endif

sapi_startup(&cgi_sapi_module);
+   fastcgi = fcgi_is_fastcgi();
cgi_sapi_module.php_ini_path_override = NULL;

 #ifdef PHP_WIN32

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