• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue is there a work around for php_flag variable in htaccess for nginx

larryk

Regular Pleskian
hello,

I have some old software that I will be getting rid of, but until then:

the htaccess file (located in domain.com/file) is required to have this in it:
php_flag session.auto_start 0

I have Smart static files processing turned off.
FastCGI application served by Apache.
Nginx is installed

basically I get Internal Server Error, just going to the doamin.com/file/ page
[core:alert] /var/www/vhosts/domain.com/httpdocs/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration, referer: https://domain.com/file/

IF I REMOVE this 'php_flag session.auto_start 0', it works.
BUT Then I can't login, because the software needs it :(

Maybe I'll turn off nginx for this one domain?
unless you know of a work around?

thanks
 
Last edited:
Hi larryk,

consider to add in your (sub)domain - specific PHP - Settings ( Home > Subscriptions > (sub)YOUR-DOMAIN.COM > PHP Settings ):

Code:
session.auto_start = "0"

or

session.auto_start = off

or consider to adjust your settings in your ".htaccess" - file with:
Code:
AddType x-mapp-php5 .php

    # for PHP 4 and apache 1
    <IfModule mod_php4.c>
        php_value magic_quotes_gpc 0
        php_value register_globals 0
        php_value session.auto_start 0
    </IfModule>

    # for PHP 4 and apache 2
    <IfModule sapi_apache2.c>
        php_value magic_quotes_gpc 0
        php_value register_globals 0
        php_value session.auto_start 0
    </IfModule>

    # for PHP 5 and apache 1 / 2
    <IfModule mod_php5.c>
        php_value magic_quotes_gpc 0
        php_value register_globals 0
        php_value session.auto_start 0
    </IfModule>
 
Back
Top