• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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