[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-03-26 Thread changelog
changelog   Thu Mar 27 01:31:35 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2999r2=1.3000diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2999 php-src/ChangeLog:1.3000
--- php-src/ChangeLog:1.2999Wed Mar 26 01:31:40 2008
+++ php-src/ChangeLog   Thu Mar 27 01:31:34 2008
@@ -1,3 +1,130 @@
+2008-03-26  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/standard/file.c:
+  Fixed bug #44501 (LOCK_EX mode in file_put_contents() is impropertly
+  handled in combination with url wrappers)
+
+2008-03-26  Steve Seear  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/standard/tests/network/gethostbyaddr_error.phpt
+  ext/standard/tests/network/gethostbyaddr_error.phpt
+  ext/standard/tests/network/gethostbynamel_error.phpt
+  ext/standard/tests/network/gethostbynamel_error.phpt:
+  Adding tests for gethostbyaddr() and gethostbynamel()
+
+* ext/standard/tests/network/gethostbyaddr_error.phpt
+  ext/standard/tests/network/gethostbyaddr_error.phpt
+  ext/standard/tests/network/gethostbyaddr_error.phpt
+  ext/standard/tests/network/gethostbynamel_error.phpt
+  ext/standard/tests/network/gethostbynamel_error.phpt
+  ext/standard/tests/network/gethostbynamel_error.phpt:
+1.1.4;
+  Adding tests for gethostbyaddr() and gethostbynamel()
+
+2008-03-26  Scott MacVicar  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_ini_scanner.c
+  ZendEngine2/zend_ini_scanner_defs.h
+  ZendEngine2/zend_language_scanner.c
+  ZendEngine2/zend_language_scanner_defs.h:
+  - Add files generated by re2c
+
+2008-03-26  Jani Taskinen  [EMAIL PROTECTED]
+
+* genfiles:
+  MFB53: genfiles update
+
+* (PHP_5_3)
+  genfiles:
+  - Give Marcus good old warm and fuzzy feeling.. :)
+
+2008-03-26  Scott MacVicar  [EMAIL PROTECTED]
+
+* Makefile.frag
+  acinclude.m4
+  configure.in
+  ext/spl/php_spl.c
+  ext/standard/tests/strings/006.phpt
+  ext/standard/tests/strings/007.phpt
+  ext/standard/tests/strings/highlight_file.phpt
+  ext/standard/tests/strings/strip_tags_basic1.phpt
+  ext/standard/tests/strings/strip_tags_basic2.phpt
+  ext/standard/tests/strings/strip_tags_error.phpt
+  ext/standard/tests/strings/strip_tags_variation1.phpt
+  ext/standard/tests/strings/strip_tags_variation10.phpt
+  ext/standard/tests/strings/strip_tags_variation2.phpt
+  ext/standard/tests/strings/strip_tags_variation3.phpt
+  ext/standard/tests/strings/strip_tags_variation4.phpt
+  ext/standard/tests/strings/strip_tags_variation6.phpt
+  ext/standard/tests/strings/strip_tags_variation7.phpt
+  ext/standard/tests/strings/strip_tags_variation8.phpt
+  ext/tokenizer/Makefile.frag
+  ext/tokenizer/tokenizer.c
+  ext/tokenizer/tests/token_get_all_variation14.phpt
+  main/main.c
+  sapi/cgi/cgi_main.c
+  sapi/cli/php_cli.c
+  win32/build/Makefile
+  win32/build/config.w32:
+  MFB 5.3: Rest of the changes for re2c merge
+
+* ZendEngine2/.cvsignore
+  ZendEngine2/FlexLexer.h
+  ZendEngine2/Makefile.am
+  ZendEngine2/Zend.m4
+  ZendEngine2/configure.in
+  ZendEngine2/flex.skl
+  ZendEngine2/zend.c
+  ZendEngine2/zend_compile.c
+  ZendEngine2/zend_compile.h
+  ZendEngine2/zend_globals.h
+  ZendEngine2/zend_globals_macros.h
+  ZendEngine2/zend_highlight.c
+  ZendEngine2/zend_ini_parser.y
+  ZendEngine2/zend_ini_scanner.h
+  ZendEngine2/zend_ini_scanner.l
+  ZendEngine2/zend_language_scanner.h
+  ZendEngine2/zend_language_scanner.l
+  ZendEngine2/zend_stack.c
+  ZendEngine2/zend_stream.c
+  ZendEngine2/zend_stream.h
+  ZendEngine2/zend_strtod.c
+  ZendEngine2/zend_vm_def.h
+  ZendEngine2/zend_vm_execute.h
+  ZendEngine2/tests/bug38779.phpt
+  ZendEngine2/tests/bug42767.phpt:
+  MFB 5.3: Rewrite scanner to be based on re2c instead of flex
+  
+  There are still changes in regards to parsing of Unicode encoded scripts
+  to come.
+
+2008-03-26  Jani Taskinen  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  genfiles:
+  - Use the right tool here too
+
+2008-03-26  Marcus Boerger  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  sapi/embed/php_embed.c:
+  MFH:
+  - Fix memory leak found by Osman
+  - Merge strlen to sizof change from CLI
+
+2008-03-26  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  main/rfc1867.c:
+  MFH: check if return value of write() is -1 and abort upload, setting the
+  correct error status
+
+* ZendEngine2/zend_API.c
+  ZendEngine2/tests/null_argument_001.phpt:
+  allow NULL argument to be passed where binary string expected
+
 2008-03-25  Marcus Boerger  [EMAIL PROTECTED]
 
 * (PHP_5_3)




[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2008-03-26 Thread changelog
changelog   Thu Mar 27 01:31:39 2008 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1271r2=1.1272diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1271 ZendEngine2/ChangeLog:1.1272
--- ZendEngine2/ChangeLog:1.1271Wed Mar 26 01:31:44 2008
+++ ZendEngine2/ChangeLog   Thu Mar 27 01:31:39 2008
@@ -1,3 +1,47 @@
+2008-03-26  Scott MacVicar  [EMAIL PROTECTED]
+
+* zend_ini_scanner.c
+  zend_ini_scanner_defs.h
+  zend_language_scanner.c
+  zend_language_scanner_defs.h:
+  - Add files generated by re2c
+
+* .cvsignore
+  FlexLexer.h
+  Makefile.am
+  Zend.m4
+  configure.in
+  flex.skl
+  zend.c
+  zend_compile.c
+  zend_compile.h
+  zend_globals.h
+  zend_globals_macros.h
+  zend_highlight.c
+  zend_ini_parser.y
+  zend_ini_scanner.h
+  zend_ini_scanner.l
+  zend_language_scanner.h
+  zend_language_scanner.l
+  zend_stack.c
+  zend_stream.c
+  zend_stream.h
+  zend_strtod.c
+  zend_vm_def.h
+  zend_vm_execute.h
+  tests/bug38779.phpt
+  tests/bug42767.phpt:
+  MFB 5.3: Rewrite scanner to be based on re2c instead of flex
+  
+  There are still changes in regards to parsing of Unicode encoded scripts
+  to come.
+
+2008-03-26  Antony Dovgal  [EMAIL PROTECTED]
+
+* zend_API.c
+  tests/null_argument_001.phpt:
+  allow NULL argument to be passed where binary string expected
+
 2008-03-25  Ilia Alshanetsky  [EMAIL PROTECTED]
 
 * (PHP_5_3)
@@ -22386,7 +22430,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1271 2008/03/26 01:31:44 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1272 2008/03/27 01:31:39 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -24110,7 +24154,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1271 2008/03/26 01:31:44 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1272 2008/03/27 01:31:39 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 




Re: [PHP-CVS] cvs: php-src(PHP_5_3) /sapi/embed php_embed.c

2008-03-26 Thread Marcus Boerger
Hello Ilia,

  should this be merged to 5.2?

marcus


Tuesday, March 25, 2008, 11:05:22 PM, you wrote:

 helly   Tue Mar 25 22:05:22 2008 UTC

   Modified files:  (Branch: PHP_5_3)
 /php-src/sapi/embed   php_embed.c 
   Log:
   MFH:
   - Fix memory leak found by Osman
   - Merge strlen to sizof change from CLI
   
   
 http://cvs.php.net/viewvc.cgi/php-src/sapi/embed/php_embed.c?r1=1.11.2.1.2.5.2.2r2=1.11.2.1.2.5.2.3diff_format=u
 Index: php-src/sapi/embed/php_embed.c
 diff -u php-src/sapi/embed/php_embed.c:1.11.2.1.2.5.2.2
 php-src/sapi/embed/php_embed.c:1.11.2.1.2.5.2.3
 --- php-src/sapi/embed/php_embed.c:1.11.2.1.2.5.2.2 Tue Mar 18 22:23:21 
 2008
 +++ php-src/sapi/embed/php_embed.c  Tue Mar 25 22:05:22 2008
 @@ -15,7 +15,7 @@
 | Author: Edin Kadribasic [EMAIL PROTECTED] 
  |
 +--+
  */
 -/* $Id: php_embed.c,v 1.11.2.1.2.5.2.2 2008/03/18 22:23:21 rasmus Exp $ */
 +/* $Id: php_embed.c,v 1.11.2.1.2.5.2.3 2008/03/25 22:05:22 helly Exp $ */
  
  #include php_embed.h
  
 @@ -24,13 +24,13 @@
  #include fcntl.h
  #endif
  
 -#define HARDCODED_INI  \
 -   html_errors=0\n   \
 -   register_argc_argv=1\n\
 -   implicit_flush=1\n\
 -   output_buffering=0\n  \
 -   max_execution_time=0\n\
 -   max_input_time=-1\n
 +const char HARDCODED_INI[] =
 +   html_errors=0\n
 +   register_argc_argv=1\n
 +   implicit_flush=1\n
 +   output_buffering=0\n
 +   max_execution_time=0\n
 +   max_input_time=-1\n\0;
  
  static char* php_embed_read_cookies(TSRMLS_D)
  {
 @@ -146,7 +146,6 @@
  #ifdef ZTS
 void ***tsrm_ls = NULL;
  #endif
 -   int ini_entries_len = 0;
  
  #ifdef HAVE_SIGNAL_H
  #if defined(SIGPIPE)  defined(SIG_IGN)
 @@ -159,26 +158,24 @@
  #endif
  #endif
  
 -#ifdef PHP_WIN32
 -  _fmode = _O_BINARY;  /*sets default for file streams to 
 binary */
 -  setmode(_fileno(stdin), O_BINARY);   /* make the stdio mode be 
 binary */
 -  setmode(_fileno(stdout), O_BINARY);  /* make the stdio mode be 
 binary */
 -  setmode(_fileno(stderr), O_BINARY);  /* make the stdio mode be 
 binary */
 -#endif
 -
  #ifdef ZTS
tsrm_startup(1, 1, 0, NULL);
tsrm_ls = ts_resource(0);
*ptsrm_ls = tsrm_ls;
  #endif
  
 -  ini_entries_len = strlen(HARDCODED_INI);
 -  php_embed_module.ini_entries = malloc(ini_entries_len+2);
 -  memcpy(php_embed_module.ini_entries, HARDCODED_INI, ini_entries_len+1);
 -  php_embed_module.ini_entries[ini_entries_len+1] = 0;
 -
sapi_startup(php_embed_module);
  
 +#ifdef PHP_WIN32
 +  _fmode = _O_BINARY;  /*sets default for file streams to 
 binary */
 +  setmode(_fileno(stdin), O_BINARY);   /* make the stdio mode be 
 binary */
 +  setmode(_fileno(stdout), O_BINARY);  /* make the stdio mode be 
 binary */
 +  setmode(_fileno(stderr), O_BINARY);  /* make the stdio mode be 
 binary */
 +#endif
 +
 +  php_embed_module.ini_entries = malloc(sizeof(HARDCODED_INI));
 +  memcpy(php_embed_module.ini_entries, HARDCODED_INI, sizeof(HARDCODED_INI));
 +
if (argv) {
 php_embed_module.executable_location = argv[0];
}






Best regards,
 Marcus


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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /sapi/embed php_embed.c

2008-03-26 Thread Ilia Alshanetsky

Yeah.


On 26-Mar-08, at 5:33 AM, Marcus Boerger wrote:

Hello Ilia,

 should this be merged to 5.2?

marcus


Tuesday, March 25, 2008, 11:05:22 PM, you wrote:


helly   Tue Mar 25 22:05:22 2008 UTC



 Modified files:  (Branch: PHP_5_3)
   /php-src/sapi/embed   php_embed.c
 Log:
 MFH:
 - Fix memory leak found by Osman
 - Merge strlen to sizof change from CLI


http://cvs.php.net/viewvc.cgi/php-src/sapi/embed/php_embed.c?r1=1.11.2.1.2.5.2.2r2=1.11.2.1.2.5.2.3diff_format=u
Index: php-src/sapi/embed/php_embed.c
diff -u php-src/sapi/embed/php_embed.c:1.11.2.1.2.5.2.2
php-src/sapi/embed/php_embed.c:1.11.2.1.2.5.2.3
--- php-src/sapi/embed/php_embed.c:1.11.2.1.2.5.2.2 Tue Mar 18  
22:23:21 2008

+++ php-src/sapi/embed/php_embed.c  Tue Mar 25 22:05:22 2008
@@ -15,7 +15,7 @@
   | Author: Edin Kadribasic  
[EMAIL PROTECTED]  |

+ 
--+

*/
-/* $Id: php_embed.c,v 1.11.2.1.2.5.2.2 2008/03/18 22:23:21 rasmus  
Exp $ */
+/* $Id: php_embed.c,v 1.11.2.1.2.5.2.3 2008/03/25 22:05:22 helly  
Exp $ */


#include php_embed.h

@@ -24,13 +24,13 @@
#include fcntl.h
#endif

-#define HARDCODED_INI  \
-   html_errors=0\n   \
-   register_argc_argv=1\n\
-   implicit_flush=1\n\
-   output_buffering=0\n  \
-   max_execution_time=0\n\
-   max_input_time=-1\n
+const char HARDCODED_INI[] =
+   html_errors=0\n
+   register_argc_argv=1\n
+   implicit_flush=1\n
+   output_buffering=0\n
+   max_execution_time=0\n
+   max_input_time=-1\n\0;

static char* php_embed_read_cookies(TSRMLS_D)
{
@@ -146,7 +146,6 @@
#ifdef ZTS
   void ***tsrm_ls = NULL;
#endif
-   int ini_entries_len = 0;

#ifdef HAVE_SIGNAL_H
#if defined(SIGPIPE)  defined(SIG_IGN)
@@ -159,26 +158,24 @@
#endif
#endif

-#ifdef PHP_WIN32
-  _fmode = _O_BINARY;  /*sets default for file  
streams to binary */
-  setmode(_fileno(stdin), O_BINARY);   /* make the stdio  
mode be binary */
-  setmode(_fileno(stdout), O_BINARY);  /* make the stdio  
mode be binary */
-  setmode(_fileno(stderr), O_BINARY);  /* make the stdio  
mode be binary */

-#endif
-
#ifdef ZTS
  tsrm_startup(1, 1, 0, NULL);
  tsrm_ls = ts_resource(0);
  *ptsrm_ls = tsrm_ls;
#endif

-  ini_entries_len = strlen(HARDCODED_INI);
-  php_embed_module.ini_entries = malloc(ini_entries_len+2);
-  memcpy(php_embed_module.ini_entries, HARDCODED_INI,  
ini_entries_len+1);

-  php_embed_module.ini_entries[ini_entries_len+1] = 0;
-
  sapi_startup(php_embed_module);

+#ifdef PHP_WIN32
+  _fmode = _O_BINARY;  /*sets default for file  
streams to binary */
+  setmode(_fileno(stdin), O_BINARY);   /* make the stdio  
mode be binary */
+  setmode(_fileno(stdout), O_BINARY);  /* make the stdio  
mode be binary */
+  setmode(_fileno(stderr), O_BINARY);  /* make the stdio  
mode be binary */

+#endif
+
+  php_embed_module.ini_entries = malloc(sizeof(HARDCODED_INI));
+  memcpy(php_embed_module.ini_entries, HARDCODED_INI,  
sizeof(HARDCODED_INI));

+
  if (argv) {
   php_embed_module.executable_location = argv[0];
  }







Best regards,
Marcus


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



Ilia Alshanetsky





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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /sapi/embed php_embed.c

2008-03-26 Thread Antony Dovgal
On 26.03.2008 15:32, Ilia Alshanetsky wrote:
 Yeah.

And what about this one?
http://news.php.net/php.cvs/49106

-- 
Wbr, 
Antony Dovgal

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



[PHP-CVS] cvs: php-src(PHP_5_2) /main rfc1867.c

2008-03-26 Thread Antony Dovgal
tony2001Wed Mar 26 12:59:42 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   rfc1867.c 
  Log:
  MFH: check if return value of write() is -1 and abort upload, setting the 
correct error status
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/rfc1867.c?r1=1.173.2.1.2.10r2=1.173.2.1.2.11diff_format=u
Index: php-src/main/rfc1867.c
diff -u php-src/main/rfc1867.c:1.173.2.1.2.10 
php-src/main/rfc1867.c:1.173.2.1.2.11
--- php-src/main/rfc1867.c:1.173.2.1.2.10   Mon Dec 31 07:20:15 2007
+++ php-src/main/rfc1867.c  Wed Mar 26 12:59:42 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: rfc1867.c,v 1.173.2.1.2.10 2007/12/31 07:20:15 sebastian Exp $ */
+/* $Id: rfc1867.c,v 1.173.2.1.2.11 2008/03/26 12:59:42 tony2001 Exp $ */
 
 /*
  *  This product includes software developed by the Apache Group
@@ -1090,8 +1090,14 @@
} else if (blen  0) {

wlen = write(fd, buff, blen);
-   
-   if (wlen  blen) {
+
+   if (wlen == -1) {
+   /* write failed */
+#if DEBUG_FILE_UPLOAD
+   
sapi_module.sapi_error(E_NOTICE, write() failed - %s, strerror(errno));
+#endif
+   cancel_upload = UPLOAD_ERROR_F;
+   } else if (wlen  blen) {
 #if DEBUG_FILE_UPLOAD

sapi_module.sapi_error(E_NOTICE, Only %d bytes were written, expected to write 
%d, wlen, blen);
 #endif



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /sapi/embed php_embed.c

2008-03-26 Thread Ilia Alshanetsky

That's fine too.


On 26-Mar-08, at 8:38 AM, Antony Dovgal wrote:

On 26.03.2008 15:32, Ilia Alshanetsky wrote:

Yeah.


And what about this one?
http://news.php.net/php.cvs/49106

--
Wbr,
Antony Dovgal


Ilia Alshanetsky





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



[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/embed php_embed.c

2008-03-26 Thread Marcus Boerger
helly   Wed Mar 26 13:21:57 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/embed php_embed.c 
  Log:
  MFH:
  - Fix memory leak found by Osman
  - Merge strlen to sizof change from CLI
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/embed/php_embed.c?r1=1.11.2.1.2.6r2=1.11.2.1.2.7diff_format=u
Index: php-src/sapi/embed/php_embed.c
diff -u php-src/sapi/embed/php_embed.c:1.11.2.1.2.6 
php-src/sapi/embed/php_embed.c:1.11.2.1.2.7
--- php-src/sapi/embed/php_embed.c:1.11.2.1.2.6 Mon Dec 31 07:20:16 2007
+++ php-src/sapi/embed/php_embed.c  Wed Mar 26 13:21:57 2008
@@ -15,7 +15,7 @@
| Author: Edin Kadribasic [EMAIL PROTECTED]  |
+--+
 */
-/* $Id: php_embed.c,v 1.11.2.1.2.6 2007/12/31 07:20:16 sebastian Exp $ */
+/* $Id: php_embed.c,v 1.11.2.1.2.7 2008/03/26 13:21:57 helly Exp $ */
 
 #include php_embed.h
 
@@ -24,13 +24,13 @@
 #include fcntl.h
 #endif
 
-#define HARDCODED_INI  \
-   html_errors=0\n   \
-   register_argc_argv=1\n\
-   implicit_flush=1\n\
-   output_buffering=0\n  \
-   max_execution_time=0\n\
-   max_input_time=-1\n
+const char HARDCODED_INI[] =
+   html_errors=0\n
+   register_argc_argv=1\n
+   implicit_flush=1\n
+   output_buffering=0\n
+   max_execution_time=0\n
+   max_input_time=-1\n\0;
 
 static char* php_embed_read_cookies(TSRMLS_D)
 {
@@ -145,7 +145,6 @@
 #ifdef ZTS
void ***tsrm_ls = NULL;
 #endif
-   int ini_entries_len = 0;
 
 #ifdef HAVE_SIGNAL_H
 #if defined(SIGPIPE)  defined(SIG_IGN)
@@ -158,26 +157,24 @@
 #endif
 #endif
 
-#ifdef PHP_WIN32
-  _fmode = _O_BINARY;  /*sets default for file streams to 
binary */
-  setmode(_fileno(stdin), O_BINARY);   /* make the stdio mode be 
binary */
-  setmode(_fileno(stdout), O_BINARY);  /* make the stdio mode be 
binary */
-  setmode(_fileno(stderr), O_BINARY);  /* make the stdio mode be 
binary */
-#endif
-
 #ifdef ZTS
   tsrm_startup(1, 1, 0, NULL);
   tsrm_ls = ts_resource(0);
   *ptsrm_ls = tsrm_ls;
 #endif
 
-  ini_entries_len = strlen(HARDCODED_INI);
-  php_embed_module.ini_entries = malloc(ini_entries_len+2);
-  memcpy(php_embed_module.ini_entries, HARDCODED_INI, ini_entries_len+1);
-  php_embed_module.ini_entries[ini_entries_len+1] = 0;
-
   sapi_startup(php_embed_module);
 
+#ifdef PHP_WIN32
+  _fmode = _O_BINARY;  /*sets default for file streams to 
binary */
+  setmode(_fileno(stdin), O_BINARY);   /* make the stdio mode be 
binary */
+  setmode(_fileno(stdout), O_BINARY);  /* make the stdio mode be 
binary */
+  setmode(_fileno(stderr), O_BINARY);  /* make the stdio mode be 
binary */
+#endif
+
+  php_embed_module.ini_entries = malloc(sizeof(HARDCODED_INI));
+  memcpy(php_embed_module.ini_entries, HARDCODED_INI, sizeof(HARDCODED_INI));
+
   if (argv) {
php_embed_module.executable_location = argv[0];
   }



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



[PHP-CVS] cvs: php-src(PHP_5_3) / genfiles

2008-03-26 Thread Jani Taskinen
janiWed Mar 26 13:35:54 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcgenfiles 
  Log:
  - Use the right tool here too
  
http://cvs.php.net/viewvc.cgi/php-src/genfiles?r1=1.22.2.2r2=1.22.2.2.4.1diff_format=u
Index: php-src/genfiles
diff -u php-src/genfiles:1.22.2.2 php-src/genfiles:1.22.2.2.4.1
--- php-src/genfiles:1.22.2.2   Tue Nov  8 20:21:47 2005
+++ php-src/genfilesWed Mar 26 13:35:54 2008
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-STD='make -f Makefile.frag LEX=flex -L YACC=bison -y -l srcdir=Zend 
builddir=Zend'
+STD='make -f Makefile.frag RE2C=re2c -i YACC=bison -y -l srcdir=Zend 
builddir=Zend top_srcdir=.'
 
 (eval $STD Zend/zend_language_parser.c Zend/zend_language_scanner.c 
Zend/zend_ini_parser.c Zend/zend_ini_scanner.c)
 



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / genfiles

2008-03-26 Thread Marcus Boerger
Hello Jani,

  shouldn't the -i go into RE2CFLAGS but then how about the -g that
might have been detected for your system. And another thing is, how do we
deal with cases where re2c is not present. Should we a) error out, b)
revert, c) ignore?

marcus

Wednesday, March 26, 2008, 2:35:54 PM, you wrote:

 janiWed Mar 26 13:35:54 2008 UTC

   Modified files:  (Branch: PHP_5_3)
 /php-srcgenfiles 
   Log:
   - Use the right tool here too
   
 http://cvs.php.net/viewvc.cgi/php-src/genfiles?r1=1.22.2.2r2=1.22.2.2.4.1diff_format=u
 Index: php-src/genfiles
 diff -u php-src/genfiles:1.22.2.2 php-src/genfiles:1.22.2.2.4.1
 --- php-src/genfiles:1.22.2.2   Tue Nov  8 20:21:47 2005
 +++ php-src/genfilesWed Mar 26 13:35:54 2008
 @@ -1,6 +1,6 @@
  #! /bin/sh
  
 -STD='make -f Makefile.frag LEX=flex -L YACC=bison -y -l srcdir=Zend 
 builddir=Zend'
 +STD='make -f Makefile.frag RE2C=re2c -i YACC=bison -y -l srcdir=Zend 
 builddir=Zend top_srcdir=.'
  
  (eval $STD Zend/zend_language_parser.c Zend/zend_language_scanner.c
 Zend/zend_ini_parser.c Zend/zend_ini_scanner.c)
  






Best regards,
 Marcus


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



[PHP-CVS] cvs: php-src / Makefile.frag acinclude.m4 configure.in /ext/spl php_spl.c /ext/standard/tests/strings 006.phpt 007.phpt highlight_file.phpt strip_tags_basic1.phpt strip_tags_basic2.phpt st

2008-03-26 Thread Scott MacVicar
scottmacWed Mar 26 14:46:17 2008 UTC

  Modified files:  
/php-srcMakefile.frag acinclude.m4 configure.in 
/php-src/ext/splphp_spl.c 
/php-src/ext/standard/tests/strings 006.phpt 007.phpt 
highlight_file.phpt 
strip_tags_basic1.phpt 
strip_tags_basic2.phpt 
strip_tags_error.phpt 
strip_tags_variation1.phpt 
strip_tags_variation10.phpt 
strip_tags_variation2.phpt 
strip_tags_variation3.phpt 
strip_tags_variation4.phpt 
strip_tags_variation6.phpt 
strip_tags_variation7.phpt 
strip_tags_variation8.phpt 
/php-src/ext/tokenizer  Makefile.frag tokenizer.c 
/php-src/ext/tokenizer/teststoken_get_all_variation14.phpt 
/php-src/main   main.c 
/php-src/sapi/cgi   cgi_main.c 
/php-src/sapi/cli   php_cli.c 
/php-src/win32/buildMakefile config.w32 
  Log:
  MFB 5.3: Rest of the changes for re2c merge
  
  
  http://cvs.php.net/viewvc.cgi/php-src/Makefile.frag?r1=1.5r2=1.6diff_format=u
Index: php-src/Makefile.frag
diff -u php-src/Makefile.frag:1.5 php-src/Makefile.frag:1.6
--- php-src/Makefile.frag:1.5   Thu May 24 21:43:56 2007
+++ php-src/Makefile.frag   Wed Mar 26 14:46:16 2008
@@ -7,7 +7,7 @@
 $(builddir)/zend_ini_scanner.lo: $(srcdir)/zend_ini_parser.h
 
 $(srcdir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
-   @$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i 
$(srcdir)/zend_language_scanner.l
+   @(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --case-inverted -cbdFt 
Zend/zend_language_scanner_defs.h -oZend/zend_language_scanner.c 
Zend/zend_language_scanner.l)
 
 $(srcdir)/zend_language_parser.h: $(srcdir)/zend_language_parser.c
 $(srcdir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
@@ -18,6 +18,6 @@
@$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
 
 $(srcdir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
-   @$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
+   @(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --case-inverted -cbdFt 
Zend/zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c Zend/zend_ini_scanner.l)
 
 $(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo 
$(builddir)/zend_compile.lo: $(srcdir)/zend_language_parser.h
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.386r2=1.387diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.386 php-src/acinclude.m4:1.387
--- php-src/acinclude.m4:1.386  Sun Feb 17 20:49:45 2008
+++ php-src/acinclude.m4Wed Mar 26 14:46:16 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.386 2008/02/17 20:49:45 helly Exp $
+dnl $Id: acinclude.m4,v 1.387 2008/03/26 14:46:16 scottmac Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2155,7 +2155,7 @@
   if test -n $RE2C; then
 AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [
   re2c_vernum=`re2c --vernum 2/dev/null`
-  if test -z $re2c_vernum || test $re2c_vernum -lt 1200; then
+  if test -z $re2c_vernum || test $re2c_vernum -lt 1304; then
 php_cv_re2c_version=invalid
   else
 php_cv_re2c_version=`re2c --version | cut -d ' ' -f 2  2/dev/null` 
(ok)
@@ -2164,7 +2164,7 @@
   fi
   case $php_cv_re2c_version in
 |invalid[)]
-  AC_MSG_WARN([You will need re2c 0.12.0 or later if you want to 
regenerate PHP parsers.])
+  AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to 
regenerate PHP parsers.])
   RE2C=exit 0;
   ;;
   esac
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.649r2=1.650diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.649 php-src/configure.in:1.650
--- php-src/configure.in:1.649  Mon Mar 10 15:17:47 2008
+++ php-src/configure.inWed Mar 26 14:46:16 2008
@@ -1,4 +1,4 @@
-## $Id: configure.in,v 1.649 2008/03/10 15:17:47 gwynne Exp $ -*- autoconf -*-
+## $Id: configure.in,v 1.650 2008/03/26 14:46:16 scottmac Exp $ -*- autoconf 
-*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -161,10 +161,38 @@
 PHP_RUNPATH_SWITCH
 
 dnl Checks for some support/generator progs
-PHP_PROG_RE2C
+
 PHP_PROG_AWK
 PHP_PROG_BISON
-PHP_PROG_LEX
+PHP_PROG_RE2C
+
+PHP_ARG_ENABLE(re2c-cgoto, whether to enable computed goto gcc extension with 
re2c,
+[  --enable-re2c-cgoto Enable -g flag to re2c to use computed goto gcc 
extension], no, no)
+
+if test $PHP_RE2C_CGOTO = no; then
+  RE2C_FLAGS=
+else
+  AC_MSG_CHECKING([whether re2c -g works])
+  AC_TRY_COMPILE([],[
+   int main(int argc, 

Re: [PHP-CVS] cvs: php-src(PHP_5_3) / genfiles

2008-03-26 Thread Marcus Boerger
Hello Jani,

   the build system figures out whether one is compiling on a system that
uses a GCC version that supports computed gotos. If so it will set
RE2C_FLAGS to -g to enable that. So the genfiles should overwrite this
setting so that the packed tarball does not end up with code generated with
the -g flag on, hence RE2C_FLAGS= or RE2C_FLAGS=-i is required.

marcus

Wednesday, March 26, 2008, 3:35:05 PM, you wrote:

 It's the genfiles used by people who should REALLY know what they are
 doing since they're the ones creating the release tarballs.. :)

 What is '-g' ? Huh? '-i' just skips the #line.. directives from the
 file..

 --Jani

 On Wed, 2008-03-26 at 14:44 +0100, Marcus Boerger wrote:
 Hello Jani,
 
   shouldn't the -i go into RE2CFLAGS but then how about the -g that
 might have been detected for your system. And another thing is, how do we
 deal with cases where re2c is not present. Should we a) error out, b)
 revert, c) ignore?
 
 marcus
 
 Wednesday, March 26, 2008, 2:35:54 PM, you wrote:
 
  janiWed Mar 26 13:35:54 2008 UTC
 
Modified files:  (Branch: PHP_5_3)
  /php-srcgenfiles 
Log:
- Use the right tool here too

  http://cvs.php.net/viewvc.cgi/php-src/genfiles?r1=1.22.2.2r2=1.22.2.2.4.1diff_format=u
  Index: php-src/genfiles
  diff -u php-src/genfiles:1.22.2.2 php-src/genfiles:1.22.2.2.4.1
  --- php-src/genfiles:1.22.2.2   Tue Nov  8 20:21:47 2005
  +++ php-src/genfilesWed Mar 26 13:35:54 2008
  @@ -1,6 +1,6 @@
   #! /bin/sh
   
  -STD='make -f Makefile.frag LEX=flex -L YACC=bison -y -l srcdir=Zend 
  builddir=Zend'
  +STD='make -f Makefile.frag RE2C=re2c -i YACC=bison -y -l srcdir=Zend 
  builddir=Zend top_srcdir=.'
   
   (eval $STD Zend/zend_language_parser.c Zend/zend_language_scanner.c
  Zend/zend_ini_parser.c Zend/zend_ini_scanner.c)
   
 
 
 
 
 
 
 Best regards,
  Marcus
 
 



Best regards,
 Marcus


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



[PHP-CVS] cvs: php-src(PHP_5_3) / genfiles

2008-03-26 Thread Jani Taskinen
janiWed Mar 26 15:04:57 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcgenfiles 
  Log:
  - Give Marcus good old warm and fuzzy feeling.. :)
  
http://cvs.php.net/viewvc.cgi/php-src/genfiles?r1=1.22.2.2.4.1r2=1.22.2.2.4.2diff_format=u
Index: php-src/genfiles
diff -u php-src/genfiles:1.22.2.2.4.1 php-src/genfiles:1.22.2.2.4.2
--- php-src/genfiles:1.22.2.2.4.1   Wed Mar 26 13:35:54 2008
+++ php-src/genfilesWed Mar 26 15:04:57 2008
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-STD='make -f Makefile.frag RE2C=re2c -i YACC=bison -y -l srcdir=Zend 
builddir=Zend top_srcdir=.'
+STD='make -f Makefile.frag RE2C=re2c RE2C_FLAGS=-i YACC=bison -y -l 
srcdir=Zend builddir=Zend top_srcdir=.'
 
 (eval $STD Zend/zend_language_parser.c Zend/zend_language_scanner.c 
Zend/zend_ini_parser.c Zend/zend_ini_scanner.c)
 



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / genfiles

2008-03-26 Thread Jani Taskinen
Well, that'd be quite a magical build system to sneak that RE2C_FLAGS
there since no such thing is run when a tarball is created. :)

But to make you have warm fuzzy feeling, I added it like that.

--Jani

On Wed, 2008-03-26 at 15:52 +0100, Marcus Boerger wrote:
 Hello Jani,
 
the build system figures out whether one is compiling on a system that
 uses a GCC version that supports computed gotos. If so it will set
 RE2C_FLAGS to -g to enable that. So the genfiles should overwrite this
 setting so that the packed tarball does not end up with code generated with
 the -g flag on, hence RE2C_FLAGS= or RE2C_FLAGS=-i is required.
 
 marcus
 
 Wednesday, March 26, 2008, 3:35:05 PM, you wrote:
 
  It's the genfiles used by people who should REALLY know what they are
  doing since they're the ones creating the release tarballs.. :)
 
  What is '-g' ? Huh? '-i' just skips the #line.. directives from the
  file..
 
  --Jani
 
  On Wed, 2008-03-26 at 14:44 +0100, Marcus Boerger wrote:
  Hello Jani,
  
shouldn't the -i go into RE2CFLAGS but then how about the -g that
  might have been detected for your system. And another thing is, how do we
  deal with cases where re2c is not present. Should we a) error out, b)
  revert, c) ignore?
  
  marcus
  
  Wednesday, March 26, 2008, 2:35:54 PM, you wrote:
  
   janiWed Mar 26 13:35:54 2008 UTC
  
 Modified files:  (Branch: PHP_5_3)
   /php-srcgenfiles 
 Log:
 - Use the right tool here too
 
   http://cvs.php.net/viewvc.cgi/php-src/genfiles?r1=1.22.2.2r2=1.22.2.2.4.1diff_format=u
   Index: php-src/genfiles
   diff -u php-src/genfiles:1.22.2.2 php-src/genfiles:1.22.2.2.4.1
   --- php-src/genfiles:1.22.2.2   Tue Nov  8 20:21:47 2005
   +++ php-src/genfilesWed Mar 26 13:35:54 2008
   @@ -1,6 +1,6 @@
#! /bin/sh

   -STD='make -f Makefile.frag LEX=flex -L YACC=bison -y -l srcdir=Zend 
   builddir=Zend'
   +STD='make -f Makefile.frag RE2C=re2c -i YACC=bison -y -l 
   srcdir=Zend builddir=Zend top_srcdir=.'

(eval $STD Zend/zend_language_parser.c Zend/zend_language_scanner.c
   Zend/zend_ini_parser.c Zend/zend_ini_scanner.c)

  
  
  
  
  
  
  Best regards,
   Marcus
  
  
 
 
 
 Best regards,
  Marcus
 
-- 
Patches/Donations: http://pecl.php.net/~jani/



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



[PHP-CVS] cvs: php-src / genfiles

2008-03-26 Thread Jani Taskinen
janiWed Mar 26 15:05:39 2008 UTC

  Modified files:  
/php-srcgenfiles 
  Log:
  MFB53: genfiles update
  
http://cvs.php.net/viewvc.cgi/php-src/genfiles?r1=1.24r2=1.25diff_format=u
Index: php-src/genfiles
diff -u php-src/genfiles:1.24 php-src/genfiles:1.25
--- php-src/genfiles:1.24   Tue Nov  8 20:21:35 2005
+++ php-src/genfilesWed Mar 26 15:05:39 2008
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-STD='make -f Makefile.frag LEX=flex -L YACC=bison -y -l srcdir=Zend 
builddir=Zend'
+STD='make -f Makefile.frag RE2C=re2c RE2C_FLAGS=-i YACC=bison -y -l 
srcdir=Zend builddir=Zend top_srcdir=.'
 
 (eval $STD Zend/zend_language_parser.c Zend/zend_language_scanner.c 
Zend/zend_ini_parser.c Zend/zend_ini_scanner.c)
 



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



[PHP-CVS] cvs: php-src /ext/standard/tests/network gethostbyaddr_error.phpt gethostbynamel_error.phpt

2008-03-26 Thread Steve Seear
stevseeaWed Mar 26 18:16:55 2008 UTC

  Added files: 
/php-src/ext/standard/tests/network gethostbynamel_error.phpt 
gethostbyaddr_error.phpt 
  Log:
  Adding tests for gethostbyaddr() and gethostbynamel()
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/gethostbynamel_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/network/gethostbynamel_error.phpt
+++ php-src/ext/standard/tests/network/gethostbynamel_error.phpt
--TEST--
Test gethostbynamel() function : error conditions 
--FILE--
?php
/* Prototype  : proto array gethostbynamel(string hostname)
 * Description: Return a list of IP addresses that a given hostname resolves 
to. 
 * Source code: ext/standard/dns.c
 * Alias to functions: 
 */

echo *** Testing gethostbynamel() : error conditions ***\n;

// Zero arguments
echo \n-- Testing gethostbynamel() function with Zero arguments --\n;
var_dump( gethostbynamel() );

//Test gethostbynamel with one more than the expected number of arguments
echo \n-- Testing gethostbynamel() function with more than expected no. of 
arguments --\n;
$hostname = 'string_val';
$extra_arg = 10;
var_dump( gethostbynamel($hostname, $extra_arg) );

echo \n-- Testing gethostbynamel() with an unknown host --\n;
$hostname = 'unknownhost_zzz_xxx_yyy';
var_dump( gethostbynamel($hostname) );

echo Done;
?
--EXPECTF--
*** Testing gethostbynamel() : error conditions ***

-- Testing gethostbynamel() function with Zero arguments --

Warning: gethostbynamel() expects exactly 1 parameter, 0 given in %s on line %d
NULL

-- Testing gethostbynamel() function with more than expected no. of arguments --

Warning: gethostbynamel() expects exactly 1 parameter, 2 given in %s on line %d
NULL

-- Testing gethostbynamel() with an unknown host --
bool(false)
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/gethostbyaddr_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/network/gethostbyaddr_error.phpt
+++ php-src/ext/standard/tests/network/gethostbyaddr_error.phpt
--TEST--
Test gethostbyaddr() function : error conditions 
--FILE--
?php
/* Prototype  : proto string gethostbyaddr(string ip_address)
 * Description: Get the Internet host name corresponding to a given IP address 
 * Source code: ext/standard/dns.c
 * Alias to functions: 
 */


echo Testing gethostbyaddr : error conditions\n;

// Zero arguments
echo \n-- Testing gethostbyaddr function with Zero arguments --\n;
var_dump( gethostbyaddr() );

//Test gethostbyaddr with one more than the expected number of arguments
echo \n-- Testing gethostbyaddr function with more than expected no. of 
arguments --\n;
$ip_address = 'string_val';
$extra_arg = 10;
var_dump( gethostbyaddr($ip_address, $extra_arg) );

echo \n-- Testing gethostbyaddr function with invalid addresses --\n;

$ip_address = 'invalid';
var_dump( gethostbyaddr($ip_address) );

$ip_address = '300.1.2.3';
var_dump( gethostbyaddr($ip_address) );

$ip_address = '256.1.2.3';
var_dump( gethostbyaddr($ip_address) );

echo Done;
?
--EXPECTREGEX--
Testing gethostbyaddr : error conditions

-- Testing gethostbyaddr function with Zero arguments --

Warning: gethostbyaddr\(\) expects exactly 1 parameter, 0 given in .* on line 
\d+
NULL

-- Testing gethostbyaddr function with more than expected no. of arguments --

Warning: gethostbyaddr\(\) expects exactly 1 parameter, 2 given in .* on line 
\d+
NULL

-- Testing gethostbyaddr function with invalid addresses --

Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or 
IPv6 address) in .* on line \d+
bool\(false\)

Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or 
IPv6 address) in .* on line \d+
bool\(false\)

Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or 
IPv6 address) in .* on line \d+
bool\(false\)
Done



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/network gethostbyaddr_error.phpt gethostbynamel_error.phpt

2008-03-26 Thread Steve Seear
stevseeaWed Mar 26 18:18:08 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/network gethostbynamel_error.phpt 
gethostbyaddr_error.phpt 
  Log:
  Adding tests for gethostbyaddr() and gethostbynamel()
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/gethostbynamel_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/network/gethostbynamel_error.phpt
+++ php-src/ext/standard/tests/network/gethostbynamel_error.phpt
--TEST--
Test gethostbynamel() function : error conditions 
--FILE--
?php
/* Prototype  : proto array gethostbynamel(string hostname)
 * Description: Return a list of IP addresses that a given hostname resolves 
to. 
 * Source code: ext/standard/dns.c
 * Alias to functions: 
 */

echo *** Testing gethostbynamel() : error conditions ***\n;

// Zero arguments
echo \n-- Testing gethostbynamel() function with Zero arguments --\n;
var_dump( gethostbynamel() );

//Test gethostbynamel with one more than the expected number of arguments
echo \n-- Testing gethostbynamel() function with more than expected no. of 
arguments --\n;
$hostname = 'string_val';
$extra_arg = 10;
var_dump( gethostbynamel($hostname, $extra_arg) );

echo \n-- Testing gethostbynamel() with an unknown host --\n;
$hostname = 'unknownhost_zzz_xxx_yyy';
var_dump( gethostbynamel($hostname) );

echo Done;
?
--EXPECTF--
*** Testing gethostbynamel() : error conditions ***

-- Testing gethostbynamel() function with Zero arguments --

Warning: gethostbynamel() expects exactly 1 parameter, 0 given in %s on line %d
NULL

-- Testing gethostbynamel() function with more than expected no. of arguments --

Warning: gethostbynamel() expects exactly 1 parameter, 2 given in %s on line %d
NULL

-- Testing gethostbynamel() with an unknown host --
bool(false)
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/gethostbyaddr_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/network/gethostbyaddr_error.phpt
+++ php-src/ext/standard/tests/network/gethostbyaddr_error.phpt
--TEST--
Test gethostbyaddr() function : error conditions 
--FILE--
?php
/* Prototype  : proto string gethostbyaddr(string ip_address)
 * Description: Get the Internet host name corresponding to a given IP address 
 * Source code: ext/standard/dns.c
 * Alias to functions: 
 */


echo Testing gethostbyaddr : error conditions\n;

// Zero arguments
echo \n-- Testing gethostbyaddr function with Zero arguments --\n;
var_dump( gethostbyaddr() );

//Test gethostbyaddr with one more than the expected number of arguments
echo \n-- Testing gethostbyaddr function with more than expected no. of 
arguments --\n;
$ip_address = 'string_val';
$extra_arg = 10;
var_dump( gethostbyaddr($ip_address, $extra_arg) );

echo \n-- Testing gethostbyaddr function with invalid addresses --\n;

$ip_address = 'invalid';
var_dump( gethostbyaddr($ip_address) );

$ip_address = '300.1.2.3';
var_dump( gethostbyaddr($ip_address) );

$ip_address = '256.1.2.3';
var_dump( gethostbyaddr($ip_address) );

echo Done;
?
--EXPECTREGEX--
Testing gethostbyaddr : error conditions

-- Testing gethostbyaddr function with Zero arguments --

Warning: gethostbyaddr\(\) expects exactly 1 parameter, 0 given in .* on line 
\d+
NULL

-- Testing gethostbyaddr function with more than expected no. of arguments --

Warning: gethostbyaddr\(\) expects exactly 1 parameter, 2 given in .* on line 
\d+
NULL

-- Testing gethostbyaddr function with invalid addresses --

Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or 
IPv6 address) in .* on line \d+
bool\(false\)

Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or 
IPv6 address) in .* on line \d+
bool\(false\)

Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or 
IPv6 address) in .* on line \d+
bool\(false\)
Done



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/network gethostbyaddr_error.phpt gethostbynamel_error.phpt

2008-03-26 Thread Steve Seear
stevseeaWed Mar 26 18:19:31 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/network gethostbynamel_error.phpt 
gethostbyaddr_error.phpt 
  Log:
  Adding tests for gethostbyaddr() and gethostbynamel()
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/gethostbynamel_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/network/gethostbynamel_error.phpt
+++ php-src/ext/standard/tests/network/gethostbynamel_error.phpt
--TEST--
Test gethostbynamel() function : error conditions 
--FILE--
?php
/* Prototype  : proto array gethostbynamel(string hostname)
 * Description: Return a list of IP addresses that a given hostname resolves 
to. 
 * Source code: ext/standard/dns.c
 * Alias to functions: 
 */

echo *** Testing gethostbynamel() : error conditions ***\n;

// Zero arguments
echo \n-- Testing gethostbynamel() function with Zero arguments --\n;
var_dump( gethostbynamel() );

//Test gethostbynamel with one more than the expected number of arguments
echo \n-- Testing gethostbynamel() function with more than expected no. of 
arguments --\n;
$hostname = 'string_val';
$extra_arg = 10;
var_dump( gethostbynamel($hostname, $extra_arg) );

echo \n-- Testing gethostbynamel() with an unknown host --\n;
$hostname = 'unknownhost_zzz_xxx_yyy';
var_dump( gethostbynamel($hostname) );

echo Done;
?
--EXPECTF--
*** Testing gethostbynamel() : error conditions ***

-- Testing gethostbynamel() function with Zero arguments --

Warning: gethostbynamel() expects exactly 1 parameter, 0 given in %s on line %d
NULL

-- Testing gethostbynamel() function with more than expected no. of arguments --

Warning: gethostbynamel() expects exactly 1 parameter, 2 given in %s on line %d
NULL

-- Testing gethostbynamel() with an unknown host --
bool(false)
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/gethostbyaddr_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/network/gethostbyaddr_error.phpt
+++ php-src/ext/standard/tests/network/gethostbyaddr_error.phpt
--TEST--
Test gethostbyaddr() function : error conditions 
--FILE--
?php
/* Prototype  : proto string gethostbyaddr(string ip_address)
 * Description: Get the Internet host name corresponding to a given IP address 
 * Source code: ext/standard/dns.c
 * Alias to functions: 
 */


echo Testing gethostbyaddr : error conditions\n;

// Zero arguments
echo \n-- Testing gethostbyaddr function with Zero arguments --\n;
var_dump( gethostbyaddr() );

//Test gethostbyaddr with one more than the expected number of arguments
echo \n-- Testing gethostbyaddr function with more than expected no. of 
arguments --\n;
$ip_address = 'string_val';
$extra_arg = 10;
var_dump( gethostbyaddr($ip_address, $extra_arg) );

echo \n-- Testing gethostbyaddr function with invalid addresses --\n;

$ip_address = 'invalid';
var_dump( gethostbyaddr($ip_address) );

$ip_address = '300.1.2.3';
var_dump( gethostbyaddr($ip_address) );

$ip_address = '256.1.2.3';
var_dump( gethostbyaddr($ip_address) );

echo Done;
?
--EXPECTREGEX--
Testing gethostbyaddr : error conditions

-- Testing gethostbyaddr function with Zero arguments --

Warning: gethostbyaddr\(\) expects exactly 1 parameter, 0 given in .* on line 
\d+
NULL

-- Testing gethostbyaddr function with more than expected no. of arguments --

Warning: gethostbyaddr\(\) expects exactly 1 parameter, 2 given in .* on line 
\d+
NULL

-- Testing gethostbyaddr function with invalid addresses --

Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or 
IPv6 address) in .* on line \d+
bool\(false\)

Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or 
IPv6 address) in .* on line \d+
bool\(false\)

Warning: gethostbyaddr\(\): Address is not (in a.b.c.d form|a valid IPv4 or 
IPv6 address) in .* on line \d+
bool\(false\)
Done



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard file.c

2008-03-26 Thread Ilia Alshanetsky
iliaa   Wed Mar 26 23:06:48 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   file.c 
  Log:
  Fixed bug #44501 (LOCK_EX mode in file_put_contents() is impropertly 
  handled in combination with url wrappers)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.28.2.9r2=1.409.2.6.2.28.2.10diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.9 
php-src/ext/standard/file.c:1.409.2.6.2.28.2.10
--- php-src/ext/standard/file.c:1.409.2.6.2.28.2.9  Sun Feb 24 11:45:55 2008
+++ php-src/ext/standard/file.c Wed Mar 26 23:06:47 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.409.2.6.2.28.2.9 2008/02/24 11:45:55 felipe Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.28.2.10 2008/03/26 23:06:47 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -596,6 +596,13 @@
if (flags  PHP_FILE_APPEND) {
mode[0] = 'a';
} else if (flags  LOCK_EX) {
+   /* check to make sure we are dealing with a regular file */
+   if (php_memnstr(filename, ://, sizeof(://) - 1, filename + 
filename_len)) {
+   if (strncasecmp(filename, file://, sizeof(file://) 
- 1)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Exclusive locks may only be set for regular files);
+   RETURN_FALSE;
+   }
+   }
mode[0] = 'c';
}
mode[2] = '\0';



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



[PHP-CVS] cvs: php-src / NEWS

2008-03-26 Thread Felipe Pena
felipe  Thu Mar 27 00:11:22 2008 UTC

  Modified files:  
/php-srcNEWS 
  Log:
  This was done in 5.1
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2158r2=1.2159diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2158 php-src/NEWS:1.2159
--- php-src/NEWS:1.2158 Wed Feb  6 10:57:34 2008
+++ php-src/NEWSThu Mar 27 00:11:22 2008
@@ -5,8 +5,6 @@
 
 - Changed dl() to be disabled by default. Enabled only when explicitly
   registered by the SAPI layer. Enabled only with CLI, CGI and EMBED. (Dmitry)
-- Changed instanceof and catch operators, is_a() and is_subclass_of()
-  functions to not call __autoload(). (Dmitry)
 - Changed opendir/dir/scandir to use default context
   when no context argument is passed. (Sara)
 - Changed open_basedir to allow tightening in runtime contexts. (Sara)



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