php.ini is the configuration file used by the PHP preprocessor to setup the default settings and certain security restrictions.
Questions tagged [php.ini]
272 questions
7
votes
2 answers
Disabling PHP Deprecation Warnings and Notices
I've been using and configuring PHP, but now I'm stuck in a weird problem, so I am going to ask you guys for help.
I don't want to see Deprecation Warnings and Notices in a production server, however I would like to see other error messages, such…

stivlo
- 749
- 3
- 10
- 24
6
votes
2 answers
sed php.ini memory_limit
The following works great:
phpmemory_limit=256M #or what ever you want it set to
sed -i 's/memory_limit = 16M/memory_limit = '${phpmemory_limit}'/' /etc/php5/apache2/php.ini
If the memory_limit is set to 16M, but I've found that in some…

BassKozz
- 645
- 2
- 8
- 15
6
votes
2 answers
Why is there no php.ini file when I install PHP in a docker container?
I'm using docker-compose to setup a minimal nginx + php-fpm application but for some reason there is no php.ini file on the docker container (I know because phpinfo() says Loaded Configuration File: (none)).
Here's my docker-compose.yml file:
web:
…

skb
- 93
- 1
- 2
- 7
6
votes
1 answer
Stop reusing PHP_VALUE for different sites with PHP-FPM
I noticed the following behavior or PHP-FPM:
Take a look at these two Nginx configs:
server {
listen 80;
server_name example.com;
location / {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME …

Oleg
- 276
- 4
- 18
6
votes
1 answer
Do we need to explicitly pass php.ini's location to php-fpm?
I am seeing a strange issue where my php.ini is not used if I do not explicitly pass it to php-fpm when starting it.
This is the upstart script I am using:
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [016]
pre-start script
…

F21
- 706
- 3
- 11
- 20
6
votes
3 answers
PHP memory_limit local value does not match php.ini value
CentOS system.
Summary: changed memory_limit in master and local php.ini and yet no change in the local value for a particular virtual host.
Trying to improve performance, I set the memory_limit to 1024M in /etc/php.ini
phpinfo() shows Master and…

Buttle Butkus
- 1,741
- 8
- 33
- 45
5
votes
1 answer
Reverting PHP-CLI back to default path on Ubuntu, NGINX, HHVM
While experimenting with optimizations on my brand new LEMH (Linux, Nginx, MariaDB, HHVM) stack; I changed the PHP-CLI config to use HHVM for /usr/bin/php by using the following command:
$ sudo /usr/bin/update-alternatives --install /usr/bin/php…

Perp1exed
- 53
- 1
- 6
5
votes
3 answers
Different PHP-configs in Nginx
I have a web-server running multiple server (virtual hosts) using nginx and fastcgi passing to a unix-socket.
What I want to accomplish is a set-up with beta.example.com and live.example.com, where the live site has error_reporting turned off (but…

kd35a
- 151
- 1
- 5
5
votes
1 answer
Can we have 2 'extension_dir' in php.ini?
When I installed pdo-pgsql, the extension was installed into /usr/lib/php/extensions/no-debug-non-zts-20090626/ and thus not automatically loaded. In php.ini, I have extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626" already…

Nyxynyx
- 1,459
- 11
- 39
- 49
5
votes
1 answer
How to add a extention to the php.ini file
Hi have Centos 6 installed and busy installing wkhtmltopdf, I only have one step left and that is to include extension=phpwkhtmltox.so to the php.ini file, I added it to /etc/php.ini and reloaded apache and the extention does not take effect.
I…

Elitmiar
- 775
- 3
- 15
- 31
5
votes
4 answers
PHP date.timezone warning
I keep getting this error:
Message: date() [function.date]: It is not safe to rely on the
system's timezone settings. You are required to use the
date.timezone setting or the date_default_timezone_set() function. In
case you used any of those…

JT White
- 185
- 1
- 1
- 6
5
votes
0 answers
PHP-FPM: pm.process_idle_timeout for PM = static or dynamic
I'm working with CentOS 8 and PHP-FPM setting for PM = static or dynamic does not allow an option for pm.process_idle_timeout.
; The number of seconds after which an idle process will be killed.
; Note: Used only when pm is set to 'ondemand'
;…

Bernard K.
- 61
- 5
4
votes
1 answer
mysqli.cache_size in php.ini | how to use it?
My company has an Apache server running PHP 5.4. My task is to update it to PHP 7.4.
The old php.ini file includes a mysqli.cache_size property. I can't find any documentation on this property. Does it still exist in PHP 7? Could anyone link me to…

Mathew Alden
- 267
- 4
- 7
4
votes
3 answers
php 7 ignores ini files, but claims to load
Ubuntu 16.04, Lighty 1.4.35, PHP 7.0.4-7ubuntu2 (in a Hyper-V VM)
I browsed all (or at least many) of the other questions about php.ini.
No matter what value I set for any of the directives; ini_get returns does not necessarily return that value.…

Titus
- 261
- 3
- 7
4
votes
2 answers
PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/apc.so'
I have updated my php from 5.3.3 to 5.4.31. I have a Debian 6 Squeeze.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/apc.so' - /usr/lib/php5/20100525/apc.so: cannot open shared object file: No such file or…

user3207586
- 43
- 1
- 1
- 3