[PEAR-BUG] Bug #20246 [Com]: Broken with php 5.5.9

[email protected] ("[email protected]")
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at https://pear.php.net/bugs/bug.php?id=20246&edit=1

 ID:               20246
 Comment by:       [email protected]
 Reported By:      contact at greyboxconcepts dot com dot au
 Summary:          Broken with php 5.5.9
 Status:           Feedback
 Type:             Bug
 Package:          Archive_Tar
 Operating System: Ubuntu 14.04
 Package Version:  1.3.11
 PHP Version:      5.5.9
 Roadmap Versions: 
 New Comment:

CW, lines 814 & 888 are incorrect.  The previous code used
function_exists() and so does the new 
wrapper. Therefore, if gzopen64 exists, gzopen does not exist, and your
new wrapper will not get 
called.  Then the code will soft-abort.

Suggestion: remove the original function_exists() calls.


Previous Comments:
------------------------------------------------------------------------

[2014-07-29 14:02:14] mrook

I've pushed 
https://github.com/pear/Archive_Tar/commit/22431e47455c0a703c6145a38553d7
202a9cde10, can someone review that commit?

Thanks.

------------------------------------------------------------------------

[2014-07-23 07:51:52] mrook

-Roadmap Versions:
+Roadmap Versions: 1.3.12
I'm putting this on a roadmap. While I don't like wrapping those calls,
I don't think we 
have any alternative with those function signatures.

------------------------------------------------------------------------

[2014-07-23 02:45:29] dmausner

Agreed.  Someone with write privs on the code, please update the package
to either 
wrap the functions or check at each call.

The point is, the solution must work in either a 32 or 64 build.

------------------------------------------------------------------------

[2014-07-22 22:10:11] cweiske

The PHP bug report is https://bugs.php.net/bug.php?id=53829 and it's
from 2011. Doesn't seem like it's going away soon.

We could provide a wrapper that simply defines gzopen() and internally
passes the data through to gzopen64.

------------------------------------------------------------------------

[2014-07-22 20:42:16] dmausner

Tar.php contains references to gzopen, gztell, and gzseek, which may be
renamed gzopen64, gztell64, and gzseek64, depending on whose php5 build
you have installed.  It currently calls the functions without '64',
hence if the build contains only the functions with '64', Tar.php
aborts.

A simple and ugly solution is to modify Tar.php to check for the
existence of each function by name, with and without the '64', and then
execute whichever.

There are half-a-dozen code blocks to insert where these functions are
used.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=20246

-- 
Edit this bug report at https://pear.php.net/bugs/bug.php?id=20246&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.