Questions tagged [php.ini]

php.ini is the configuration file used by the PHP preprocessor to setup the default settings and certain security restrictions.

272 questions
4
votes
1 answer

Restrict Overriding memory_limit in php.ini

We have a issue that just came to our notice, some of our developers used ini_set('memory_limit', -1) to over-ride the php.ini memory_limit settings in their code files. Due to which sometimes our Memory/CPU usage is way far more than usual and we…
Rohit Batra
  • 143
  • 4
4
votes
1 answer

Is there an equivalent to Debian's cli/php.ini on Redhat?

How do you configure the command line version of PHP to have different settings on a Redhat system? On Debian based systems, php has a separate command-line version config file: /etc/php5/cli. On Redhat, there's /etc/php.ini and various additional…
Zxaos
  • 496
  • 3
  • 6
  • 18
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
Spacedust
  • 568
  • 5
  • 13
  • 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…
unknowndomain
  • 168
  • 1
  • 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!
Alex
  • 217
  • 4
  • 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…
Ben
  • 775
  • 4
  • 9
  • 19
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 &…
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…
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…
Tony H
  • 133
  • 1
  • 1
  • 4
3
votes
1 answer

Why is PHP max_input_vars setting needed?

I have a bit weird question. Why is PHP setting max_input_vars needed? PHP has a memory limit. So even if somebody sends 10M variables, the request will be terminated because of memory shortage. What are the risks of setting max_input_vars to…
Alex
  • 133
  • 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…
Edward_178118
  • 955
  • 4
  • 15
  • 33
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:
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…
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…
synkro
  • 223
  • 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…
Lain
  • 131
  • 1
  • 1
  • 4
1 2
3
18 19