This template is in trial mode. Please do not use this template unless you have been authorized to do so by your Supervisor. Thanks!
Ticket Subject(s)
(paste the subject of the ticket here. upon adding the 4th ticket subject, submit article For Review after editing)
• allow_url_fopen change to off randomly
• PHP Issue
• PHP_INI_SCAN_DIR gives wrong directory
• how active PHP fopen()
Customer Request Summary
(in a sentence or two, describe the issue from the perspective of the customer)
• We set allow_url_fopen = On for a domain under one of our users in a litespeed/cpanel server.
The setting are in .htaccess, php.ini of the domain and php-fpm.conf of the domain. Configured from user cpanel interface.
• We have edited the allow_url_fopen value in the PHP INI editor in cPanel but it will not update
• For one of our clients who has multiple domains under his account there is a problem for the sites to identified the correct $DOC_ROOT
• how active PHP fopen() for 1 domain with prestashop 8 where and how....
Workarounds
(if no known workaround or no change to the existing workaround, simply link to the source ticket with a brief note such as "no workaround")
• #94410722 use DOC_ROOT variable
• #94423014 - https://docs.litespeedtech.com/cp/cpanel/php-user-ini/#per-domain-phpini
Per Domain php.ini
Most of the time, you should use cPanel's MultiPHP Manager to handle overriding PHP values. However, some PHP settings are not supported by cPanel MultiPHP Manager, such as allow_url_fopen and allow_url_include. For these settings, you will need to use PHPRC or PHP_INI_SCAN_DIR to define the php.ini for each user.
One user may have many subdomains or addon domains, which may be located in subdirectories under the main domain's document root. All such domains will use doc_root/php.ini. If you prefer for each subdomain to have it's own php.ini, for example /home/USER1/public_html/subdomain.com/php.ini, instead of relying on the user-level /home/USER1/public_html/php.ini, you can do the following:
- In LSWS Web Admin Console, change php external app from
Environment: PHPRC=$VH_ROOT/public_html(user based) toEnvironment: PHPRC=$DOC_ROOT(domain based), if the user has a fullphp.iniat/home/USER1/public_html/php.ini. Change it fromEnvironment: PHP_INI_SCAN_DIR=$VH_ROOT/public_html(user based) toEnvironment: PHP_INI_SCAN_DIR=$DOC_ROOT(domain based) if the user has a patialphp.ini. - Restart LSWS and lsphp to put the new Environment into effect.
• #95097495 - add DedicatePhpHandler to the vhost, phpappbydomain is more resource intensive and this config option was recently added to LiteSpeed in
• #95800429 - Provided the noted LiteSpeed documentation.
Links to relevant information or resources
(optional and no restrictions on sources)
• https://docs.litespeedtech.com/cp/cpanel/php-user-ini/
• [placeholder for source link]
• [placeholder for source link]
• [placeholder for source link]
Comments
0 comments
Article is closed for comments.