powered by simpleCommunicator - 2.0.38     © 2025 Programmizd 02
Форумы / PHP, Perl, Python [игнор отключен] [закрыт для гостей] / php-fpm: относительный путь в include
1 сообщений из 1, страница 1 из 1
php-fpm: относительный путь в include
    #40028185
Cyrax_02
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
В конфигурационном файле php-fpm с помощью директивы include можно подключать другие файлы:
Код: php
1.
include = /etc/php/8.0/fpm/pool.d/pool1.conf    ; работает

Задача заключается в указании относительного пути вместо " /etc/php/8.0/fpm/pool.d " - чтобы при каждом обновлении php не приходилось менять версию в этом пути.
тест относительных путейinclude = /pool1.conf
WARNING: Nothing matches the include pattern '/pool1.conf' from /etc/php/8.0/fpm/pool.d/pool2.conf at line 7.

include = ./pool1.conf
WARNING: Nothing matches the include pattern '/usr/./pool1.conf' from /etc/php/8.0/fpm/pool.d/pool-pool2.conf at line 7.

include = ../pool.d/pool1.conf
WARNING: Nothing matches the include pattern '/usr/../pool.d/pool1.conf' from /etc/php/8.0/fpm/pool.d/pool2.conf at line 7.Задача заключается в указании относительного пути подключаемого файла (относительно директории текущего файла, а не директории установки php, равной /usr ):

В стандартном файле настроек php-fpm.conf в комментариях написано:
автор;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;

All relative paths in this configuration file are relative to PHP's install prefix ( /usr ). This prefix can be dynamically changed by using the '-p' argument from the command line.
Include one or more files. If glob(3) exists, it is used to include a bunch of files from a glob(3) pattern. This directive can be used verywhere in the file. Relative path can also be used. They will be prefixed by:
- the global prefix if it's been set (-p argument)
- /usr otherwise
include=/etc/php/8.0/fpm/pool.d/*.confТ.е. по умолчанию относительные пути отсчитываются не от директории текущего файла, а от директории установки PHP ( /usr ).
Тогда можно ли решить сабжевую задачу ?
...
Рейтинг: 0 / 0
1 сообщений из 1, страница 1 из 1
Форумы / PHP, Perl, Python [игнор отключен] [закрыт для гостей] / php-fpm: относительный путь в include
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]