Hello,
I am running a server with HestiaCP and recently installed osTicket on one of the domains. I noticed an issue related to PHP .phar files and wanted to check if there might be any restrictions in the server configuration.
Environment
-
Control Panel: HestiaCP
-
Web Server: Apache (default Hestia stack)
-
OS: Linux VPS
-
PHP Versions Tested:
-
PHP 8.4
-
PHP 8.3
-
PHP 8.2
-
Issue
osTicket plugins are distributed as .phar files. When I upload the .phar plugin through the osTicket admin interface or place the .phar file directly in the plugin directory, the plugin does not appear in the system.
However, when I manually extract the .phar archive outside of HestiaCP and copy the extracted plugin folder into the plugin directory, the plugin works correctly and appears in the osTicket plugin list.
This suggests the application itself works correctly, but the server may not be allowing .phar archives to execute or be read properly.
Things I Checked
PHAR extension appears to be enabled:
php -m | grep phar
returns:
Phar
My Question
Could HestiaCP or its default configuration block or restrict .phar execution in any of the following ways?
Possible areas I am wondering about:
-
open_basedirrestrictions -
disabled PHP functions
-
phar.readonlysettings -
Apache or PHP-FPM security policies
-
mod_security rules
-
any HestiaCP security hardening related to
.phar
Is there any recommended configuration in HestiaCP to allow PHP applications to load .phar files properly?
Thank you for any guidance.