• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

AllowOverride All missing + php_auto_prepend_file not working

Michael Kittlitz

New Pleskian
Hello there,

after migration from Ubuntu 12.04 LTS to 14.04 LTS, both of which with Plesk 12.0.18 the Migration-Tool did warn me, that the directive 'AllowOverride All' within the vhosts.conf - files would not be allowed anymore.
So I remove these lines to migrate successfully.

Now we have the issue, that the command in .htaccess -> php_auto_prepend_file is ignored.

I did a lot of research upon this in the Apache 2.4.7 documentation it says that the AllowOverride-Directive would still be valid. But also the all the other Options turned on (AllowOverride AuthConfig Indexes FileInfo Limit Options) the sepecific and most important command in the .htaccess is still ignored.
The .htaccess file gets interpreted, as putting some rubbish into it like 'fsfvsfvsfv' leads successfully to a "500 Internal Server Error"-Result.

Nonetheless the php_auto_prepend_file is an important directive and I need to be able to turn it back on as it is used on several of our customers hostings.
And it's not used hosting-wide, it is used differently in differens subdirectories.

So a global setting in vhosts.conf will not help or do the job.

Why has this been disbabled and how can I fix this?

Help ASAP is appreciated.

-> Solved: The PHP-Version used was a FastCGI-Version, not the Apache-Module.
Changing this made everything work again.

Solution to auto_prepend_file

Go in PLESK-Admin-Panel, PHP-Settings and add to the Additional directives-Area these lines:
user_ini.filename = ".user.ini"
user_ini.cache_ttl = 180

create a .user.ini - file at the subdirectory in question and put in the following lines:
PHP:
auto_prepend_file = "/var/www/vhosts/domain.de/subdomains/some/httpdocs/incls/prepend.inc.php"

and there you have it.
 
Last edited:
Back
Top