• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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