[SOLVED] About "open_basedir"

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
ЕвгенияСемихова(ИПСемиховаЕ.А.)
Posts: 70
Joined: 11 Jan 2025, 09:45

[SOLVED] About "open_basedir"

Post by ЕвгенияСемихова(ИПСемиховаЕ.А.) » 14 Feb 2025, 08:26

I have new installed of Aimeos and at admin backend side I see:

Image

Potential problems: PHP setting "open_basedir" is enabled

At the same time, this parameter is disabled in the php.ini file itself:

Image

the peculiarity of my case is the security of setting up the PHP-FPM Hestia panel:
Image

Question: how critical is this fact for Aimeos, particularly in my case? I know what this parameter is for, so I want to clarify - will it affect the possibilities of updating Aimeos in the future? For example, if any directory paths change in your system.
Last edited by ЕвгенияСемихова(ИПСемиховаЕ.А.) on 14 Feb 2025, 11:02, edited 1 time in total.
Debian 12, PHP 8.3, Server 1 = Aimeos 2024.10.13, Server 2 = ES 8.17.1
life is full of many new and interesting things

User avatar
aimeos
Administrator
Posts: 8636
Joined: 01 Jan 1970, 00:00

Re: About "open_basedir"

Post by aimeos » 14 Feb 2025, 09:18

It's very problematic and may lead to Aimeos not working properly!
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ЕвгенияСемихова(ИПСемиховаЕ.А.)
Posts: 70
Joined: 11 Jan 2025, 09:45

Re: About "open_basedir"

Post by ЕвгенияСемихова(ИПСемиховаЕ.А.) » 14 Feb 2025, 11:02

According to modern security requirements, the "open_basedir" parameter is active by default on most systems. In short, this option restricts the ability to work within a directory. However, due to the features of the Aimeos system, you need to disable this option.

Therefore, immediately after installing the Hestia control panel and the Aimeos system, a warning appears in the administrative part of the site.:

Image

If the open_basedir parameter is commented out with a semicolon in the server settings of the Hestia control panel (php.ini), then the warning does not disappear in the admin panel anyway.

Image

Create a file in the root of the site (myshop/public) with the name "info.php " and we will put the following contents in it:

Code: Select all

<?php
phpinfo();
?>
Image

And this is strange, considering the disabled feature in the PHP settings.

And it's all about the PHP-FPM settings! Therefore, go to the console from under root, open the path:
Image

and in the default.tpl file, as well as in the file with your version of the PHP interpreter, we comment on the line (we put a semicolon in front):
Image

Go to the hestia panel settings, select the user and change the 'default' package to another one, and then back again - this is how our modified file will be applied.

Restart the server and check info.php:
Image
Debian 12, PHP 8.3, Server 1 = Aimeos 2024.10.13, Server 2 = ES 8.17.1
life is full of many new and interesting things

User avatar
aimeos
Administrator
Posts: 8636
Joined: 01 Jan 1970, 00:00

Re: About "open_basedir"

Post by aimeos » 14 Feb 2025, 11:15

ЕвгенияСемихова(ИПСемиховаЕ.А.) wrote: 14 Feb 2025, 11:02 According to modern security requirements, the "open_basedir" parameter is active by default on most systems. In short, this option restricts the ability to work within a directory.
It's a mistake to believe that open_basedir enhances security of PHP more than marginally. Instead, it's known as a workaround to mitigate wrong permissions on the OS level that causes more problems than it solves (especially it causes a lot of performance problems).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply