I am using xampp
server for PHP
development and want to edit the php.ini
file; where can I locate it?
ini file: Whenever we install PHP, we can locate the configuration file inside the PHP folder. If using xampp, we can find the configuration file in one or many versions, inside the path '\xampp\php'.
In XAMPP (Windows), the php. ini file is in the C:\xampp\php folder. In XAMPP (Mac OSX), the php. ini file is in the /Applications/XAMPP/xamppfiles/etc folder.
In Windows Explorer, open your PHP installation folder, for example C:\PHP . In a text editor, open the php. ini file.
For Windows, you can find the file in the C:\xampp\php\php.ini
-Folder (Windows) or in the etc
-Folder (within the xampp-Folder).
Under Linux, most distributions put lampp under /opt/lampp
, so the file can be found under /opt/lampp/etc/php.ini
.
It can be edited using a normal Text-Editor.
Clarification:
Xampp
(X (for "some OS"), Apache, MySQL, Perl, PHP)Lampp
(Linux, Apache, MySQL, Perl, PHP)in this context, they can be substituted for one another.
Write the following inside phpini_path.php
( or AnyNameAsYouLike.php
) and run it in the browser.
<?php phpinfo();?>
Among various other parameters you'll get Loaded Configuration File
parameter which value is the path of php.ini
on the server.
The location of php.ini
depends on server operating system:
Windows (With Xampp Installation):
/xampp/php/php.ini
macOS, OS X:
/private/etc/php.ini
Linux:
/etc/php.ini /usr/bin/php5/bin/php.ini /etc/php/php.ini /etc/php5/apache2/php.ini
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With