5

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?

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
  • 1
    I 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 Answers3

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
13

make php file with:

<?php
phpinfo();

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

Paul Chu
  • 1,249
  • 3
  • 19
  • 27
kuba_ceg
  • 930
  • 9
  • 16
4

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

ninean
  • 51
  • 2