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?
Asked
Active
Viewed 3.9k times
5

halfer
- 19,824
- 17
- 99
- 186

lalilulelo_1986
- 526
- 3
- 7
- 18
-
http://stackoverflow.com/questions/9343151/where-is-php-ini-in-mac-os-x-lion-thought-it-was-in-usr-local-php5-lib – Reactgular Sep 21 '13 at 13:18
-
1I posted an answer. Hope that would be helpful. Any question please feel free to comment here. Good luck. – srain Sep 21 '13 at 13:29
-
1@halfer, thank you. I knew that :). I posted last comment because there were some comments not kindly on this question, though were deleted later. – srain Sep 21 '13 at 14:21
3 Answers
54
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

srain
- 8,944
- 6
- 30
- 42
-
1
-
-
1This is the CLI one..I am search the ini which is used by Apache how to find it. In phpinfo it say /etc and there is not php.ini in /etc – user269867 Apr 28 '17 at 00:58
13
make php file with:
<?php
phpinfo();
run in the browser, then you see the path of PHP configuration files ;)
-
i know about phpinfo. there is no way to change values in this page. – lalilulelo_1986 Sep 21 '13 at 13:27
-
1
-
This doesn't work for me b/c I use MAMP so the browser uses the PHP executable provided by MAMP and the Mac Terminal uses the one provided by the OS. – zkent Sep 29 '16 at 19:13