Results 1 to 6 of 6

Thread: What is the Phar manifest file entry in PHP?

  1. #1
    Join Date
    May 2009
    Posts
    245

    What is the Phar manifest file entry in PHP?

    Hi everyone,
    I am currently studying about the compressions that is done in PHP programming language. I get very confused when the term Phar comes in compressing. I somewhat have understood the concept of the Phar but don't know anything about the Phar manifest file entry. So thought that there would be someone interested in helping me. So please tell me what is the Phar manifest file entry in PHP?

  2. #2
    Join Date
    Aug 2006
    Posts
    227

    Re: What is the Phar manifest file entry in PHP?

    The phar file format is composed of container / manifest / content / signature, and stores the critical information that is contained in the phar archive in its manifest. The Phar manifest is a highly optimized format that allows the specification file by file compression, permissions and even user metadata such as user or group owner. All values of more than one byte are stored as little-endian, with the exception of the API version that is stored for historical reasons in 3 pieces double enders. All unused flags are reserved for future use and should not be used to store custom information. Use the metadata file to store custom metadata on individual files.
    I do to dead flowers what people at morgues do to dead people. Suck all the moisture out, dip them in plastic, paint them up pretty and put them in a nice frame.

  3. #3
    Join Date
    Jul 2006
    Posts
    286

    Re: What is the Phar manifest file entry in PHP?

    There are some important things that you should know. All access in writing require phar.readonly is disabled in php.ini or directly via the command line. Only the tar or zip archive without. Phar in their name without container executable .phar / stub.php can be created if phar.readonly = 1. The archives based on the tar file format conform to modern USTAR format. The design of the header file tar makes more efficient than the zip file format and as effective as phar file format when it comes to accessing data. Filenames are limited to 255 bytes, there including the full path within the archive tar-based phar.
    IF you hate me, please don't mention it. I know who hates me and who doesn't. You really do not have to make fun of people....

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: What is the Phar manifest file entry in PHP?

    Each manifest file contains the following information :
    • Length of filename in bytes.
    • Filename (length based on the previous value)
    • Uncompressed file size in bytes
    • Timestamp of file
    • Compressed file size in bytes
    • CRC32 checksum of the decompressed content of the file
    • Bitmapped flags specific file

  5. #5
    Join Date
    May 2008
    Posts
    2,389

    Re: What is the Phar manifest file entry in PHP?

    Recognized values for bitmapped flags specific to the file are listed below :
    • 0x000001ff - These bits are reserved for defining specific permissions to the file. These are used for fstat () and can be used to recreate desired permissions in extraction cases.
    • 0x00001000 - The file is compressed with zlib, if present.
    • 0x00002000 - If present, the file is compressed with bzip.

  6. #6
    Join Date
    Apr 2008
    Posts
    1,948

    Re: What is the Phar manifest file entry in PHP?

    The Phar containing a signature always have the signature added at the end of Phar after the shipper, and the manifest content. The two types of signatures supported to date are MD5 and SHA1. I have tried to describe the signature format :
    1. 4 bytes are used for flags signature. 0x0001 is used to define a signature MD5, SHA1 for 0x0002, 0x0004 for a 0x0008 and SHA256 for SHA512.
    2. 4 bytes are used for GBMB magic used to define the presence of a signature.
    3. 16 or 20 bytes are used for the current signature, 20 bytes for SHA1, 16 bytes for MD5, 32 bytes for SHA256, and 64 bytes for SHA512.

Similar Threads

  1. ::1 localhost Entry in hosts file
    By BADRU in forum Operating Systems
    Replies: 5
    Last Post: 08-11-2011, 12:37 PM
  2. How to Create Phar Archives in PHP?
    By Leoniee in forum Software Development
    Replies: 5
    Last Post: 04-03-2010, 05:29 AM
  3. Why we use PHAR in PHP?
    By NIcaBoy in forum Software Development
    Replies: 5
    Last Post: 04-03-2010, 05:13 AM
  4. Define Manifest File in Java
    By Sandy22 in forum Software Development
    Replies: 3
    Last Post: 09-11-2009, 06:34 PM
  5. How to integrate PowerArchiver entry into file context menu
    By Ebenezer in forum Windows Software
    Replies: 4
    Last Post: 22-07-2009, 03:48 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,880,772.25477 seconds with 16 queries