I’m trying to query a sqlite file that’s still inside a zip archive with PHP.
The reason is… The sqlite file when zipped is around ~16MB, but when extracted its ~150MB+, as its a large file my server sometimes times out during the unzipping, i can’t change any settings to increase the timeout.
I normally query the sqlite file (when extracted manually) like this…
$myPDO = new PDO('sqlite:/home/u756412721/public_html/manifest/manifest.sqlite');
I’ve tried the following but its not working with the .sqlite file, i did a simply echo $str; to confirm its getting the file content but my thoughts are the file_get_content command is messing up the .sqlite file format/hierarchy somehow meaning the new PDO() can’t understand it??
$str = file_get_contents('zip://../manifest.zip#manifest.sqlite');
$myPDO = new PDO($str);
Anyone be able to shed some light on what might solve this?
Thanks.