I want to open in php a tar file of 45GB and about 5 millions files. I don't want to extract it. I just want to get the content of a single file(something about 10kb).
So far I have tried :
new PharData('tar file');
Fatal error: Allowed memory size of 268435456 bytes exhausted
For tar you need to read the whole content in order to extract a single file
Not true. But compression adds complications when working with CLI tools. IIRC, the PEAR tar package can extract single files from gzipped tar archives without reading the whole file into memory.
Why do you need a 45Gb archive? Is it for deployment? If not then you really need to think about a different way of storing your data or switch providers.