Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing php.ini: Loaded Configuration File (none) #145

Closed
zablik opened this issue May 31, 2021 · 1 comment
Closed

Missing php.ini: Loaded Configuration File (none) #145

zablik opened this issue May 31, 2021 · 1 comment

Comments

@zablik
Copy link

zablik commented May 31, 2021

Hi,

My application works well, but when I tried to set up XDebug I faced the issue, that PHP is missing php.ini.
There are php.ini-development and php.ini-production in /usr/local/etc/php/, but the are not used.

What should I do to make php.ini loaded and set up XDebug?

Screenshot 2021-05-31 at 11 03 13

Screenshot 2021-05-31 at 12 09 36

@csandanov
Copy link
Member

We were following the approach of the base image (official docker php) by using default vanilla values and customizing them via fpm config and conf.d/php.ini. However, I agree that using production version of php.ini might be a better option. We're now using php.ini-production that comes with the code as the default php.ini. There's almost no difference with the exception that a global variable $_ENV is no longer available though you still can use getenv.

Just in case, I'm attaching a diff between the old (vanilla defaults) and production ini changes:

$ diff old.ini new.ini                                                                                                                                   [20:09:56]
4c4
< System => Linux d5206a1d4fd9 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64
---
> System => Linux 256c48ef6f49 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64
11c11
< Loaded Configuration File => (none)
---
> Loaded Configuration File => /usr/local/etc/php/php.ini
93c93
< Build Date => May 27 2021 04:17:52
---
> Build Date => May 31 2021 12:47:50
157c157
< enable_dl => On => On
---
> enable_dl => Off => Off
202c202
< request_order => no value => no value
---
> request_order => GP => GP
219c219
< variables_order => EGPCS => EGPCS
---
> variables_order => GPCS => GPCS
225,226c225,226
< zend.exception_ignore_args => Off => Off
< zend.exception_string_param_max_len => 15 => 15
---
> zend.exception_ignore_args => On => On
> zend.exception_string_param_max_len => 0 => 0
741c741
< build date => May 27 2021 04:35:25
---
> build date => May 31 2021 13:03:56
916c916
< tidy.clean_output => 0 => 0
---
> tidy.clean_output => no value => no value
1062,1063c1062,1063
< PHP_EXTRA_CONFIGURE_ARGS => --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
< HOSTNAME => d5206a1d4fd9
---
> HOSTNAME => 256c48ef6f49
> PHP_VERSION => 8.0.6
1065,1066c1065,1069
< SHLVL => 2
< HOME => /home/wodby
---
> GPG_KEYS => 1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F
> PHP_LDFLAGS => -Wl,-O1 -pie
> ENV => /home/wodby/.shrc
> PWD => /var/www/html
> LD_PRELOAD => /usr/lib/preloadable_libiconv.so php
1067a1071,1075
> HOME => /home/wodby
> PHP_DEV =>
> PHP_SHA256 => e9871d3b6c391fe9e89f86f6334852dcc10eeaaa8d5565beb8436e7f0cf30e20
> GIT_USER_NAME => wodby
> PHPIZE_DEPS => autoconf 		dpkg-dev dpkg 		file 		g++ 		gcc 		libc-dev 		make 		pkgconf 		re2c
1069,1071d1076
< SSHD_HOST_KEYS_DIR => /etc/ssh
< PS1 => \[email protected]:\w $
< PHP_LDFLAGS => -Wl,-O1 -pie
1073,1076c1078,1082
< ENV => /home/wodby/.shrc
< PHP_CFLAGS => -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
< PHP_VERSION => 8.0.6
< GPG_KEYS => 1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F
---
> TERM => xterm
> PHP_URL => https://www.php.net/distributions/php-8.0.6.tar.xz
> PHP_VER_MINOR => 8.0
> PHP_EXTRA_CONFIGURE_ARGS => --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
> SHLVL => 2
1077a1084,1086
> PHP_CFLAGS => -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> PS1 => \[email protected]:\w $
> PATH => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/wodby/.composer/vendor/bin:/var/www/html/vendor/bin:/var/www/html/bin
1078a1088
> SSHD_HOST_KEYS_DIR => /etc/ssh
1080,1089c1090
< GIT_USER_NAME => wodby
< PHP_URL => https://www.php.net/distributions/php-8.0.6.tar.xz
< TERM => xterm
< PATH => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/wodby/.composer/vendor/bin:/var/www/html/vendor/bin:/var/www/html/bin
< LD_PRELOAD => /usr/lib/preloadable_libiconv.so php
< PHP_VER_MINOR => 8.0
< PWD => /var/www/html
< PHPIZE_DEPS => autoconf 		dpkg-dev dpkg 		file 		g++ 		gcc 		libc-dev 		make 		pkgconf 		re2c
< PHP_SHA256 => e9871d3b6c391fe9e89f86f6334852dcc10eeaaa8d5565beb8436e7f0cf30e20
< PHP_DEV =>
---
> _ => /usr/local/bin/php
1094,1095c1095,1096
< $_SERVER['PHP_EXTRA_CONFIGURE_ARGS'] => --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
< $_SERVER['HOSTNAME'] => d5206a1d4fd9
---
> $_SERVER['HOSTNAME'] => 256c48ef6f49
> $_SERVER['PHP_VERSION'] => 8.0.6
1097,1098c1098,1102
< $_SERVER['SHLVL'] => 2
< $_SERVER['HOME'] => /home/wodby
---
> $_SERVER['GPG_KEYS'] => 1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F
> $_SERVER['PHP_LDFLAGS'] => -Wl,-O1 -pie
> $_SERVER['ENV'] => /home/wodby/.shrc
> $_SERVER['PWD'] => /var/www/html
> $_SERVER['LD_PRELOAD'] => /usr/lib/preloadable_libiconv.so php
1099a1104,1108
> $_SERVER['HOME'] => /home/wodby
> $_SERVER['PHP_DEV'] =>
> $_SERVER['PHP_SHA256'] => e9871d3b6c391fe9e89f86f6334852dcc10eeaaa8d5565beb8436e7f0cf30e20
> $_SERVER['GIT_USER_NAME'] => wodby
> $_SERVER['PHPIZE_DEPS'] => autoconf 		dpkg-dev dpkg 		file 		g++ 		gcc 		libc-dev 		make 		pkgconf 		re2c
1101,1103d1109
< $_SERVER['SSHD_HOST_KEYS_DIR'] => /etc/ssh
< $_SERVER['PS1'] => \[email protected]:\w $
< $_SERVER['PHP_LDFLAGS'] => -Wl,-O1 -pie
1105,1108c1111,1115
< $_SERVER['ENV'] => /home/wodby/.shrc
< $_SERVER['PHP_CFLAGS'] => -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
< $_SERVER['PHP_VERSION'] => 8.0.6
< $_SERVER['GPG_KEYS'] => 1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F
---
> $_SERVER['TERM'] => xterm
> $_SERVER['PHP_URL'] => https://www.php.net/distributions/php-8.0.6.tar.xz
> $_SERVER['PHP_VER_MINOR'] => 8.0
> $_SERVER['PHP_EXTRA_CONFIGURE_ARGS'] => --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
> $_SERVER['SHLVL'] => 2
1109a1117,1119
> $_SERVER['PHP_CFLAGS'] => -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> $_SERVER['PS1'] => \[email protected]:\w $
> $_SERVER['PATH'] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/wodby/.composer/vendor/bin:/var/www/html/vendor/bin:/var/www/html/bin
1110a1121
> $_SERVER['SSHD_HOST_KEYS_DIR'] => /etc/ssh
1112,1121c1123
< $_SERVER['GIT_USER_NAME'] => wodby
< $_SERVER['PHP_URL'] => https://www.php.net/distributions/php-8.0.6.tar.xz
< $_SERVER['TERM'] => xterm
< $_SERVER['PATH'] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/wodby/.composer/vendor/bin:/var/www/html/vendor/bin:/var/www/html/bin
< $_SERVER['LD_PRELOAD'] => /usr/lib/preloadable_libiconv.so php
< $_SERVER['PHP_VER_MINOR'] => 8.0
< $_SERVER['PWD'] => /var/www/html
< $_SERVER['PHPIZE_DEPS'] => autoconf 		dpkg-dev dpkg 		file 		g++ 		gcc 		libc-dev 		make 		pkgconf 		re2c
< $_SERVER['PHP_SHA256'] => e9871d3b6c391fe9e89f86f6334852dcc10eeaaa8d5565beb8436e7f0cf30e20
< $_SERVER['PHP_DEV'] =>
---
> $_SERVER['_'] => /usr/local/bin/php
1127,1128c1129,1130
< $_SERVER['REQUEST_TIME_FLOAT'] => 1622466572.6791
< $_SERVER['REQUEST_TIME'] => 1622466572
---
> $_SERVER['REQUEST_TIME_FLOAT'] => 1622466509.8822
> $_SERVER['REQUEST_TIME'] => 1622466509
1134,1161d1135
< $_ENV['PHP_EXTRA_CONFIGURE_ARGS'] => --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
< $_ENV['HOSTNAME'] => d5206a1d4fd9
< $_ENV['PHP_INI_DIR'] => /usr/local/etc/php
< $_ENV['SHLVL'] => 2
< $_ENV['HOME'] => /home/wodby
< $_ENV['CONF_DIR'] => /var/www/conf
< $_ENV['APP_ROOT'] => /var/www/html
< $_ENV['SSHD_HOST_KEYS_DIR'] => /etc/ssh
< $_ENV['PS1'] => \[email protected]:\w $
< $_ENV['PHP_LDFLAGS'] => -Wl,-O1 -pie
< $_ENV['GIT_USER_EMAIL'] => [email protected]
< $_ENV['ENV'] => /home/wodby/.shrc
< $_ENV['PHP_CFLAGS'] => -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
< $_ENV['PHP_VERSION'] => 8.0.6
< $_ENV['GPG_KEYS'] => 1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F
< $_ENV['FILES_DIR'] => /mnt/files
< $_ENV['PHP_ASC_URL'] => https://www.php.net/distributions/php-8.0.6.tar.xz.asc
< $_ENV['PHP_CPPFLAGS'] => -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
< $_ENV['GIT_USER_NAME'] => wodby
< $_ENV['PHP_URL'] => https://www.php.net/distributions/php-8.0.6.tar.xz
< $_ENV['TERM'] => xterm
< $_ENV['PATH'] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/wodby/.composer/vendor/bin:/var/www/html/vendor/bin:/var/www/html/bin
< $_ENV['LD_PRELOAD'] => /usr/lib/preloadable_libiconv.so php
< $_ENV['PHP_VER_MINOR'] => 8.0
< $_ENV['PWD'] => /var/www/html
< $_ENV['PHPIZE_DEPS'] => autoconf 		dpkg-dev dpkg 		file 		g++ 		gcc 		libc-dev 		make 		pkgconf 		re2c
< $_ENV['PHP_SHA256'] => e9871d3b6c391fe9e89f86f6334852dcc10eeaaa8d5565beb8436e7f0cf30e20
< $_ENV['PHP_DEV'] =>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants