Php.ini production vs development

I’m using XAMPP to develop on my localhost. I would like to remove the PHP notices and keep only the warnings. I know this is done through the php.ini file, however I’m having trouble locating it. I followed the path in phpinfo() and it led me to /xampp/php. Inside this folder are two php.ini files: one for production and one for development. I have set them both to the error reporting level I’d like, however I still receive notices which makes me believe that neither of these actually control error reporting. I’m using the latest version of XAMPP. So I guess my question is where is the true php.ini and what are these two other versions?

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

As of PHP 7 the regular php.ini file was removed and added with php.ini-production and php.ini-devlopment. In PHP’s installation text file they state, “We advise you to use php.ini-production, because we optimized the default settings in this file for performance, and security.”

So in short use the php.ini-production

Solution 2

First, make sure you’re editing php.ini, not php-development.ini or php-production.ini or anything BUT php.ini. After that, ensure you restart your Apache server or your changes won’t take effect.

Also, check out ini_set for setting ini values at runtime.

Solution 3

I had this confusion, in my computer, the php.ini file didn’t appear with the .ini extension name visible – it was just php , and in the type column, it has the value ‘configuration settings’

Solution 4

php.ini.development and php.ini.production are entirely different from php.ini.
the problem is that in the php folder the required php.ini is not marked along with its extension ( .php). Only php is written.Check the properties of the file ‘php‘ of “*configuration settings*” must be .ini,This is the exact file which manages error reporting.

Solution 5

I downloaded php-8.1.0 from official website. php.ini or configuration settings file is not present in it. Instead it has been replaced by two files i.e. php.ini-development and php.ini-production.

My requirement was to edit the php.ini file in order to enable pgsql extension. Alas! there were not one but two .ini files. Being new to php, I made changes to both the files but it didn’t worked.

After doing some research, I came to know that in the recent versions of php (not sure from which), user is provided with two .ini files. As name suggests, php.ini-development contains settings suitable for development environment and php.ini-production contains settings suitable for production environment. As per your requirement, you need take backup of anyone of the file and rename that file to php.ini. In this file you will need make required changes for your php environment.

If you compare the two files using tools such as diff-merge, you will get more in-depth understanding.

Solution 6

In XAMPP version 1.8.1 php.ini file located at \xampp\php\php.ini modify line 922 upload_max_filesize = 2M
Note: 2M means 2MB, so change to 10M for 10MB file upload. Also note that php.ini-development and php.ini-production are different files from php.ini.

Solution 7

My issue is that I was editing the php.ini-production and overlooked the standard php.ini file.

I edited the php.ini file by adding extension=php_odbc.dll and it fixed the error.

Solution 8

PHP 5.3.0 has significantly improved performance and parsing of INI files, and adds several new syntax features.

The standard php.ini files have been re-organized and renamed. php.ini-development contains settings recommended for use in development environments. php.ini-production contains settings recommended for use in production environments

Solution 9

The PHP.ini file is still there, only it doesn’t include the extension .ini, the extension has been removed. You will notice two file name php, one is application file another is configuration setting when you open configuration setting in notepad you will notice that it has ini extension. so the php configuration file is ini file.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply