php.ini is the configuration file used by the PHP preprocessor to setup the default settings and certain security restrictions.
Questions tagged [php.ini]
268 questions
4
votes
3 answers
Hide STRICT errors on PHP 5.4
I've upgraded from PHP 5.3 to PHP 5.4 today. Now my script is displaying a lot of error messages. How to hide them without using error_reporting(0); inside php file ?
I use this:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
![](../../users/profiles/109515.webp)
Spacedust
- 558
- 5
- 12
- 28
4
votes
5 answers
Can't get PHP to stop showing errors
Contrary to most people's problem I cannot get PHP to stop showing errors, I have in my php.ini display_errors set to off but it still shows them, I have also tried .htaccess, and inline ini_set and error_reporting variables but the errors still…
![](../../users/profiles/93602.webp)
unknowndomain
- 168
- 8
4
votes
1 answer
Store session files in different directories in PHP
I have several sites hosted on the same server, in different directories (e.g: server.com/site_one, server.com/site_two) and I want to store the session files for each site in a different directory.
How do I do that?
Thanks!
![](../../users/profiles/53979.webp)
Alex
- 217
- 3
- 10
4
votes
2 answers
How can I override global PHP.INI settings on shared hosting?
I have sharring hosting account on Linux Apache PHP with JustHost.
In my account exists a global php.ini that only admin of hosting company can access.
My problem is that when I run php script the warnings + errors printed on webpage.
So I create…
![](../../users/profiles/43353.webp)
Ben
- 765
- 4
- 8
- 17
4
votes
4 answers
error in php not logging or displaying
I can not get any errors to display on screen on write to a log file. When check phpinfo() print out I have same value of master a local for
display_errors On
display_startup_errors On
error_log /var/log/php.log
error_reporting E_ALL &…
![](../../users/profiles/46326.webp)
Grant M
- 161
- 1
- 1
- 4
4
votes
4 answers
Do I have to recompile php to enable GD Library?
I have a GD library on my server installed and 'enabled' but under the Configure Command in php.info it says
"--without-gd"
Is there a way to enable it through root or do I have to recompile?
EDIT: This is what it shows below under "GD"
GD…
![](../../users/profiles/40686.webp)
Matt Nathanson
- 41
- 1
- 3
3
votes
3 answers
PHP sessions directory keeps filling until overflowing
I have a problem with my PHP session data folder. It seems to not be expiring sessions and has hit some sort of limit, presumably the filesystem limit for files in a directory. Requests that involve writing sessions fail with fatal error due to not…
![](../../users/profiles/401055.webp)
Tony H
- 133
- 1
- 4
3
votes
4 answers
Does PHP cgi have its own set of .ini files that differ from PHP cli?
The server is:
CentOS Linux release 7.4.1708 (Core) , 3.10.0-693.5.2.el7.x86_64
PHP 5.4.16 (cli) (built: Nov 15 2017 16:33:54)
I wasn't able to get PHP SOAP to work without an error from web pages, although the test I did worked fine at the…
![](../../users/profiles/180491.webp)
Edward_178118
- 895
- 4
- 14
- 30
3
votes
0 answers
php_value overrides with Apache using a front controller
I am trying to set specific server side value for virtual paths used to upload files.
All my URLs are virtual and requested are dispatched by a front controller. I have the following config in my site's only .htaccess file:
…
![](../../users/profiles/306347.webp)
Nicolas Bouvrette
- 211
- 1
- 2
- 9
3
votes
2 answers
php session.save.path that is not from my ini file
I have set up a custom php.ini for a dev site (the production site will eventually be on the same server) - it sets the session.save path to a directory specific to the site.
You can see the result at https://dev.permaculture.org.nz/info1.php (will…
![](../../users/profiles/317992.webp)
Richard Grevers
- 167
- 1
- 12
3
votes
1 answer
Changing session.save_path in php.ini not working
Fedora 25 + PHP 7 + Apache 2.4.23
Hello, after I change session.save_path in php.ini and restart apache, I can successfully verify that it's modified with:
$ php -i | grep session.save_path
However, in the html/php pages themselves, the sessions are…
![](../../users/profiles/751175.webp)
synkro
- 213
- 1
- 2
- 8
3
votes
1 answer
php.ini not being loaded
I have been trying to configure my Apache server all day, however I am having major issues with getting a php.ini file to be loaded.
When I try to connect to my database I get this error:
Call to undefined function mysql_connect()
After getting…
![](../../users/profiles/352534.webp)
Lain
- 131
- 1
- 1
- 4
3
votes
1 answer
Enforce loading of php.ini files from current folder
My goal is to increase the maximum file size for uploads in WordPress. I have followed the steps on this SE answer and this tutorial (except the .htaccess part, because it's runnning nginx and AFAIK nginx ignores .htaccess files), to no avail. Looks…
![](../../users/profiles/145134.webp)
That Brazilian Guy
- 229
- 1
- 15
3
votes
4 answers
PHP Errors are not stored on CentOS Server
I just adjusted the php.ini on my CentOS 64 Bits VPS in /etc/php.ini to log PHP errors:
cat /etc/php.ini | grep php-errors.log
error_log = /var/log/php-errors.log
I also have log_errors = on
I created the log file in /var/log/ and it is CHMOD 644.…
![](../../users/profiles/101547.webp)
rhand
- 264
- 2
- 5
- 22
3
votes
1 answer
APCu and APC setting unclear
Please help me to understand where is difference between APC and APCu lies. While inspecting CentOS web-server (set up not by me) found that it has APCu 4.0.2 installed and phpinfo(); reports that APC Emulated.
It was bit confusing, anyway tried to…
![](../../users/profiles/169838.webp)
Demontager
- 73
- 1
- 2
- 8