php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #22279 Would like tar/tar.gz/tar.bz2 files in include_path
Submitted: 2003-02-18 12:58 UTC Modified: 2003-02-18 15:00 UTC
From: carl at carldunham dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.3.0 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: carl at carldunham dot com
New email:
PHP Version: OS:

 

 [2003-02-18 12:58 UTC] carl at carldunham dot com
From a configuration management point of view, it would be 
convenient to package up a library of files in a .tar file 
(optionally compressed) to include in an application. Of 
course, this can be done by untaring into a directory in 
the include_path, but being able to skip that step is 
preferred. 
 
This would be a similar feature Java's ".jar" file 
concept. 
 
Thanks! Love PHP to death! 
 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-18 14:24 UTC] wez@php.net
This is not something we plan to have in the core of PHP (too much bloat, and not as fast as regular files), but starting in PHP 4.3.0, it is possible to implement a virtual filesystem based on a tar archive using PHP code itself by registering your own wrapper with the streams subsystem.

However, the performance will not be so good on some platforms. (this will be addressed in PHP 5).
 [2003-02-18 15:00 UTC] carl at carldunham dot com
Ah, so something like: 
 
$libdir = "zlib://mylib.tgz/"; 
 
require("${libdir}myfile.inc.php"); 
 
would work? Is it smart enough find mylib.tgz in the 
include_path?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC