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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Sun May 19 17:01:33 2024 UTC