Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't find php.ini file on Mac? [duplicate]

Tags:

php

I need to set upload_tmp_dir directive on my PHP server. I've read that there is a php.ini file which I can specify. But I can't find any php.ini files on my Mac. I'm using OSX 10.8. Any suggestions?

like image 299
lalilulelo_1986 Avatar asked Sep 21 '13 13:09

lalilulelo_1986


People also ask

Where is the location of PHP ini?

user. 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. This file is located on your server in the /public_html folder.

Where is PHP ini xampp Mac?

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'. Note: Other versions of this file are php. ini-development and php.


3 Answers

Run the command below on your server:

php -i | grep php.ini       

then you can see something like below:

Configuration File (php.ini) Path => /usr/local/php/etc
Loaded Configuration File => /usr/local/etc/php54/php.ini
like image 119
srain Avatar answered Oct 18 '22 21:10

srain


make php file with:

<?php
phpinfo();

run in the browser, then you see the path of PHP configuration files ;)

like image 40
kuba_ceg Avatar answered Oct 18 '22 20:10

kuba_ceg


if you use the mac os default install php ,the php.ini at /etc/php.ini

like image 4
ninean Avatar answered Oct 18 '22 21:10

ninean