Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what happens if php.ini is missing?

Tags:

php

What happens if php.ini is missing? Does PHP load with a default configuration? In phpinfo(), it says the configuration file path is /etc, however it also says Loaded Configuration File (none). I went into /etc, and noticed there is no php.ini, only php.ini.default. PHP is working though, so I'm guessing it must load with default settings. Can anybody confirm this for me?

like image 796
LeTanc Avatar asked Oct 18 '10 19:10

LeTanc


People also ask

Do I need a php ini file?

ini file is a special file for PHP. It is where you declare changes to your PHP settings. The server is already configured with standard settings for PHP, which your site will use by default. Unless you need to change one or more settings, there is no need to create or modify a php.

Can not find php ini file?

Try using the command php --ini . Since you're running command line, it won't necessarily show you the config files you may be looking for (apache, nginx, etc), but it will hopefully get you on the right path.

What is the purpose of php ini file?

The php. ini file is the default configuration file for running applications that require PHP. It is used to control variables such as upload sizes, file timeouts, and resource limits.

How do I restore a php ini file?

You can restore the global php. ini file for your account or the main php. ini files of subdomains to default by using the Restore to default button from the hosting Control Panel -> PHP Settings section.


1 Answers

PHP has what amounts to a php.ini compiled into it. The php.ini file on the system is there merely to override those pre-compiled defaults. If there's no php.ini, the compile-time values are in charge.

like image 75
Marc B Avatar answered Sep 30 '22 23:09

Marc B