I need to place config file out of phar of my web application. I need to mount it. In my stub file I tried:
<?php
try {
Phar::mount('sites/site.php', __DIR__.'/../sites/site.php');
} catch (PharException $e) {
print_r($e);
};
Phar::mapPhar();
include '../app.phar';
however, I got " Mounting of sites/site.php to D:\(...)\public/../sites/site.php failed
" error message. I tried various file path styles without any success. What is wrong with it?
I use box2 to ubild phar files. It take a long time to build the phar file. Is there any way to make it faster?
The error message is also vague. Any way to get better message?
Have you tried to use an internal phar uri as a mounting point like:
Phar::mount('phar://sites/site.php', __DIR__.'/../sites/site.php');
Also I don't know if the problem could be due the sites
subdir, did you try:
Phar::mount('site.php', __DIR__.'/../sites/site.php');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With