[PHP-DEV] Bug #14554 Updated: segfault when reading a zip file

2001-12-22 Thread phpbug

ID: 14554
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Open
Bug Type: ZZiplib Related
Operating System: linux
PHP Version: 4.1.0
New Comment:

Also sent to [EMAIL PROTECTED]

 cvs diff -u
cvs server: Diffing .
Index: zip.c
===
RCS file: /repository/php4/ext/zip/zip.c,v
retrieving revision 1.27
diff -u -r1.27 zip.c
--- zip.c   11 Dec 2001 15:30:57 -  1.27
+++ zip.c   22 Dec 2001 23:47:17 -
@@ -250,9 +250,10 @@
zval *zzip_ent;
ZZIP_DIR *archive_p = NULL;
php_zzip_dirent  *entry = NULL;
-   int   mode;
+   char *mode;
+   int   mode_len;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rr|l, zzip_dp, 
zzip_ent, mode) == FAILURE)
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rr|s, zzip_dp, 
+zzip_ent, mode, mode_len) == FAILURE)
return;
ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *,zzip_dp,  -1, 
le_zip_dir_name,   le_zip_dir);
ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, 
le_zip_entry_name, le_zip_entry);


Previous Comments:


[2001-12-22 15:44:27] [EMAIL PROTECTED]

Can you send a new patch which fixes that zip_entry_open thingy to Derick? He'll 
handle it.



[2001-12-17 10:31:51] [EMAIL PROTECTED]

It seems to be fixed in the current CVS tree (except for the third argument to 
zip_entry_open(), which is optional).



[2001-12-17 02:44:40] [EMAIL PROTECTED]

Can you send the patch to me by mail? The bugform screwed it up a little (and please 
make a patch against the current CVS version).

Regards,
Derick



[2001-12-16 20:48:31] [EMAIL PROTECTED]

ext/zip/zip.c crashes on the first zip_read().

The fix is at http://pfft.net/robin/pub/zip.4.1.0.patch
and I'm including it below.


diff -ru php-4.1.0/ext/zip/zip.c php-4.1.0-new/ext/zip/zip.c
--- php-4.1.0/ext/zip/zip.c Fri Oct 19 03:04:24 2001
+++ php-4.1.0-new/ext/zip/zip.c Sun Dec 16 19:26:20 2001
@@ -142,7 +142,7 @@
Returns the next file in the archive */
 PHP_FUNCTION(zip_read)
 {
-zval**zzip_dp;
+zval*zzip_dp;
 ZZIP_DIR *archive_p = NULL;
 php_zzip_dirent  *entry = NULL;
 int  @@ -186,14 +186,14 @@
  */
 static void php_zzip_get_entry(INTERNAL_FUNCTION_PARAMETERS, int opt)
 {
-zval**zzip_ent;
+zval*zzip_ent;
 php_zzip_dirent  *entry = NULL;

 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zzip_ent) == FAILURE) 
{
return;
}

-ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, le_zip_entry_name, 
le_zip_entry);
+ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, le_zip_entry_name, 
+le_zip_entry);

 switch (opt) {
 case 0:
@@ -248,17 +248,18 @@
Open a Zip File, pointed by the resource entry */
 PHP_FUNCTION(zip_entry_open)
 {
-zval**zzip_dp;
-zval**zzip_ent;
+zval*zzip_dp;
+zval*zzip_ent;
 ZZIP_DIR *archive_p = NULL;
 php_zzip_dirent  *entry = NULL;
-int   mode;
+char  *mode;
+int   mode_len;

-if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rr|l, zzip_dp, zzip_ent, 
mode) == FAILURE)
+if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rr|s, zzip_dp, zzip_ent, 
+mode, mode_len) == FAILURE)
 return;

-ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *,zzip_dp,  -1, le_zip_dir_name,  
 le_zip_dir);
-ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, 
le_zip_entry_name, le_zip_entry);
+ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *,zzip_dp,  -1, le_zip_dir_name, 
+  le_zip_dir);
+ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, 
+le_zip_entry_name, le_zip_entry);

 entry-fp = zzip_file_open(archive_p, entry-dirent.d_name, O_RDONLY | O_BINARY);

 ret@@ -274,7 +275,7 @@
Read X bytes from an opened zip entry */
 PHP_FUNCTION(zip_entry_read)
 {
-zval**zzip_ent;
+zval*zzip_ent;
 php_zzip_dirent  *entry = NULL;
 char *buf   = NULL;
 int   len   = 1024;
@@ -284,7 +285,7 @@
return;
}

-ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, le_zip_entry_name, 
le_zip_entry);
+ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, le_zip_entry_name, 
+le_zip_entry);

 buf = emalloc(len + 1);
 

[PHP-DEV] Bug #14554 Updated: segfault when reading a zip file

2001-12-17 Thread phpbug

ID: 14554
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Open
Bug Type: ZZiplib Related
Operating System: linux
PHP Version: 4.1.0
New Comment:

It seems to be fixed in the current CVS tree (except for the third argument to 
zip_entry_open(), which is optional).

Previous Comments:


[2001-12-17 02:44:40] [EMAIL PROTECTED]

Can you send the patch to me by mail? The bugform screwed it up a little (and please 
make a patch against the current CVS version).

Regards,
Derick



[2001-12-16 20:48:31] [EMAIL PROTECTED]

ext/zip/zip.c crashes on the first zip_read().

The fix is at http://pfft.net/robin/pub/zip.4.1.0.patch
and I'm including it below.


diff -ru php-4.1.0/ext/zip/zip.c php-4.1.0-new/ext/zip/zip.c
--- php-4.1.0/ext/zip/zip.c Fri Oct 19 03:04:24 2001
+++ php-4.1.0-new/ext/zip/zip.c Sun Dec 16 19:26:20 2001
@@ -142,7 +142,7 @@
Returns the next file in the archive */
 PHP_FUNCTION(zip_read)
 {
-zval**zzip_dp;
+zval*zzip_dp;
 ZZIP_DIR *archive_p = NULL;
 php_zzip_dirent  *entry = NULL;
 int  @@ -186,14 +186,14 @@
  */
 static void php_zzip_get_entry(INTERNAL_FUNCTION_PARAMETERS, int opt)
 {
-zval**zzip_ent;
+zval*zzip_ent;
 php_zzip_dirent  *entry = NULL;

 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zzip_ent) == FAILURE) 
{
return;
}

-ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, le_zip_entry_name, 
le_zip_entry);
+ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, le_zip_entry_name, 
+le_zip_entry);

 switch (opt) {
 case 0:
@@ -248,17 +248,18 @@
Open a Zip File, pointed by the resource entry */
 PHP_FUNCTION(zip_entry_open)
 {
-zval**zzip_dp;
-zval**zzip_ent;
+zval*zzip_dp;
+zval*zzip_ent;
 ZZIP_DIR *archive_p = NULL;
 php_zzip_dirent  *entry = NULL;
-int   mode;
+char  *mode;
+int   mode_len;

-if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rr|l, zzip_dp, zzip_ent, 
mode) == FAILURE)
+if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rr|s, zzip_dp, zzip_ent, 
+mode, mode_len) == FAILURE)
 return;

-ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *,zzip_dp,  -1, le_zip_dir_name,  
 le_zip_dir);
-ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, 
le_zip_entry_name, le_zip_entry);
+ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *,zzip_dp,  -1, le_zip_dir_name, 
+  le_zip_dir);
+ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, 
+le_zip_entry_name, le_zip_entry);

 entry-fp = zzip_file_open(archive_p, entry-dirent.d_name, O_RDONLY | O_BINARY);

 ret@@ -274,7 +275,7 @@
Read X bytes from an opened zip entry */
 PHP_FUNCTION(zip_entry_read)
 {
-zval**zzip_ent;
+zval*zzip_ent;
 php_zzip_dirent  *entry = NULL;
 char *buf   = NULL;
 int   len   = 1024;
@@ -284,7 +285,7 @@
return;
}

-ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, le_zip_entry_name, 
le_zip_entry);
+ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, le_zip_entry_name, 
+le_zip_entry);

 buf = emalloc(len + 1);
 ret = zzip_read(entry-fp, buf, len);
@@ -300,16 +301,16 @@
Close a zip entry */
 PHP_FUNCTION(zip_entry_close)
 {
-zval**zzip_ent;
+zval*zzip_ent;
 php_zzip_dirent  *entry = NULL;

 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zzip_ent) == FAILURE) 
{
return;
}

-ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, le_zip_entry_name, 
le_zip_entry);
+ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, le_zip_entry_name, 
+le_zip_entry);

-zend_list_delete(Z_LVAL_PP(zzip_ent));
+zend_list_delete(Z_LVAL_PP(zzip_ent));
 }
 /* }}} */
;
@@ -151,7 +151,7 @@
return;
}

-ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, zzip_dp, -1, le_zip_dir_name, 
le_zip_dir);
+ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, zzip_dp, -1, le_zip_dir_name, 
+le_zip_dir);

 entry = emalloc(sizeof(php_zzip_dirent));
 ret = zzip_dir_read(archive_p, entry-dirent);
@@ -169,16 +169,16 @@
Close a Zip archive */
 PHP_FUNCTION(zip_close)
 {
-zval **zzip_dp;
+zval *zzip_dp;
 ZZIP_DIR  *archive_p = NULL;

 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zzip_dp) == FAILURE) {
return;
}

-ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, zzip_dp, -1, le_zip_dir_name, 

[PHP-DEV] Bug #14554: segfault when reading a zip file

2001-12-16 Thread phpbug

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.1.0
PHP Bug Type: ZZiplib Related
Bug description:  segfault when reading a zip file

ext/zip/zip.c crashes on the first zip_read().

The fix is at http://pfft.net/robin/pub/zip.4.1.0.patch
and I'm including it below.


diff -ru php-4.1.0/ext/zip/zip.c php-4.1.0-new/ext/zip/zip.c
--- php-4.1.0/ext/zip/zip.c Fri Oct 19 03:04:24 2001
+++ php-4.1.0-new/ext/zip/zip.c Sun Dec 16 19:26:20 2001
@@ -142,7 +142,7 @@
Returns the next file in the archive */
 PHP_FUNCTION(zip_read)
 {
-zval**zzip_dp;
+zval*zzip_dp;
 ZZIP_DIR *archive_p = NULL;
 php_zzip_dirent  *entry = NULL;
 int  @@ -186,14 +186,14 @@
  */
 static void php_zzip_get_entry(INTERNAL_FUNCTION_PARAMETERS, int opt)
 {
-zval**zzip_ent;
+zval*zzip_ent;
 php_zzip_dirent  *entry = NULL;

 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zzip_ent)
== FAILURE) {
return;
}

-ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1,
le_zip_entry_name, le_zip_entry);
+ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1,
le_zip_entry_name, le_zip_entry);

 switch (opt) {
 case 0:
@@ -248,17 +248,18 @@
Open a Zip File, pointed by the resource entry */
 PHP_FUNCTION(zip_entry_open)
 {
-zval**zzip_dp;
-zval**zzip_ent;
+zval*zzip_dp;
+zval*zzip_ent;
 ZZIP_DIR *archive_p = NULL;
 php_zzip_dirent  *entry = NULL;
-int   mode;
+char  *mode;
+int   mode_len;

-if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rr|l, zzip_dp,
zzip_ent, mode) == FAILURE)
+if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rr|s, zzip_dp,
zzip_ent, mode, mode_len) == FAILURE)
 return;

-ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *,zzip_dp,  -1,
le_zip_dir_name,   le_zip_dir);
-ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1,
le_zip_entry_name, le_zip_entry);
+ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *,zzip_dp,  -1,
le_zip_dir_name,   le_zip_dir);
+ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1,
le_zip_entry_name, le_zip_entry);

 entry-fp = zzip_file_open(archive_p, entry-dirent.d_name, O_RDONLY |
O_BINARY);

 ret@@ -274,7 +275,7 @@
Read X bytes from an opened zip entry */
 PHP_FUNCTION(zip_entry_read)
 {
-zval**zzip_ent;
+zval*zzip_ent;
 php_zzip_dirent  *entry = NULL;
 char *buf   = NULL;
 int   len   = 1024;
@@ -284,7 +285,7 @@
return;
}

-ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1,
le_zip_entry_name, le_zip_entry);
+ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1,
le_zip_entry_name, le_zip_entry);

 buf = emalloc(len + 1);
 ret = zzip_read(entry-fp, buf, len);
@@ -300,16 +301,16 @@
Close a zip entry */
 PHP_FUNCTION(zip_entry_close)
 {
-zval**zzip_ent;
+zval*zzip_ent;
 php_zzip_dirent  *entry = NULL;

 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zzip_ent)
== FAILURE) {
return;
}

-ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1,
le_zip_entry_name, le_zip_entry);
+ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1,
le_zip_entry_name, le_zip_entry);

-zend_list_delete(Z_LVAL_PP(zzip_ent));
+zend_list_delete(Z_LVAL_PP(zzip_ent));
 }
 /* }}} */
;
@@ -151,7 +151,7 @@
return;
}

-ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, zzip_dp, -1,
le_zip_dir_name, le_zip_dir);
+ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, zzip_dp, -1,
le_zip_dir_name, le_zip_dir);

 entry = emalloc(sizeof(php_zzip_dirent));
 ret = zzip_dir_read(archive_p, entry-dirent);
@@ -169,16 +169,16 @@
Close a Zip archive */
 PHP_FUNCTION(zip_close)
 {
-zval **zzip_dp;
+zval *zzip_dp;
 ZZIP_DIR  *archive_p = NULL;

 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zzip_dp) ==
FAILURE) {
return;
}

-ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, zzip_dp, -1,
le_zip_dir_name, le_zip_dir);
+ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, zzip_dp, -1,
le_zip_dir_name, le_zip_dir);

-zend_list_delete(Z_LVAL_PP(zzip_dp));
+zend_list_delete(Z_LVAL_PP(zzip_dp));
 }
 /* }}} */


-- 
Edit bug report at: http://bugs.php.net/?id=14554edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13913: Empty strings on nlist and rawlist

2001-11-02 Thread phpbug

From: [EMAIL PROTECTED]
Operating system: Windows XP final
PHP version:  4.0.6
PHP Bug Type: FTP related
Bug description:  Empty strings on nlist and rawlist

Thank you for hearing me :)

The problem is that whatever i try there is no data in any nlist or rawlist
command i issue on my ftp server.

I started out with IIS 5.1 (standard winXP) and ended with bulletproof FTP
1.25, both not giving any listings..

Some sample code:

--

$dir=ftp_pwd($conn_id); 

$rawlist = ftp_rawlist($conn_id,$dir);
$nlist = ftp_nlist($conn_id,$dir);
 
if ($rawlist) { echo BRSpawned value for nlist was .$nlist; }
else { echo BRempty as usual..; }
if ($rawlist) { echo BRSpawned value for rawlist was .$rawlist; }
else { echo BRempty as usual..; }

echo BR;

print_r($rawlist);
print_r($nlist);

--

where there:
- was a connection in the 1st place ($conn_id)
- i encountered not a single error message
- i used the if .. else to prove my wrong
- i received no data in my string

I have seen various bug reports resembling what i've expierenced but none
of them got answered because they all stopped giving information which
ended in: can't reproduce the error.

I hope you (the brave volunteer) could help me.. :)

Thanxx

-- 
Edit bug report at: http://bugs.php.net/?id=13913edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13190: shm_put_var() problem with free space calculation

2001-09-07 Thread phpbug

From: [EMAIL PROTECTED]
Operating system: Linux SuSE 6.3 - Apache
PHP version:  4.0.6
PHP Bug Type: *Extensibility Functions
Bug description:  shm_put_var() problem with free space calculation

It seems that shm_put_var() has a problem with the
calculation of free space for setting a variable the
second time. I guess it calculates the remaining free
space including the size taken by the old variable

?php
$str=str_repeat(-,30); // 52 (max which fits in 100) is even worse
$shm=shm_attach(0xfffe,100);
shm_put_var($shm,1,$str);
//shm_put_var($shm,1,0); // using that will make next statement work
without error
shm_put_var($shm,1,$str); // THIS will tell you there is not enoug memory
left!
shm_detach($shm);
shm_remove(0xfffe);
?

Sincerely,
 Hans Raaf
-- 
Edit bug report at: http://bugs.php.net/?id=13190edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: Bug #11675 Updated: zzip_open() has a wrong argcount and doesn't validate arg2 correctly

2001-06-27 Thread phpbug

Daniel,

Thanks a lot for the heads-up. I appreciate it a lot.

regards,
/Robin


On Tue, 26 Jun 2001, Daniel Beckham wrote:

 Date: Tue, 26 Jun 2001 20:42:58 -0500
 From: Daniel Beckham [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: Bug Database [EMAIL PROTECTED]
 Subject: Re: [PHP-DEV] Re: Bug #11675 Updated: zzip_open() has a wrong
 arg count and doesn't validate arg2 correctly

 Hmm.. right after sending that last message, I realized what was going on.
 The 4.0.6 version had been branched off the main trunk for quite some time
 while it was going through the release process.  During that time, Sterling
 Hughes, the zip extension author, made a large number of changes and since
 the documentation itself is very recent, it reflects the current state of
 the Zip extension in cvs. (4.0.7-dev)

 I will make a note in the docs that this extension is marked as
 'EXPERIMENTAL' and that the current documentation is only good for 4.0.7 and
 later.  I apologize for the confusion, I should have noted this when I first
 commited the docs to cvs.

 BTW, you might be interested to know that the 4.0.6 incarnation of the
 extension had a problem with segfaulting when reading multiple entries from
 a zip file.  Your mileage may vary.

 Regards,

 Daniel Beckham

 - Original Message -
 From: [EMAIL PROTECTED]
 To: Bug Database [EMAIL PROTECTED]
 Sent: Tuesday, June 26, 2001 9:55 AM
 Subject: [PHP-DEV] Re: Bug #11675 Updated: zzip_open() has a wrong arg count
 and doesn't validate arg2 correctly


  My bug report was for 4.0.6. If it is corrected in cvs, fine. The
  online documentation doesn't match 4.0.6 and I think you should at least
  make note of it.
 
  thanks
  /Robin
 
 
  On 26 Jun 2001, Bug Database wrote:
 
   Date: 26 Jun 2001 14:44:18 -
   From: Bug Database [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Bug #11675 Updated: zzip_open() has a wrong arg count and
   doesn't validate arg2 correctly
  
   ID: 11675
   Updated by: danbeck
   Reported By: [EMAIL PROTECTED]
   Status: Closed
   Bug Type: ZZiplib Related
   Operating system:
   PHP Version: 4.0.6
   Assigned To:
   Comments:
  
   Please see the Zip section of the online manual for details:
  
   http://php.net/manual/en/ref.zip.php
  
   Previous Comments:
 
  --
 -
  
   [2001-06-26 05:58:30] [EMAIL PROTECTED]
   In the CVS the zziplib has been changed a bit:
  
   @ Renamed the ZZiplib extension to the Zip extension, function
   @ names have also changed accordingly, functionality, has stayed
   @ constant. (Sterling)
  
   zzip_open() is now zip_entry_open() and doesn't have this bug in it.
  
   --Jani
  
  
  
 
  --
 -
  
   [2001-06-25 16:14:31] [EMAIL PROTECTED]
   Fix:
  
   --- ../../php-4.0.6/ext/zziplib/zziplib.c   Thu May 24 07:42:14 2001
   +++ ext/zziplib/zziplib.c   Mon Jun 25 14:31:59 2001
   @@ -234,13 +234,13 @@
   ZZIP_DIR *archive_p = NULL;
   php_zzip_dirent *entry = NULL;
  
   -   if (ZEND_NUM_ARGS() != 2 ||
   +   if (ZEND_NUM_ARGS() != 3 ||
   zend_get_parameters_ex(3, zzip_dp, zzip_ent, mode) ==
 FAILURE) {
   WRONG_PARAM_COUNT;
   }
  
   ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, zzip_dp, -1, ZZIP
 Directory, le_zzip_dir);
   -   ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_dp, -1, ZZIP
 Entry, le_zzip_entry);
   +   ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1,
 ZZIP Entry, le_zzip_entry);
  
   entry-fp = zzip_file_open(archive_p, entry-dirent.d_name,
 O_RDONLY|O_BINARY);
  
  
   After this is fixed, the correct usage seems to be:
  
   ?php
   $zzip = zzip_opendir(foo.zip);
  
   if($zzip)
   {
 while ($zzip_entry = zzip_readdir($zzip))
 {
   echo zzip_entry_name:  . zzip_entry_name($zzip_entry) . n;
   echo zzip_entry_filesize:  . zzip_entry_filesize($zzip_entry) .
 n;
  
   if(zzip_open($zzip, $zzip_entry, r))
   {
 $buf = zzip_read($zzip_entry, zzip_entry_filesize($zzip_entry));
 zzip_close($zzip_entry);
 echo read:  . strlen($buf) .  bytesn;
   }
 }
 zzip_closedir($zzip);
   }
   ?
  
  
 
  --
 -
  
   [2001-06-25 16:09:44] [EMAIL PROTECTED]
   See patch at: http://pfft.net/robin/pub/zzip.patch
  
   Then, correct use seems to be:
   $zzip = zzip_opendir(foo.zip);
   if($zzip)
   {
 while ($zzip_entry = zzip_readdir($zzip))
 {
   echo zzip_entry_name:  . zzip_entry_name($zzip_entry) . n;
   echo zzip_entry_filesize:  . zzip_entry_filesize($zzip_entry) .
 n;
  
   if(zzip_open($zzip, $zzip_entry, r))
   {
 $buf = zzip_read($zzip_entry, zzip_entry_filesize($zzip_entry));
 zzip_close($zzip_entry);
 echo read:  . strlen($buf) .  bytesn;
   }
 }
   

[PHP-DEV] Bug #11675: zzip_open() has a wrong arg count and doesn't validate arg2 correctly

2001-06-26 Thread phpbug

From: [EMAIL PROTECTED]
Operating system: n/a
PHP version:  4.0.6
PHP Bug Type: ZZiplib Related
Bug description:  zzip_open() has a wrong arg count and doesn't validate arg2 correctly

See patch at: http://pfft.net/robin/pub/zzip.patch

Then, correct use seems to be:
$zzip = zzip_opendir(foo.zip);
if($zzip)
{
  while ($zzip_entry = zzip_readdir($zzip))
  {
echo zzip_entry_name:  . zzip_entry_name($zzip_entry) . \n;
echo zzip_entry_filesize:  . zzip_entry_filesize($zzip_entry) . \n;

if(zzip_open($zzip, $zzip_entry, r))
{
  $buf = zzip_read($zzip_entry, zzip_entry_filesize($zzip_entry));
  zzip_close($zzip_entry);
  echo read:  . strlen($buf) .  bytes\n;
}
  }
  zzip_closedir($zzip);
}


-- 
Edit Bug report at: http://bugs.php.net/?id=11675edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11675 Updated: zzip_open() has a wrong arg count and doesn't validate arg2 correctly

2001-06-25 Thread phpbug

ID: 11675
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: ZZiplib Related
Operating system: n/a
PHP Version: 4.0.6
Description: zzip_open() has a wrong arg count and doesn't validate arg2 correctly

Fix:

--- ../../php-4.0.6/ext/zziplib/zziplib.c   Thu May 24 07:42:14 2001
+++ ext/zziplib/zziplib.c   Mon Jun 25 14:31:59 2001
@@ -234,13 +234,13 @@
ZZIP_DIR *archive_p = NULL;
php_zzip_dirent *entry = NULL;

-   if (ZEND_NUM_ARGS() != 2 ||
+   if (ZEND_NUM_ARGS() != 3 ||
zend_get_parameters_ex(3, zzip_dp, zzip_ent, mode) == FAILURE) {
WRONG_PARAM_COUNT;
}

ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, zzip_dp, -1, ZZIP Directory, 
le_zzip_dir);
-   ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_dp, -1, ZZIP Entry, 
le_zzip_entry);
+   ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, zzip_ent, -1, ZZIP Entry, 
+le_zzip_entry);

entry-fp = zzip_file_open(archive_p, entry-dirent.d_name, 
O_RDONLY|O_BINARY);


After this is fixed, the correct usage seems to be:

?php
$zzip = zzip_opendir(foo.zip);

if($zzip)
{ 
  while ($zzip_entry = zzip_readdir($zzip))
  {
echo zzip_entry_name:  . zzip_entry_name($zzip_entry) . \n;
echo zzip_entry_filesize:  . zzip_entry_filesize($zzip_entry) . \n;

if(zzip_open($zzip, $zzip_entry, r))
{
  $buf = zzip_read($zzip_entry, zzip_entry_filesize($zzip_entry));
  zzip_close($zzip_entry);
  echo read:  . strlen($buf) .  bytes\n;
}
  }
  zzip_closedir($zzip);
}
?


Previous Comments:
---

[2001-06-25 16:09:44] [EMAIL PROTECTED]
See patch at: http://pfft.net/robin/pub/zzip.patch

Then, correct use seems to be:
$zzip = zzip_opendir(foo.zip);
if($zzip)
{
  while ($zzip_entry = zzip_readdir($zzip))
  {
echo zzip_entry_name:  . zzip_entry_name($zzip_entry) . n;
echo zzip_entry_filesize:  . zzip_entry_filesize($zzip_entry) . n;

if(zzip_open($zzip, $zzip_entry, r))
{
  $buf = zzip_read($zzip_entry, zzip_entry_filesize($zzip_entry));
  zzip_close($zzip_entry);
  echo read:  . strlen($buf) .  bytesn;
}
  }
  zzip_closedir($zzip);
}

---


Full Bug description available at: http://bugs.php.net/?id=11675


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10591 Updated: magic_quotes_runtime being randomly set?

2001-05-15 Thread phpbug

ID: 10591
User Update by: [EMAIL PROTECTED]
Status: Critical
Bug Type: PHP options/info functions
Operating system: Progeny GNU/Linux
PHP Version: 4.0 Latest CVS (01/05/2001)
Description: magic_quotes_runtime being randomly set?

updating to today's (4-15-01) CVS fixed it...



Previous Comments:
---

[2001-05-10 09:38:02] [EMAIL PROTECTED]
Also, has anybody managed to reproduce it?  I can't.

---

[2001-05-10 09:27:52] [EMAIL PROTECTED]
Do you have any settings for magic_quotes_runtime in your httpd.conf or .htaccess 
files?

---

[2001-05-09 11:12:01] [EMAIL PROTECTED]
Marked as to be fixed before 4.0.6

---

[2001-05-01 23:07:35] [EMAIL PROTECTED]
Hmmm... maybe we do have a bug here...

There are no calls to magic_quotes_runtime().
There are no includes, requires or auto_(pre|ap)pend_files.
The php.ini files and apache conf files don't set magic_quotes_runtime.
And there are no other scripts on the box that call magic_quotes_runtime() or set_ini 
('magic_quotes_runtime', 'On');

So, right now it does seem that magic_quotes_runtime does to randomly turn on and off.

Calls to get_magic_quotes_runtime() accurately report whether magic_quotes_runtime is 
active, while phpinfo() reports that magic_quotes_runtime is off - both locally and 
the master value.

Initial reports indicated that the bug may have been related to file(), however, the 
problem can be reproduced using fopen() as well - see 
http://airbag.tss.peachnet.edu/~sam/fopen.php and 
http://airbag.tss.peachnet.edu/~sam/fopen.txt.

Anyone have any ideas here - I am coming up blank.


---

[2001-05-01 21:19:23] [EMAIL PROTECTED]
Damn... misread last comment. Have asked user to send me relevant code.  I would guess 
that something simple to fix on here...

---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.

Full Bug description available at: http://bugs.php.net/?id=10591


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10881: unknown segfaults

2001-05-15 Thread phpbug

From: [EMAIL PROTECTED]
Operating system: progeny linux 1.0 Kernel 2.4.0
PHP version:  4.0 Latest CVS (2001-05-15)
PHP Bug Type: 
Bug description:  unknown segfaults

Using today's PHP and IMP/Horde CVS with Progeny Linux 1.0
under kernel 2.4.0.

libmcrypt-2.4.10
libtool-1.4
Apache/1.3.19

./configure --with-apxs=/www/bin/apxs --with-openssl=/usr
--with-db2=/usr --with-imap=../ --with-ldap=/usr
--with-mysql=/usr --with-mm=/usr --with-zlib=/usr
--with-gnu-ld --with-gettext=/usr --enable-ftp
--with-mcal=/usr/local --with-mcrypt=/usr/local

http://airbag.tss.peachnet.edu/info.php

When I try to login to IMP, I get a segfault. From apache's
error log:

[Tue May 15 10:50:00 2001] [notice] child pid 17105 exit
signal Segmentation fault (11)

backtrace #1

#0  0x406930ee in gost_LTX__mcrypt_decrypt (key=0x0,
in=0x81957a4)
at gost.c:276
#1  0x401fd9f0 in ecb_LTX__mdecrypt (ign=0x0,
ciphertext=0x81957a4, len=8, 
blocksize=8, akey=0x0, func=0x40692da4
gost_LTX__mcrypt_encrypt, 
func2=0x406930b0 gost_LTX__mcrypt_decrypt) at ecb.c:72
#2  0x4058dc36 in mdecrypt (td=0x81d3148, buf=0x0,
a=0x81957a4, b=8)
at mcrypt_modules.c:387
#3  0x4058d161 in mdecrypt_generic (td=0x81d3148,
ciphertext=0x81957a4, len=8)
at mcrypt.c:160
#4  0x4039e6af in php_if_mdecrypt_generic (ht=2,
return_value=0x816fb84, 
this_ptr=0x0, return_value_used=1) at mcrypt.c:559
#5  0x4034d6f9 in execute (op_array=0x817d00c) at
./zend_execute.c:1504
#6  0x4034d94c in execute (op_array=0x817b6ec) at
./zend_execute.c:1544
#7  0x4034d94c in execute (op_array=0x81466b4) at
./zend_execute.c:1544
#8  0x4035befe in zend_execute_scripts (type=8,
file_count=3) at zend.c:748
#9  0x4036dc74 in php_execute_script
(primary_file=0xb800) at main.c:1206
#10 0x4036a31f in apache_php_module_main (r=0x812ff24,
display_source_mode=0)
at sapi_apache.c:89
#11 0x4036acf3 in send_php (r=0x812ff24,
display_source_mode=0, filename=0x0)
at mod_php4.c:535
#12 0x4036ad32 in send_parsed_php (r=0x812ff24) at
mod_php4.c:546
#13 0x8055389 in ap_invoke_handler ()
#14 0x806a1df in process_request_internal ()
#15 0x806a246 in ap_process_request ()
#16 0x80610a6 in child_main ()
#17 0x8061281 in make_child ()
#18 0x80613fc in startup_children ()
#19 0x8061a6c in standalone_main ()
#20 0x80622bc in main ()
#21 0x4008fdcc in __libc_start_main () from /lib/libc.so.6


backtrace #2 after a re-compile of mcrypt
#0  0x406080ee in gost_LTX__mcrypt_decrypt (key=0x0,
in=0x823ae14)
at gost.c:276
#1  0x401fd9f0 in ecb_LTX__mdecrypt (ign=0x0,
ciphertext=0x823ae14, len=8, 
blocksize=8, akey=0x0, func=0x40607da4
gost_LTX__mcrypt_encrypt, 
func2=0x406080b0 gost_LTX__mcrypt_decrypt) at ecb.c:72
#2  0x405a2c36 in mdecrypt (td=0x821f668, buf=0x0,
a=0x823ae14, b=8)
at mcrypt_modules.c:387
#3  0x405a2161 in mdecrypt_generic (td=0x821f668,
ciphertext=0x823ae14, len=8)
at mcrypt.c:160
#4  0x403ba2b8 in php_if_mdecrypt_generic (ht=2,
return_value=0x822c83c, 
this_ptr=0x0, return_value_used=1) at mcrypt.c:559
#5  0x40352667 in execute (op_array=0x8175204) at
./zend_execute.c:1504
#6  0x4035288f in execute (op_array=0x81847ac) at
./zend_execute.c:1544
#7  0x4035288f in execute (op_array=0x814a56c) at
./zend_execute.c:1544
#8  0x40363d00 in zend_execute_scripts (type=8,
file_count=3) at zend.c:748
#9  0x4037c173 in php_execute_script
(primary_file=0xb800) at main.c:1206
#10 0x403776be in apache_php_module_main (r=0x8131bbc,
display_source_mode=0)
at sapi_apache.c:89
#11 0x4037842a in send_php (r=0x8131bbc, display_source_mode=0, 
filename=0x81337bc /www/htdocs/horde/imp/redirect.php)
at mod_php4.c:535
#12 0x4037846f in send_parsed_php (r=0x8131bbc) at
mod_php4.c:546
#13 0x8055389 in ap_invoke_handler ()
#14 0x806a1df in process_request_internal ()
#15 0x806a246 in ap_process_request ()
#16 0x80610a6 in child_main ()
#17 0x8061281 in make_child ()
#18 0x80613fc in startup_children ()
#19 0x8061a6c in standalone_main ()
#20 0x80622bc in main ()


this is the same machine that was having trouble with
gpc_magic_quotes in 10591.  Do I have some compiler or libc
funkiness going on?


-- 
Edit Bug report at: http://bugs.php.net/?id=10881edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10805: Compile error on zend_operators.c

2001-05-11 Thread phpbug

From: [EMAIL PROTECTED]
Operating system: Tru64/OSF1 V5.0 a
PHP version:  4.0.5
PHP Bug Type: Compile Failure
Bug description:  Compile error on zend_operators.c

make: GNU Make version 3.79
cc: Compaq C V6.1-020 on Compaq Tru64 UNIX V5.0A (Rev. 1094)

Error:
Making all in Zend
make[1]: Entering directory `/usr/users/stone/dl/php-4.0.5/Zend'
/bin/sh /home/stone/dl/php-4.0.5/libtool --silent --mode=compile gcc -DHAVE_CONFIG_H 
-I. -I. -I../main   -DOSF1 -DUSE_HSREGEX -DUSE_EXPAT -DSUPPORT_UTF8 
-DXML_BYTE_ORDER=12  -g -O2 -c zend_operators.c
zend_operators.c: In function `multi_convert_to_long_ex':
zend_operators.c:525: parse error before `zval'
zend_operators.c: In function `multi_convert_to_double_ex':
zend_operators.c:540: parse error before `zval'
zend_operators.c: In function `multi_convert_to_string_ex':
zend_operators.c:555: parse error before `zval'
make[1]: *** [zend_operators.lo] Error 1
make[1]: Leaving directory `/usr/users/stone/dl/php-4.0.5/Zend'
make: *** [all-recursive] Error 1



-- 
Edit Bug report at: http://bugs.php.net/?id=10805edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10806: make fails on Tru64.

2001-05-11 Thread phpbug

From: [EMAIL PROTECTED]
Operating system: Tru64/OSF1 v5.0a
PHP version:  4.0.5
PHP Bug Type: Compile Problem
Bug description:  make fails on Tru64.

GNU make:
$ ./configure
[...]
$ make 
Makefile:29: /build/rules.mk: No such file or directory
Makefile:30: /build/library.mk: No such file or directory
Makefile:31: /build/program.mk: No such file or directory
make: *** No rule to make target `/build/program.mk'.  Stop.
$ make -d
[...]
 No implicit rule found for `/build/program.mk'.
  Finished prerequisites of target file `/build/program.mk'.
 Must remake target `/build/program.mk'.
make: *** No rule to make target `/build/program.mk'.  Stop.


Compaq make:
$ ./configure
[...]
$ make
Make: Cannot open /build/rules.mk.  Stop.
$ make -d
MAKE ENTRY (make -d) at Fri May 11 10:43:16 2001
Reading internal rules.
MAKEDIR=/
Include file: /build/rules.mk
Make: Cannot open /build/rules.mk.  Stop.
Current working directory on exit from make is /usr/users/stone/dl/php-4.0.5
MAKE EXIT (1) at Fri May 11 10:43:16 2001

My workaround:
/opt/make/bin/make top_srcdir=/home/stone/dl/php-4.0.5 
top_builddir=/home/stone/dl/php-4.0.5 builddir=.
or edit the makefiles... 

Then the compile stops at zend_operators.c see bug: #10805



-- 
Edit Bug report at: http://bugs.php.net/?id=10806edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10591: file() seemingly randomly adds slashes

2001-05-01 Thread phpbug

From: [EMAIL PROTECTED]
Operating system: Progeny GNU/Linux 
PHP version:  4.0 Latest CVS (01/05/2001)
PHP Bug Type: 
Bug description:  file() seemingly randomly adds slashes

http://airbag.tss.peachnet.edu/~sam/file.php

Click on Try Again and you'll see the quotes become
escaped and then not escaped seemingly at random.

The code is here:
http://airbag.tss.peachnet.edu/~sam/file.txt

http://airbag.tss.peachnet.edu/info.php
is the phpinfo information.


-- 
Edit Bug report at: http://bugs.php.net/?id=10591edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10591 Updated: file() seemingly randomly adds slashes

2001-05-01 Thread phpbug

ID: 10591
User Update by: [EMAIL PROTECTED]
Status: Open
Old-Bug Type: 
Bug Type: *General Issues
Description: file() seemingly randomly adds slashes

Sorry, file.txt should work now. I saw you hit the 404.

Previous Comments:
---

[2001-05-01 18:24:21] [EMAIL PROTECTED]
http://airbag.tss.peachnet.edu/~sam/file.php

Click on Try Again and you'll see the quotes become
escaped and then not escaped seemingly at random.

The code is here:
http://airbag.tss.peachnet.edu/~sam/file.txt

http://airbag.tss.peachnet.edu/info.php
is the phpinfo information.

---


Full Bug description available at: http://bugs.php.net/?id=10591


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10591 Updated: file() seemingly randomly adds slashes

2001-05-01 Thread phpbug

ID: 10591
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: *General Issues
Description: file() seemingly randomly adds slashes

Sorry, file.txt should work now. I saw you hit the 404.

Previous Comments:
---

[2001-05-01 19:08:34] [EMAIL PROTECTED]
Sorry, file.txt should work now. I saw you hit the 404.

---

[2001-05-01 18:24:21] [EMAIL PROTECTED]
http://airbag.tss.peachnet.edu/~sam/file.php

Click on Try Again and you'll see the quotes become
escaped and then not escaped seemingly at random.

The code is here:
http://airbag.tss.peachnet.edu/~sam/file.txt

http://airbag.tss.peachnet.edu/info.php
is the phpinfo information.

---


Full Bug description available at: http://bugs.php.net/?id=10591


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10591 Updated: file() seemingly randomly adds slashes

2001-05-01 Thread phpbug

ID: 10591
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: *General Issues
Description: file() seemingly randomly adds slashes

Changed. Looks like the runtime var is getting turned on and
off... what's up wit dat?! :)

Previous Comments:
---

[2001-05-01 19:56:17] [EMAIL PROTECTED]
That does seem odd...

Try get_magic_quotes_runtime() instead of get_magic_quotes_gpc() - gpc quoting only 
happens to get/post/cookie data.

---

[2001-05-01 19:14:25] [EMAIL PROTECTED]
Sorry, file.txt should work now. I saw you hit the 404.

---

[2001-05-01 19:08:34] [EMAIL PROTECTED]
Sorry, file.txt should work now. I saw you hit the 404.

---

[2001-05-01 18:24:21] [EMAIL PROTECTED]
http://airbag.tss.peachnet.edu/~sam/file.php

Click on Try Again and you'll see the quotes become
escaped and then not escaped seemingly at random.

The code is here:
http://airbag.tss.peachnet.edu/~sam/file.txt

http://airbag.tss.peachnet.edu/info.php
is the phpinfo information.

---


Full Bug description available at: http://bugs.php.net/?id=10591


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10591 Updated: file() seemingly randomly adds slashes

2001-05-01 Thread phpbug

ID: 10591
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: *General Issues
Description: file() seemingly randomly adds slashes

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from
SQL, from exec(), etc.magic_quotes_runtime = Off


Previous Comments:
---

[2001-05-01 20:15:23] [EMAIL PROTECTED]
Could you post the relevant section of your php.ini file?

---

[2001-05-01 20:03:56] [EMAIL PROTECTED]
Changed. Looks like the runtime var is getting turned on and
off... what's up wit dat?! :)

---

[2001-05-01 19:56:17] [EMAIL PROTECTED]
That does seem odd...

Try get_magic_quotes_runtime() instead of get_magic_quotes_gpc() - gpc quoting only 
happens to get/post/cookie data.

---

[2001-05-01 19:14:25] [EMAIL PROTECTED]
Sorry, file.txt should work now. I saw you hit the 404.

---

[2001-05-01 19:08:34] [EMAIL PROTECTED]
Sorry, file.txt should work now. I saw you hit the 404.

---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.

Full Bug description available at: http://bugs.php.net/?id=10591


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10591 Updated: file() seemingly randomly adds slashes

2001-05-01 Thread phpbug

ID: 10591
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: *General Issues
Description: file() seemingly randomly adds slashes

yea, lost a line break in there... it's as it should be in
the php.ini. Sorry about that.

Previous Comments:
---

[2001-05-01 20:25:18] [EMAIL PROTECTED]
If this:

; Magic quotes for runtime-generated data, e.g. data from
SQL, from exec(), etc.magic_quotes_runtime = Off

is literal, it should be:

; Magic quotes for runtime-generated data, e.g. data from
SQL, from exec(), etc.
magic_quotes_runtime = Off



---

[2001-05-01 20:17:20] [EMAIL PROTECTED]
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from
SQL, from exec(), etc.magic_quotes_runtime = Off


---

[2001-05-01 20:15:23] [EMAIL PROTECTED]
Could you post the relevant section of your php.ini file?

---

[2001-05-01 20:03:56] [EMAIL PROTECTED]
Changed. Looks like the runtime var is getting turned on and
off... what's up wit dat?! :)

---

[2001-05-01 19:56:17] [EMAIL PROTECTED]
That does seem odd...

Try get_magic_quotes_runtime() instead of get_magic_quotes_gpc() - gpc quoting only 
happens to get/post/cookie data.

---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.

Full Bug description available at: http://bugs.php.net/?id=10591


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #10591 Updated: php.ini parser not very strict

2001-05-01 Thread phpbug

ID: 10591
User Update by: [EMAIL PROTECTED]
Status: Closed
Bug Type: PHP options/info functions
Description: php.ini parser not very strict

Semi-randomly?

There are no odd lines in my php.ini...

I need this to work for my app! :)

Previous Comments:
---

[2001-05-01 20:54:05] [EMAIL PROTECTED]
The php.ini parser may behave strangely when presented with broken lines, 
semi-randomly turning features on and off.  

IMHO not a giant issue - if I get a chance, I will take a closer look at it.

---

[2001-05-01 20:36:08] [EMAIL PROTECTED]
yea, lost a line break in there... it's as it should be in
the php.ini. Sorry about that.

---

[2001-05-01 20:25:18] [EMAIL PROTECTED]
If this:

; Magic quotes for runtime-generated data, e.g. data from
SQL, from exec(), etc.magic_quotes_runtime = Off

is literal, it should be:

; Magic quotes for runtime-generated data, e.g. data from
SQL, from exec(), etc.
magic_quotes_runtime = Off



---

[2001-05-01 20:17:20] [EMAIL PROTECTED]
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from
SQL, from exec(), etc.magic_quotes_runtime = Off


---

[2001-05-01 20:15:23] [EMAIL PROTECTED]
Could you post the relevant section of your php.ini file?

---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.

Full Bug description available at: http://bugs.php.net/?id=10591


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9238: strpos() cannot indicate success when matching char is first

2001-02-13 Thread phpbug

From: [EMAIL PROTECTED]
Operating system: Linux 2.2.17+openwall
PHP version:  4.0.3pl1
PHP Bug Type: Strings related
Bug description:  strpos() cannot indicate success when matching char is first

Sample script:

(Note, this will never report SSL even when $SSL_PROTOCOL=SSLv3 or TLSv1)

?php
echo $SSL_PROTOCOL;
echo "BRYour connection method is: ";

if ( (strpos($SSL_PROTOCOL,"SSL")) || (strpos($SSL_PROTOCOL,"TLS")) )
{
echo "SSL!";
}
else
{
echo "non-SSL!";
}
?

The documentation says strpos() returns FALSE if no match.  But what about a match on 
the first character (index 0)?  Seems like the index returned should have been 1-based 
instead.

The routine is flawless when the code is rewritten thusly:

?php
echo $SSL_PROTOCOL;
echo "BRYour connection method is: ";

if ( (strpos($SSL_PROTOCOL,"SL")) || (strpos($SSL_PROTOCOL,"LS")) )
{
echo "SSL!";
}
else
{
echo "non-SSL!";
}
?

configuration line for PHP4 build:

Command './configure' '--with-mhash=/usr/local' '--with-mcrypt=/usr/local' 
'--with-mysql=/usr/local' '--enable-trans-sid' '--with-mm=/usr/local' 
'--enable-memory-limit' '--with-zlib' '--enable-inline-optimization' 
'--with-imap=/usr/local' '--with-imap-ssl' '--with-gmp' '--with-gd' '--with-cpdflib' 
'--with-pdflib' '--with-tiff-dir' '--with-jpeg-dir' '--with-png-dir' 
'--enable-track-vars' '--enable-bcmath' '--enable-calendar' '--with-db3' 
'--enable-ftp' '--enable-shmop' '--enable-sockets' '--enable-sysvsem' 
'--enable-sysvshm' '--with-apache=../apache_1.3.14' 

OpenSSL 0.9.6, mod_ssl/2.7.1


-- 
Edit Bug report at: http://bugs.php.net/?id=9238edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8677: dbase module built with phpize doesn't work.

2001-01-12 Thread phpbug

From: [EMAIL PROTECTED]
Operating system: Debian GNU/Linux (woody)
PHP version:  4.0.4
PHP Bug Type: dBase related
Bug description:  dbase module built with phpize doesn't work.

dbase module built with:
mkdir dbase; cp _php_source/ext/dbase/* dbase/;
cd dbase; phpize; configure --enable-dbase; make; make install;
doesn't work and php complains that:
PHP Warning:  Invalid library (maybe not a PHP library) 'dbase.so'  in Unknown on line 0



-- 
Edit Bug report at: http://bugs.php.net/?id=8677edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]