[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar phar.c phar.phar phar_internal.h util.c

2008-06-13 Thread Greg Beaver
cellog  Fri Jun 13 06:34:41 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   phar.c phar.phar phar_internal.h util.c 
  Log:
  partial refactor - move signature verification into its own function, in 
preparation for tar/zip signature support.
  next is signature creation
  http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.12r2=1.370.2.13diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.12 php-src/ext/phar/phar.c:1.370.2.13
--- php-src/ext/phar/phar.c:1.370.2.12  Thu Jun 12 18:56:23 2008
+++ php-src/ext/phar/phar.c Fri Jun 13 06:34:41 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar.c,v 1.370.2.12 2008/06/12 18:56:23 cellog Exp $ */
+/* $Id: phar.c,v 1.370.2.13 2008/06/13 06:34:41 cellog Exp $ */
 
 #define PHAR_MAIN 1
 #include phar_internal.h
@@ -726,8 +726,6 @@
/* The lowest nibble contains the phar wide flags. The compression 
flags can */
/* be ignored on reading because it is being generated anyways. */
if (manifest_flags  PHAR_HDR_SIGNATURE) {
-   unsigned char buf[1024];
-   int read_size, len;
char sig_buf[8], *sig_ptr = sig_buf;
off_t read_len;
size_t end_of_phar;
@@ -746,27 +744,10 @@
PHAR_GET_32(sig_ptr, sig_flags);
switch(sig_flags) {
case PHAR_SIG_OPENSSL: {
-#ifdef PHAR_HAVE_OPENSSL
-   BIO *in;
-   EVP_PKEY *key;
-   EVP_MD *mdtype = (EVP_MD *) EVP_sha1();
-   EVP_MD_CTX md_ctx;
-#else
-   int tempsig;
-#endif
-   php_uint32 signature_len, pubkey_len;
-   char *sig, *pubkey = NULL, *pfile;
+   php_uint32 signature_len;
+   char *sig;
off_t whence;
-   php_stream *pfp;
 
-   if (!zend_hash_exists(module_registry, openssl, 
sizeof(openssl))) {
-   efree(savebuf);
-   php_stream_close(fp);
-   if (error) {
-   spprintf(error, 0, phar \%s\ openssl 
signature cannot be verified, openssl not loaded, fname);
-   }
-   return FAILURE;
-   }
/* we store the signature followed by the signature 
length */
if (-1 == php_stream_seek(fp, -12, SEEK_CUR)
|| 4 != php_stream_read(fp, sig_buf, 4)) {
@@ -781,7 +762,7 @@
sig_ptr = sig_buf;
PHAR_GET_32(sig_ptr, signature_len);
 
-   sig = (char *)emalloc(signature_len);
+   sig = (char *) emalloc(signature_len);
 
whence = signature_len + 4;
whence = -whence;
@@ -796,125 +777,54 @@
}
return FAILURE;
}
-
-   /* use __FILE__ . '.pubkey' for public key file */
-   spprintf(pfile, 0, %s.pubkey, fname);
-   pfp = php_stream_open_wrapper(pfile, rb, 0, NULL);
-   efree(pfile);
-   if (!pfp || !(pubkey_len = php_stream_copy_to_mem(pfp, 
pubkey, PHP_STREAM_COPY_ALL, 0)) || !pubkey) {
-   efree(savebuf);
-   efree(sig);
-   if (pubkey) {
-   efree(pubkey);
-   }
-   php_stream_close(fp);
-   if (error) {
-   spprintf(error, 0, phar \%s\ openssl 
public key could not be read, fname);
-   }
-   return FAILURE;
-   }
-   php_stream_close(pfp);
-#ifndef PHAR_HAVE_OPENSSL
-   tempsig = signature_len;
-   if (FAILURE == phar_call_openssl_signverify(0, fp, 
end_of_phar, pubkey, pubkey_len, sig, tempsig TSRMLS_CC)) {
-   efree(savebuf);
-   efree(sig);
-   if (pubkey) {
-   efree(pubkey);
-   }
-   php_stream_close(fp);
-   if (error) {
-   spprintf(error, 0, phar \%s\ openssl 
signature could not be verified, fname);
-   }
-   return FAILURE;
-   }
-   if 

Re: [PHP-CVS] cvs: php-src / run-tests.php

2008-06-13 Thread Marcus Boerger
Hello Steph,

Thursday, June 12, 2008, 11:38:50 AM, you wrote:

 sfoxThu Jun 12 09:38:50 2008 UTC

   Modified files:  
 /php-srcrun-tests.php 
   Log:
   - Some calls to file_put_contents() need FILE_BINARY, others choke on it. 
 You tell me.
   
 http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.353r2=1.354diff_format=u
 Index: php-src/run-tests.php
 diff -u php-src/run-tests.php:1.353 php-src/run-tests.php:1.354
 --- php-src/run-tests.php:1.353   Wed Jun 11 17:41:13 2008
 +++ php-src/run-tests.php   Thu Jun 12 09:38:50 2008
 @@ -1,5 +1,6 @@
  #!/usr/bin/php
  ?php
 +putenv('TEST_PHP_EXECUTABLE=C:/sandbox/php6/Debug_TS/php.exe');

but either way, we all don't need this here :-)


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) /ext/phar phar.c util.c

2008-06-13 Thread Felipe Pena
felipe  Fri Jun 13 13:06:46 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   phar.c util.c 
  Log:
  - Fix build (ZTS)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.13r2=1.370.2.14diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.13 php-src/ext/phar/phar.c:1.370.2.14
--- php-src/ext/phar/phar.c:1.370.2.13  Fri Jun 13 06:34:41 2008
+++ php-src/ext/phar/phar.c Fri Jun 13 13:06:46 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar.c,v 1.370.2.13 2008/06/13 06:34:41 cellog Exp $ */
+/* $Id: phar.c,v 1.370.2.14 2008/06/13 13:06:46 felipe Exp $ */
 
 #define PHAR_MAIN 1
 #include phar_internal.h
@@ -610,6 +610,8 @@
 {
int pos = -1;
size_t len = 0;
+   
+   TSRMLS_FETCH();
 
*signature = (char*)safe_pemalloc(digest_len, 2, 1, PHAR_G(persist));
 
@@ -3533,7 +3535,7 @@
php_info_print_table_header(2, Phar: PHP Archive support, enabled);
php_info_print_table_row(2, Phar EXT version, PHP_PHAR_VERSION);
php_info_print_table_row(2, Phar API version, PHP_PHAR_API_VERSION);
-   php_info_print_table_row(2, CVS revision, $Revision: 1.370.2.13 $);
+   php_info_print_table_row(2, CVS revision, $Revision: 1.370.2.14 $);
php_info_print_table_row(2, Phar-based phar archives, enabled);
php_info_print_table_row(2, Tar-based phar archives, enabled);
php_info_print_table_row(2, ZIP-based phar archives, enabled);
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/util.c?r1=1.55.2.5r2=1.55.2.6diff_format=u
Index: php-src/ext/phar/util.c
diff -u php-src/ext/phar/util.c:1.55.2.5 php-src/ext/phar/util.c:1.55.2.6
--- php-src/ext/phar/util.c:1.55.2.5Fri Jun 13 06:34:41 2008
+++ php-src/ext/phar/util.c Fri Jun 13 13:06:46 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: util.c,v 1.55.2.5 2008/06/13 06:34:41 cellog Exp $ */
+/* $Id: util.c,v 1.55.2.6 2008/06/13 13:06:46 felipe Exp $ */
 
 #include phar_internal.h
 #ifdef PHAR_HAVE_OPENSSL
@@ -1344,6 +1344,8 @@
 {
int pos = -1;
size_t len = 0;
+   
+   TSRMLS_FETCH();
 
*signature = (char*)safe_pemalloc(digest_len, 2, 1, PHAR_G(persist));
 



-- 
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/image 200x100_unknown.unknown blank_file.bmp getimagesize_variation_003.phpt test.txt

2008-06-13 Thread Zoe Slattery
zoe Fri Jun 13 13:11:37 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/image   200x100_unknown.unknown 
getimagesize_variation_003.phpt 
blank_file.bmp test.txt 
  Log:
  Commited for Sanjay, reviewed by Pierre. Testfest task 118.
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100_unknown.unknown?view=markuprev=1.1
Index: php-src/ext/standard/tests/image/200x100_unknown.unknown
+++ php-src/ext/standard/tests/image/200x100_unknown.unknown

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation_003.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/image/getimagesize_variation_003.phpt
+++ php-src/ext/standard/tests/image/getimagesize_variation_003.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/blank_file.bmp?view=markuprev=1.1
Index: php-src/ext/standard/tests/image/blank_file.bmp
+++ php-src/ext/standard/tests/image/blank_file.bmp

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/test.txt?view=markuprev=1.1
Index: php-src/ext/standard/tests/image/test.txt
+++ php-src/ext/standard/tests/image/test.txt



-- 
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/image 200x100_unknown.unknown blank_file.bmp getimagesize_variation_003.phpt test.txt

2008-06-13 Thread Zoe Slattery
zoe Fri Jun 13 13:14:20 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/image   test.txt 
getimagesize_variation_003.phpt 
200x100_unknown.unknown 
blank_file.bmp 
  Log:
  Commited for Sanjay, reviewed by Pierre. Testfest task 118.
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/test.txt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/image/test.txt
diff -u /dev/null php-src/ext/standard/tests/image/test.txt:1.2
--- /dev/null   Fri Jun 13 13:14:20 2008
+++ php-src/ext/standard/tests/image/test.txt   Fri Jun 13 13:14:20 2008
@@ -0,0 +1 @@
+Testing getimagesize
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation_003.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/image/getimagesize_variation_003.phpt
diff -u /dev/null 
php-src/ext/standard/tests/image/getimagesize_variation_003.phpt:1.2
--- /dev/null   Fri Jun 13 13:14:20 2008
+++ php-src/ext/standard/tests/image/getimagesize_variation_003.phptFri Jun 
13 13:14:20 2008
@@ -0,0 +1,70 @@
+--TEST--
+Test getimagesize() function : variation - Passing non image files
+--FILE--
+?php
+/* Prototype  : array getimagesize(string imagefile [, array info])
+ * Description: Get the size of an image as 4-element array 
+ * Source code: ext/standard/image.c
+ */
+
+
+$file_types_array = array (
+//File containing text string
+   File with text data = test.txt,
+
+   //File containing forcibly corrupted bmp image
+   File with corrupted BMP data = 200x100_unknown.unknown,
+
+//File which doesn't exist
+ Non-existent file = nofile.ext,
+
+//File having no data
+Empty File = blank_file.bmp
+);
+
+echo *** Testing getimagesize() : variation ***\n;
+
+//loop through each element of the array for filename
+foreach($file_types_array as $key = $filename) {
+  echo \n-- $key ($filename) --\n;
+  var_dump( getimagesize(dirname(__FILE__)./$filename ) );
+  var_dump( getimagesize(dirname(__FILE__)./$filename, $info) );
+  var_dump( $info );
+};
+?
+===DONE===
+--EXPECTF--
+*** Testing getimagesize() : variation ***
+
+-- File with text data (test.txt) --
+bool(false)
+bool(false)
+array(0) {
+}
+
+-- File with corrupted BMP data (200x100_unknown.unknown) --
+bool(false)
+bool(false)
+array(0) {
+}
+
+-- Non-existent file (nofile.ext) --
+
+Warning: getimagesize(%s): failed to open stream: No such file or directory in 
%s on line %d
+bool(false)
+
+Warning: getimagesize(%s): failed to open stream: No such file or directory in 
%s on line %d
+bool(false)
+array(0) {
+}
+
+-- Empty File (blank_file.bmp) --
+
+Notice: getimagesize(): Read error! in %s on line %d
+bool(false)
+
+Notice: getimagesize(): Read error! in %s on line %d
+bool(false)
+array(0) {
+}
+===DONE===
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100_unknown.unknown?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/image/200x100_unknown.unknown
diff -u /dev/null php-src/ext/standard/tests/image/200x100_unknown.unknown:1.2
--- /dev/null   Fri Jun 13 13:14:20 2008
+++ php-src/ext/standard/tests/image/200x100_unknown.unknownFri Jun 13 
13:14:20 2008
@@ -0,0 +1 @@
+!
 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/image 200x100.GIF 200x100.JPG 200x100.PNG 200x100.TIF 200x100.bmp 200x100.swf getimagesize_basic.phpt

2008-06-13 Thread Zoe Slattery
zoe Fri Jun 13 13:31:18 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/image   200x100.JPG 200x100.bmp 
200x100.TIF 200x100.PNG 
getimagesize_basic.phpt 
200x100.swf 200x100.GIF 
  Log:
  Commited for Sanjay, reviewed by Pierre. Testfest task 117.
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.bmp?view=markuprev=1.1
Index: php-src/ext/standard/tests/image/200x100.bmp
+++ php-src/ext/standard/tests/image/200x100.bmp

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.TIF?view=markuprev=1.1
Index: php-src/ext/standard/tests/image/200x100.TIF
+++ php-src/ext/standard/tests/image/200x100.TIF

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/image/getimagesize_basic.phpt
+++ php-src/ext/standard/tests/image/getimagesize_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.swf?view=markuprev=1.1
Index: php-src/ext/standard/tests/image/200x100.swf
+++ php-src/ext/standard/tests/image/200x100.swf



-- 
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/image 200x100.GIF 200x100.JPG 200x100.PNG 200x100.TIF 200x100.bmp 200x100.swf getimagesize_basic.phpt

2008-06-13 Thread Zoe Slattery
zoe Fri Jun 13 13:33:15 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/image   200x100.swf 200x100.bmp 
200x100.JPG 
getimagesize_basic.phpt 
200x100.TIF 200x100.GIF 
200x100.PNG 
  Log:
  Commited for Sanjay, reviewed by Pierre. Testfest task 117.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.swf?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/image/200x100.swf
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.bmp?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/image/200x100.bmp
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.JPG?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/image/200x100.JPG
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_basic.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/image/getimagesize_basic.phpt
diff -u /dev/null php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.2
--- /dev/null   Fri Jun 13 13:33:15 2008
+++ php-src/ext/standard/tests/image/getimagesize_basic.phptFri Jun 13 
13:33:15 2008
@@ -0,0 +1,220 @@
+--TEST--
+Test getimagesize() function : basic functionality
+--FILE--
+?php
+/* Prototype  : array getimagesize(string imagefile [, array info])
+ * Description: Get the size of an image as 4-element array 
+ * Source code: ext/standard/image.c
+ */
+
+$imagetype_filenames = array(
+  // GIF file
+  GIF image file = 200x100.GIF,
+
+  //JPEG file
+  JPEG image file = 200x100.JPG,
+
+  //PNG file
+  PNG image file = 200x100.PNG,
+
+  //SWF file
+  SWF image file = 200x100.swf,
+  
+  //BMP file
+  BMP image file = 200x100.bmp,
+  
+  //TIFF intel byte order
+  TIFF intel byte order image file = 200x100.TIF,
+
+  //JPC file
+  JPC image file = test1pix.jpc,
+
+  //JP2 file
+  JP2 image file = test1pix.jp2,
+
+  //IFF file
+  IFF image file = test4pix.iff
+);
+
+
+echo *** Testing getimagesize() : basic functionality ***\n;
+
+// loop through each element of the array for imagetype
+foreach($imagetype_filenames as $key = $filename) {
+  echo \n-- $key ($filename) --\n;
+  var_dump( getimagesize(dirname(__FILE__)./$filename, $info) );
+  var_dump( $info );
+};
+?
+===DONE===
+--EXPECTF--
+*** Testing getimagesize() : basic functionality ***
+
+-- GIF image file (200x100.GIF) --
+array(7) {
+  [0]=
+  int(200)
+  [1]=
+  int(100)
+  [2]=
+  int(1)
+  [3]=
+  unicode(24) width=200 height=100
+  [ubits]=
+  int(8)
+  [uchannels]=
+  int(3)
+  [umime]=
+  unicode(9) image/gif
+}
+array(0) {
+}
+
+-- JPEG image file (200x100.JPG) --
+array(7) {
+  [0]=
+  int(200)
+  [1]=
+  int(100)
+  [2]=
+  int(2)
+  [3]=
+  unicode(24) width=200 height=100
+  [ubits]=
+  int(8)
+  [uchannels]=
+  int(3)
+  [umime]=
+  unicode(10) image/jpeg
+}
+array(1) {
+  [uAPP0]=
+  unicode(14)%sJFIF%s
+}
+
+-- PNG image file (200x100.PNG) --
+array(6) {
+  [0]=
+  int(200)
+  [1]=
+  int(100)
+  [2]=
+  int(3)
+  [3]=
+  unicode(24) width=200 height=100
+  [ubits]=
+  int(8)
+  [umime]=
+  unicode(9) image/png
+}
+array(0) {
+}
+
+-- SWF image file (200x100.swf) --
+array(5) {
+  [0]=
+  int(200)
+  [1]=
+  int(100)
+  [2]=
+  int(4)
+  [3]=
+  unicode(24) width=200 height=100
+  [umime]=
+  unicode(29) application/x-shockwave-flash
+}
+array(0) {
+}
+
+-- BMP image file (200x100.bmp) --
+array(6) {
+  [0]=
+  int(200)
+  [1]=
+  int(100)
+  [2]=
+  int(6)
+  [3]=
+  unicode(24) width=200 height=100
+  [ubits]=
+  int(24)
+  [umime]=
+  unicode(9) image/bmp
+}
+array(0) {
+}
+
+-- TIFF intel byte order image file (200x100.TIF) --
+array(5) {
+  [0]=
+  int(200)
+  [1]=
+  int(100)
+  [2]=
+  int(7)
+  [3]=
+  unicode(24) width=200 height=100
+  [umime]=
+  unicode(10) image/tiff
+}
+array(0) {
+}
+
+-- JPC image file (test1pix.jpc) --
+array(7) {
+  [0]=
+  int(1)
+  [1]=
+  int(1)
+  [2]=
+  int(9)
+  [3]=
+  unicode(20) width=1 height=1
+  [ubits]=
+  int(8)
+  [uchannels]=
+  int(3)
+  [umime]=
+  unicode(24) application/octet-stream
+}
+array(0) {
+}
+
+-- JP2 image file (test1pix.jp2) --
+array(7) {
+  [0]=
+  int(1)
+  [1]=
+  int(1)
+  [2]=
+  int(10)
+  [3]=
+  unicode(20) width=1 height=1
+  [ubits]=
+  int(8)
+  [uchannels]=
+  int(3)
+  [umime]=
+  unicode(9) image/jp2
+}
+array(0) {
+}
+
+-- IFF image file (test4pix.iff) --
+array(6) {
+  [0]=
+  int(4)
+  [1]=
+  int(1)
+  [2]=
+  int(14)
+  [3]=
+  unicode(20) width=4 height=1
+  [ubits]=
+  int(4)
+  [umime]=
+  unicode(9) image/iff
+}
+array(0) {
+}
+===DONE===
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.TIF?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/image/200x100.TIF

[PHP-CVS] cvs: php-src /ext/standard/tests/file is_dir_variation2.phpt is_readable_variation1.phpt /ext/standard/tests/general_functions var_export-locale.phpt

2008-06-13 Thread Felipe Pena
felipe  Fri Jun 13 13:43:55 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/fileis_dir_variation2.phpt 
is_readable_variation1.phpt 
/php-src/ext/standard/tests/general_functions   
var_export-locale.phpt 
  Log:
  - Fixed tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_dir_variation2.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/is_dir_variation2.phpt
diff -u php-src/ext/standard/tests/file/is_dir_variation2.phpt:1.3 
php-src/ext/standard/tests/file/is_dir_variation2.phpt:1.4
--- php-src/ext/standard/tests/file/is_dir_variation2.phpt:1.3  Tue May 27 
09:34:54 2008
+++ php-src/ext/standard/tests/file/is_dir_variation2.phpt  Fri Jun 13 
13:43:55 2008
@@ -63,7 +63,7 @@
 unlink($file_path./is_dir_variation2.tmp);
 rmdir($file_path./is_dir_variation2);
 ?
---EXPECT--
+--EXPECTF--
 *** Testing is_dir() with dir and links to dir ***
 -- With dir --
 bool(true)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_readable_variation1.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/is_readable_variation1.phpt
diff -u php-src/ext/standard/tests/file/is_readable_variation1.phpt:1.3 
php-src/ext/standard/tests/file/is_readable_variation1.phpt:1.4
--- php-src/ext/standard/tests/file/is_readable_variation1.phpt:1.3 Tue May 
27 09:34:54 2008
+++ php-src/ext/standard/tests/file/is_readable_variation1.phpt Fri Jun 13 
13:43:55 2008
@@ -64,7 +64,7 @@
 unlink(dirname(__FILE__)./is_readable_variation1/bar.tmp);
 rmdir(dirname(__FILE__)./is_readable_variation1/);
 ?
---EXPECT--
+--EXPECTF--
 *** Testing is_readable(): usage variations ***
 -- Iteration 1 --
 bool(true)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export-locale.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/general_functions/var_export-locale.phpt
diff -u php-src/ext/standard/tests/general_functions/var_export-locale.phpt:1.2 
php-src/ext/standard/tests/general_functions/var_export-locale.phpt:1.3
--- php-src/ext/standard/tests/general_functions/var_export-locale.phpt:1.2 
Sun Dec  9 16:54:30 2007
+++ php-src/ext/standard/tests/general_functions/var_export-locale.phpt Fri Jun 
13 13:43:55 2008
@@ -312,6 +312,7 @@
 
 ?
 --EXPECTF--
+Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale 
functions in %s on line %d
 *** Testing var_export() with integer values ***
 
 *** Output for integer values ***



-- 
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/gd/tests image_type_to_mime_type_variation1.phpt

2008-06-13 Thread Zoe Slattery
zoe Fri Jun 13 13:49:40 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/gd/tests   image_type_to_mime_type_variation1.phpt 
  Log:
  Commited for Sanjay, reviewed by Pierre. Testfest task 79.
  

http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/image_type_to_mime_type_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/gd/tests/image_type_to_mime_type_variation1.phpt
+++ php-src/ext/gd/tests/image_type_to_mime_type_variation1.phpt



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



[PHP-CVS] cvs: php-src /ext/gd/tests image_type_to_mime_type_variation1.phpt

2008-06-13 Thread Zoe Slattery
zoe Fri Jun 13 13:51:23 2008 UTC

  Modified files:  
/php-src/ext/gd/tests   image_type_to_mime_type_variation1.phpt 
  Log:
  Commited for Sanjay, reviewed by Pierre. Testfest task 79.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/image_type_to_mime_type_variation1.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/gd/tests/image_type_to_mime_type_variation1.phpt
diff -u /dev/null 
php-src/ext/gd/tests/image_type_to_mime_type_variation1.phpt:1.2
--- /dev/null   Fri Jun 13 13:51:22 2008
+++ php-src/ext/gd/tests/image_type_to_mime_type_variation1.phptFri Jun 
13 13:51:22 2008
@@ -0,0 +1,150 @@
+--TEST--
+Test image_type_to_mime_type() function : usage variations  - Pass different 
data types as imagetype
+--FILE--
+?php
+/* Prototype  : string image_type_to_mime_type(int imagetype)
+ * Description: Get Mime-Type for image-type returned by getimagesize, 
exif_read_data, exif_thumbnail, exif_imagetype 
+ * Source code: ext/standard/image.c
+ */
+
+echo *** Testing image_type_to_mime_type() : usage variations ***\n;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+class MyClass
+{
+  function __toString() {
+return MyClass;
+  }
+}
+
+//array of values to iterate over
+$values = array(
+
+  // float data
+  100.5,
+  -100.5,
+  100.1234567e10,
+  100.7654321E-10,
+  .5,
+
+  // array data
+  array(),
+  array('color' = 'red', 'item' = 'pen'),
+
+  // null data
+  NULL,
+  null,
+
+  // boolean data
+  true,
+  false,
+  TRUE,
+  FALSE,
+
+  // empty data
+  ,
+  '',
+
+  // string data
+  string,
+  'string',
+
+  // object data
+  new MyClass(),
+
+  // undefined data
+  @$undefined_var,
+
+  // unset data
+  @$unset_var,
+);
+
+// loop through each element of the array for imagetype
+$iterator = 1;
+foreach($values as $value) {
+  echo \n-- Iteration $iterator --\n;
+  var_dump( image_type_to_mime_type($value) );
+  $iterator++;
+};
+?
+===DONE===
+--EXPECTF--
+*** Testing image_type_to_mime_type() : usage variations ***
+
+-- Iteration 1 --
+unicode(24) application/octet-stream
+
+-- Iteration 2 --
+unicode(24) application/octet-stream
+
+-- Iteration 3 --
+unicode(24) application/octet-stream
+
+-- Iteration 4 --
+unicode(24) application/octet-stream
+
+-- Iteration 5 --
+unicode(24) application/octet-stream
+
+-- Iteration 6 --
+
+Warning: image_type_to_mime_type() expects parameter 1 to be long, array given 
in %s on line %d
+NULL
+
+-- Iteration 7 --
+
+Warning: image_type_to_mime_type() expects parameter 1 to be long, array given 
in %s on line %d
+NULL
+
+-- Iteration 8 --
+unicode(24) application/octet-stream
+
+-- Iteration 9 --
+unicode(24) application/octet-stream
+
+-- Iteration 10 --
+unicode(9) image/gif
+
+-- Iteration 11 --
+unicode(24) application/octet-stream
+
+-- Iteration 12 --
+unicode(9) image/gif
+
+-- Iteration 13 --
+unicode(24) application/octet-stream
+
+-- Iteration 14 --
+
+Warning: image_type_to_mime_type() expects parameter 1 to be long, Unicode 
string given in %s on line %d
+NULL
+
+-- Iteration 15 --
+
+Warning: image_type_to_mime_type() expects parameter 1 to be long, Unicode 
string given in %s on line %d
+NULL
+
+-- Iteration 16 --
+
+Warning: image_type_to_mime_type() expects parameter 1 to be long, Unicode 
string given in %s on line %d
+NULL
+
+-- Iteration 17 --
+
+Warning: image_type_to_mime_type() expects parameter 1 to be long, Unicode 
string given in %s on line %d
+NULL
+
+-- Iteration 18 --
+
+Warning: image_type_to_mime_type() expects parameter 1 to be long, object 
given in %s on line %d
+NULL
+
+-- Iteration 19 --
+unicode(24) application/octet-stream
+
+-- Iteration 20 --
+unicode(24) application/octet-stream
+===DONE===



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



[PHP-CVS] cvs: php-src /ext/mbstring mbstring.c

2008-06-13 Thread Rui Hirokawa
hirokawaFri Jun 13 14:47:48 2008 UTC

  Modified files:  
/php-src/ext/mbstring   mbstring.c 
  Log:
  fixed bug #27421 (by david at dfoerster dot de) mbstring.func_overload set in 
.htaccess becomes global
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.276r2=1.277diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.276 
php-src/ext/mbstring/mbstring.c:1.277
--- php-src/ext/mbstring/mbstring.c:1.276   Sat Feb 16 08:49:07 2008
+++ php-src/ext/mbstring/mbstring.c Fri Jun 13 14:47:48 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.276 2008/02/16 08:49:07 hirokawa Exp $ */
+/* $Id: mbstring.c,v 1.277 2008/06/13 14:47:48 hirokawa Exp $ */
 
 /*
  * PHP 4 Multibyte String module mbstring
@@ -1029,9 +1029,14 @@
/*  clear overloaded function. */
if (MBSTRG(func_overload)){
p = (mb_ovld[0]);
-   while (p-type  0  zend_hash_find(EG(function_table), 
p-save_func, strlen(p-save_func)+1 , (void **)orig) == SUCCESS) {
-   zend_hash_update(EG(function_table), p-orig_func, 
strlen(p-orig_func)+1, orig, sizeof(zend_function), NULL);
-   zend_hash_del(EG(function_table), p-save_func, 
strlen(p-save_func)+1);
+   while (p-type  0) {
+   if ((MBSTRG(func_overload)  p-type) == p-type  
+   zend_hash_find(EG(function_table), p-save_func,
+  
strlen(p-save_func)+1, (void **)orig) == SUCCESS) {
+   
+   zend_hash_update(EG(function_table), 
p-orig_func, strlen(p-orig_func)+1, orig, sizeof(zend_function), NULL);
+   zend_hash_del(EG(function_table), p-save_func, 
strlen(p-save_func)+1);
+   }
p++;
}
}



-- 
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/mbstring mbstring.c

2008-06-13 Thread Rui Hirokawa
hirokawaFri Jun 13 14:48:33 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mbstring   mbstring.c 
  Log:
  MFH
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.25.2.7r2=1.224.2.22.2.25.2.8diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.7 
php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.8
--- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.7 Sat Feb 16 10:43:57 2008
+++ php-src/ext/mbstring/mbstring.c Fri Jun 13 14:48:33 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.224.2.22.2.25.2.7 2008/02/16 10:43:57 hirokawa Exp $ */
+/* $Id: mbstring.c,v 1.224.2.22.2.25.2.8 2008/06/13 14:48:33 hirokawa Exp $ */
 
 /*
  * PHP 4 Multibyte String module mbstring
@@ -1025,9 +1025,14 @@
/*  clear overloaded function. */
if (MBSTRG(func_overload)){
p = (mb_ovld[0]);
-   while (p-type  0  zend_hash_find(EG(function_table), 
p-save_func, strlen(p-save_func)+1 , (void **)orig) == SUCCESS) {
-   zend_hash_update(EG(function_table), p-orig_func, 
strlen(p-orig_func)+1, orig, sizeof(zend_function), NULL);
-   zend_hash_del(EG(function_table), p-save_func, 
strlen(p-save_func)+1);
+   while (p-type  0) {
+   if ((MBSTRG(func_overload)  p-type) == p-type  
+   zend_hash_find(EG(function_table), p-save_func,
+  
strlen(p-save_func)+1, (void **)orig) == SUCCESS) {
+   
+   zend_hash_update(EG(function_table), 
p-orig_func, strlen(p-orig_func)+1, orig, sizeof(zend_function), NULL);
+   zend_hash_del(EG(function_table), p-save_func, 
strlen(p-save_func)+1);
+   }
p++;
}
}



-- 
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/mbstring mbstring.c

2008-06-13 Thread Rui Hirokawa
hirokawaFri Jun 13 14:49:20 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/mbstring   mbstring.c 
  Log:
  MFH
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.30r2=1.224.2.22.2.31diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.30 
php-src/ext/mbstring/mbstring.c:1.224.2.22.2.31
--- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.30 Sun Feb 17 02:06:56 2008
+++ php-src/ext/mbstring/mbstring.c Fri Jun 13 14:49:19 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.224.2.22.2.30 2008/02/17 02:06:56 hirokawa Exp $ */
+/* $Id: mbstring.c,v 1.224.2.22.2.31 2008/06/13 14:49:19 hirokawa Exp $ */
 
 /*
  * PHP 4 Multibyte String module mbstring
@@ -1025,9 +1025,14 @@
/*  clear overloaded function. */
if (MBSTRG(func_overload)){
p = (mb_ovld[0]);
-   while (p-type  0  zend_hash_find(EG(function_table), 
p-save_func, strlen(p-save_func)+1 , (void **)orig) == SUCCESS) {
-   zend_hash_update(EG(function_table), p-orig_func, 
strlen(p-orig_func)+1, orig, sizeof(zend_function), NULL);
-   zend_hash_del(EG(function_table), p-save_func, 
strlen(p-save_func)+1);
+   while (p-type  0) {
+   if ((MBSTRG(func_overload)  p-type) == p-type  
+   zend_hash_find(EG(function_table), p-save_func,
+  
strlen(p-save_func)+1, (void **)orig) == SUCCESS) {
+   
+   zend_hash_update(EG(function_table), 
p-orig_func, strlen(p-orig_func)+1, orig, sizeof(zend_function), NULL);
+   zend_hash_del(EG(function_table), p-save_func, 
strlen(p-save_func)+1);
+   }
p++;
}
}



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



[PHP-CVS] cvs: php-src(PHP_4_4) /ext/mbstring mbstring.c

2008-06-13 Thread Rui Hirokawa
hirokawaFri Jun 13 14:50:03 2008 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/mbstring   mbstring.c 
  Log:
  MFH
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.142.2.47.2.23r2=1.142.2.47.2.24diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.142.2.47.2.23 
php-src/ext/mbstring/mbstring.c:1.142.2.47.2.24
--- php-src/ext/mbstring/mbstring.c:1.142.2.47.2.23 Sat Feb 16 12:41:55 2008
+++ php-src/ext/mbstring/mbstring.c Fri Jun 13 14:50:03 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.142.2.47.2.23 2008/02/16 12:41:55 hirokawa Exp $ */
+/* $Id: mbstring.c,v 1.142.2.47.2.24 2008/06/13 14:50:03 hirokawa Exp $ */
 
 /*
  * PHP4 Multibyte String module mbstring
@@ -1099,9 +1099,14 @@
/*  clear overloaded function. */
if (MBSTRG(func_overload)){
p = (mb_ovld[0]);
-   while (p-type  0  zend_hash_find(EG(function_table), 
p-save_func, strlen(p-save_func)+1 , (void **)orig) == SUCCESS) {
-   zend_hash_update(EG(function_table), p-orig_func, 
strlen(p-orig_func)+1, orig, sizeof(zend_function), NULL);
-   zend_hash_del(EG(function_table), p-save_func, 
strlen(p-save_func)+1);
+   while (p-type  0) {
+   if ((MBSTRG(func_overload)  p-type) == p-type  
+   zend_hash_find(EG(function_table), p-save_func,
+  
strlen(p-save_func)+1, (void **)orig) == SUCCESS) {
+   
+   zend_hash_update(EG(function_table), 
p-orig_func, strlen(p-orig_func)+1, orig, sizeof(zend_function), NULL);
+   zend_hash_del(EG(function_table), p-save_func, 
strlen(p-save_func)+1);
+   }
p++;
}
}



-- 
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/image getimagesize_variation_005.phpt

2008-06-13 Thread Zoe Slattery
zoe Fri Jun 13 15:20:04 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/image   getimagesize_variation_005.phpt 
  Log:
  Commited for Sanjay, reviewed by Pierre. Testfest task 117.
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation_005.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/image/getimagesize_variation_005.phpt
+++ php-src/ext/standard/tests/image/getimagesize_variation_005.phpt



-- 
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/image getimagesize_variation_005.phpt

2008-06-13 Thread Zoe Slattery
zoe Fri Jun 13 15:22:42 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/image   getimagesize_variation_005.phpt 
  Log:
  Commited for Sanjay, reviewed by Pierre. Testfest task 117.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation_005.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/image/getimagesize_variation_005.phpt
diff -u /dev/null 
php-src/ext/standard/tests/image/getimagesize_variation_005.phpt:1.2
--- /dev/null   Fri Jun 13 15:22:42 2008
+++ php-src/ext/standard/tests/image/getimagesize_variation_005.phptFri Jun 
13 15:22:42 2008
@@ -0,0 +1,38 @@
+--TEST--
+Test getimagesize() function : basic functionality for shockwave-flash
+--SKIPIF--
+?php
+   if (!defined(IMAGETYPE_SWC) || !extension_loaded('zlib')) {
+   die(skip zlib extension is not available or SWC not 
supported);
+   }
+?
+--FILE--
+?php
+/* Prototype  : array getimagesize(string imagefile [, array info])
+ * Description: Get the size of an image as 4-element array 
+ * Source code: ext/standard/image.c
+ */
+
+echo *** Testing getimagesize() : basic functionality ***\n;
+
+var_dump( getimagesize(dirname(__FILE__)./test13pix.swf, $info) );
+var_dump( $info );
+?
+===DONE===
+--EXPECTF--
+*** Testing getimagesize() : basic functionality ***
+array(5) {
+  [0]=
+  int(550)
+  [1]=
+  int(400)
+  [2]=
+  int(13)
+  [3]=
+  unicode(24) width=550 height=400
+  [umime]=
+  unicode(29) application/x-shockwave-flash
+}
+array(0) {
+}
+===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/gd/tests gd_info_variation1.phpt

2008-06-13 Thread Zoe Slattery
zoe Fri Jun 13 15:57:42 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/gd/tests   gd_info_variation1.phpt 
  Log:
  Commited for Sanjay, reviewed by Pierre. Testfest task 5.
  

http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gd_info_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/gd/tests/gd_info_variation1.phpt
+++ php-src/ext/gd/tests/gd_info_variation1.phpt



-- 
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/phar phar_internal.h

2008-06-13 Thread Greg Beaver
cellog  Fri Jun 13 15:59:13 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   phar_internal.h 
  Log:
  PHP_5_2 compat - add pestrndup if undefined
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_internal.h?r1=1.109.2.8r2=1.109.2.9diff_format=u
Index: php-src/ext/phar/phar_internal.h
diff -u php-src/ext/phar/phar_internal.h:1.109.2.8 
php-src/ext/phar/phar_internal.h:1.109.2.9
--- php-src/ext/phar/phar_internal.h:1.109.2.8  Fri Jun 13 06:34:41 2008
+++ php-src/ext/phar/phar_internal.hFri Jun 13 15:59:13 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar_internal.h,v 1.109.2.8 2008/06/13 06:34:41 cellog Exp $ */
+/* $Id: phar_internal.h,v 1.109.2.9 2008/06/13 15:59:13 cellog Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -75,6 +75,10 @@
 #define E_RECOVERABLE_ERROR E_ERROR
 #endif
 
+#ifndef pestrndup
+#define pestrndup(s, length, persistent) 
((persistent)?zend_strndup((s),(length)):estrndup((s),(length)))
+#endif
+
 /* PHP_ because this is public information via MINFO */
 #define PHP_PHAR_API_VERSION  1.1.1
 /* x.y.z maps to 0xyz0 */



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



[PHP-CVS] cvs: php-src /ext/gd/tests gd_info_variation1.phpt

2008-06-13 Thread Zoe Slattery
zoe Fri Jun 13 15:59:31 2008 UTC

  Modified files:  
/php-src/ext/gd/tests   gd_info_variation1.phpt 
  Log:
  Commited for Sanjay, reviewed by Pierre. Testfest task 5.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gd_info_variation1.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/gd/tests/gd_info_variation1.phpt
diff -u /dev/null php-src/ext/gd/tests/gd_info_variation1.phpt:1.2
--- /dev/null   Fri Jun 13 15:59:31 2008
+++ php-src/ext/gd/tests/gd_info_variation1.phptFri Jun 13 15:59:31 2008
@@ -0,0 +1,49 @@
+--TEST--
+Test gd_info() function : variation - Checking all the values in returned array
+--SKIPIF--
+?php
+if(!extension_loaded('gd')) {
+die('skip gd extension is not loaded');
+}
+if(!function_exists('gd_info')) {
+die('skip gd_info function is not available');
+}
+?
+--FILE--
+?php
+/* Prototype  : array gd_info()
+ * Description: Retrieve information about the currently installed GD library
+ * Source code: ext/gd/gd.c
+ */
+
+echo *** Testing gd_info() : variation ***\n;
+
+var_dump(gd_info());
+?
+===DONE===
+--EXPECTF--
+*** Testing gd_info() : variation ***
+array(%d) {
+  [uGD Version]=
+  unicode(%d) %a
+  [uFreeType Support]=
+  bool%a
+  [uT1Lib Support]=
+  bool%a
+  [uGIF Read Support]=
+  bool%a
+  [uGIF Create Support]=
+  bool%a
+  [uJPG Support]=
+  bool%a
+  [uPNG Support]=
+  bool%a
+  [uWBMP Support]=
+  bool%a
+  [uXPM Support]=
+  bool%a
+  [uXBM Support]=
+  bool%a
+  [uJIS-mapped Japanese Font Support]=
+  bool%a
+===DONE=== 
\ No newline at end of file



-- 
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/phar phar.c phar.phar phar_internal.h phar_object.c util.c

2008-06-13 Thread Greg Beaver
cellog  Fri Jun 13 20:15:19 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   phar.c phar.phar phar_internal.h phar_object.c 
util.c 
  Log:
  full refactor of signatures complete - now to implement them for tar as a 
starting point
  http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.14r2=1.370.2.15diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.14 php-src/ext/phar/phar.c:1.370.2.15
--- php-src/ext/phar/phar.c:1.370.2.14  Fri Jun 13 13:06:46 2008
+++ php-src/ext/phar/phar.c Fri Jun 13 20:15:19 2008
@@ -17,32 +17,13 @@
   +--+
 */
 
-/* $Id: phar.c,v 1.370.2.14 2008/06/13 13:06:46 felipe Exp $ */
+/* $Id: phar.c,v 1.370.2.15 2008/06/13 20:15:19 cellog Exp $ */
 
 #define PHAR_MAIN 1
 #include phar_internal.h
 #include SAPI.h
 #include func_interceptors.h
 
-#ifdef PHAR_HAVE_OPENSSL
-
-/* OpenSSL includes */
-#include openssl/evp.h
-#include openssl/x509.h
-#include openssl/x509v3.h
-#include openssl/crypto.h
-#include openssl/pem.h
-#include openssl/err.h
-#include openssl/conf.h
-#include openssl/rand.h
-#include openssl/ssl.h
-#include openssl/pkcs12.h
-
-#endif
-
-#ifndef PHAR_HAVE_OPENSSL
-static int phar_call_openssl_signverify(int is_sign, php_stream *fp, off_t 
end, char *key, int key_len, char **signature, int *signature_len TSRMLS_DC);
-#endif
 static void destroy_phar_data(void *pDest);
 
 ZEND_DECLARE_MODULE_GLOBALS(phar)
@@ -604,25 +585,6 @@
 }
 /* }}}*/
 
-static const char hexChars[] = 0123456789ABCDEF;
-
-static int phar_hex_str(const char *digest, size_t digest_len, char ** 
signature)
-{
-   int pos = -1;
-   size_t len = 0;
-   
-   TSRMLS_FETCH();
-
-   *signature = (char*)safe_pemalloc(digest_len, 2, 1, PHAR_G(persist));
-
-   for (; len  digest_len; ++len) {
-   (*signature)[++pos] = hexChars[((const unsigned char 
*)digest)[len]  4];
-   (*signature)[++pos] = hexChars[((const unsigned char 
*)digest)[len]  0x0F];
-   }
-   (*signature)[++pos] = '\0';
-   return pos;
-}
-
 /**
  * Does not check for a previously opened phar in the cache.
  *
@@ -2917,169 +2879,57 @@
 
/* append signature */
if (global_flags  PHAR_HDR_SIGNATURE) {
-   unsigned char buf[1024];
-   int  sig_flags = 0, sig_len;
char sig_buf[4];
+
php_stream_rewind(newfile);
-   
if (phar-signature) {
efree(phar-signature);
phar-signature = NULL;
}

switch(phar-sig_flags) {
-#if HAVE_HASH_EXT
-   case PHAR_SIG_SHA512: {
-   unsigned char digest[64];
-   PHP_SHA512_CTX  context;
-
-   PHP_SHA512Init(context);
-   while ((sig_len = php_stream_read(newfile, (char*)buf, 
sizeof(buf)))  0) {
-   PHP_SHA512Update(context, buf, sig_len);
-   }
-   PHP_SHA512Final(digest, context);
-   php_stream_write(newfile, (char *) digest, 
sizeof(digest));
-   sig_flags |= PHAR_SIG_SHA512;
-   phar-sig_len = phar_hex_str((const char*)digest, 
sizeof(digest), phar-signature);
-   break;
-   }
-   case PHAR_SIG_SHA256: {
-   unsigned char digest[32];
-   PHP_SHA256_CTX  context;
-
-   PHP_SHA256Init(context);
-   while ((sig_len = php_stream_read(newfile, (char*)buf, 
sizeof(buf)))  0) {
-   PHP_SHA256Update(context, buf, sig_len);
-   }
-   PHP_SHA256Final(digest, context);
-   php_stream_write(newfile, (char *) digest, 
sizeof(digest));
-   sig_flags |= PHAR_SIG_SHA256;
-   phar-sig_len = phar_hex_str((const char*)digest, 
sizeof(digest), phar-signature);
-   break;
-   }
-#else
-   case PHAR_SIG_SHA512:
-   case PHAR_SIG_SHA256:
-   if (closeoldfile) {
-   php_stream_close(oldfile);
-   }
-   php_stream_close(newfile);
-   if (error) {
-   spprintf(error, 0, unable to write contents of 
file \%s\ to new phar \%s\ with requested hash type, entry-filename, 
phar-fname);
-   }
-   return EOF;
-#endif
-   case PHAR_SIG_OPENSSL: {
-   int siglen;
-   unsigned char *sigbuf;
-#ifdef PHAR_HAVE_OPENSSL
-   BIO *in;
-   EVP_PKEY *key;

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar phar.phar phar_internal.h phar_object.c tar.c util.c /ext/phar/tests badparameters.phpt phar_convert_again.phpt phar_setsignaturealgo2.phpt stat2.phpt stat2_

2008-06-13 Thread Greg Beaver
cellog  Fri Jun 13 22:07:45 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/phar/tests/tar phar_setsignaturealgo2.phpt 
require_hash.phpt 

  Modified files:  
/php-src/ext/phar   phar.phar phar_internal.h phar_object.c tar.c 
util.c 
/php-src/ext/phar/tests badparameters.phpt phar_convert_again.phpt 
phar_setsignaturealgo2.phpt stat2.phpt 
stat2_5.3.phpt zf_test.phpt 
/php-src/ext/phar/tests/tar bignames.phpt links.phpt links3.phpt 
links4.phpt links5.phpt tar_003.phpt 
tar_004.phpt tar_bz2.phpt tar_gzip.phpt 
tar_nostub.phpt 
/php-src/ext/phar/tests/tar/files   frontcontroller.phar.tar 
frontcontroller10.phar.tar 
frontcontroller11.phar.tar 
frontcontroller12.phar.tar 
frontcontroller2.phar.tar 
frontcontroller3.phar.tar 
frontcontroller4.phar.tar 
frontcontroller5.phar.tar 
frontcontroller6.phar.tar 
frontcontroller7.phar.tar 
frontcontroller8.phar.tar 
frontcontroller9.phar.tar 
  Log:
  [DOC] implement full signature support for tar-based archives.  By default, 
data archives do
  not have a signature, but can have one set via setSignatureAlgorithm()
  http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.phar?r1=1.7.2.13r2=1.7.2.14diff_format=u
Index: php-src/ext/phar/phar.phar
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_internal.h?r1=1.109.2.10r2=1.109.2.11diff_format=u
Index: php-src/ext/phar/phar_internal.h
diff -u php-src/ext/phar/phar_internal.h:1.109.2.10 
php-src/ext/phar/phar_internal.h:1.109.2.11
--- php-src/ext/phar/phar_internal.h:1.109.2.10 Fri Jun 13 20:15:19 2008
+++ php-src/ext/phar/phar_internal.hFri Jun 13 22:07:44 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar_internal.h,v 1.109.2.10 2008/06/13 20:15:19 cellog Exp $ */
+/* $Id: phar_internal.h,v 1.109.2.11 2008/06/13 22:07:44 cellog Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -420,7 +420,7 @@
 int phar_free_alias(phar_archive_data *phar, char *alias, int alias_len 
TSRMLS_DC);
 int phar_get_archive(phar_archive_data **archive, char *fname, int fname_len, 
char *alias, int alias_len, char **error TSRMLS_DC);
 int phar_open_parsed_phar(char *fname, int fname_len, char *alias, int 
alias_len, int is_data, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC);
-int phar_verify_signature(php_stream *fp, size_t end_of_phar, int sig_type, 
char *sig, int sig_len, char *fname, char **signature, int *signature_len, char 
**error TSRMLS_DC);
+int phar_verify_signature(php_stream *fp, size_t end_of_phar, php_uint32 
sig_type, char *sig, int sig_len, char *fname, char **signature, int 
*signature_len, char **error TSRMLS_DC);
 int phar_create_signature(phar_archive_data *phar, php_stream *fp, char 
**signature, int *signature_length, char **error TSRMLS_DC);
 
 /* utility functions */
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_object.c?r1=1.266.2.18r2=1.266.2.19diff_format=u
Index: php-src/ext/phar/phar_object.c
diff -u php-src/ext/phar/phar_object.c:1.266.2.18 
php-src/ext/phar/phar_object.c:1.266.2.19
--- php-src/ext/phar/phar_object.c:1.266.2.18   Fri Jun 13 20:15:19 2008
+++ php-src/ext/phar/phar_object.c  Fri Jun 13 22:07:44 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar_object.c,v 1.266.2.18 2008/06/13 20:15:19 cellog Exp $ */
+/* $Id: phar_object.c,v 1.266.2.19 2008/06/13 22:07:44 cellog Exp $ */
 
 #include phar_internal.h
 #include func_interceptors.h
@@ -2707,11 +2707,6 @@
Cannot set signature algorithm, phar is read-only);
return;
}
-   if (phar_obj-arc.archive-is_tar) {
-   zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 
TSRMLS_CC,
-   Cannot set signature algorithm, not possible with 
tar-based phar archives);
-   return;
-   }
if (phar_obj-arc.archive-is_zip) {
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 
TSRMLS_CC,
Cannot set signature algorithm, not possible with 
zip-based phar archives);
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tar.c?r1=1.55.2.5r2=1.55.2.6diff_format=u
Index: php-src/ext/phar/tar.c
diff -u php-src/ext/phar/tar.c:1.55.2.5 

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

2008-06-13 Thread Felipe Pena
felipe  Fri Jun 13 22:28:55 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   tar.c 
  Log:
  - Fix build (ZTS)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tar.c?r1=1.55.2.6r2=1.55.2.7diff_format=u
Index: php-src/ext/phar/tar.c
diff -u php-src/ext/phar/tar.c:1.55.2.6 php-src/ext/phar/tar.c:1.55.2.7
--- php-src/ext/phar/tar.c:1.55.2.6 Fri Jun 13 22:07:44 2008
+++ php-src/ext/phar/tar.c  Fri Jun 13 22:28:55 2008
@@ -1064,7 +1064,7 @@
 
entry.uncompressed_filesize = entry.compressed_filesize = 
signature_length + 8;
/* throw out return value and write the signature */
-   entry.filename_len = phar_tar_writeheaders((void *)entry, 
(void *)pass);
+   entry.filename_len = phar_tar_writeheaders((void *)entry, 
(void *)pass TSRMLS_CC);
 
if (error  *error) {
if (closeoldfile) {



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