title: php not working with php.ini file on mac os x
body: <p>I'm running a local server on my macbook (os x 10.9.2)</p>
  
  <p>I'm trying to install mcrypt and I've run into a problem that I can't add the extension to my php.ini file, because apparently my php installation doesn't use a php.ini file.</p>
  
  <p>Looking at phpinfo(), I see this:</p>
  
  <pre><code>Configuration File (php.ini) Path: /etc
  Loaded Configuration File: (none)
  </code></pre>
  
  <p>In my /etc folder, a php.ini file doesn't exist. I do have a php.ini.default, but when I make a copy of that and name it php.ini, and restart apache, PHP just stops working entirely (my php code isn't interpreted and shows up when viewing the web site's source).</p>
  
  <p>Is there something in the php.ini.default file I have to change before copying it to php.ini?</p>
  
  <p>Edit: Upon further trial and error, I have found that if I create a blank php.ini file and restart the server, PHP runs just fine. There must be an error in php.ini.default that is killing PHP on my local server. I've tried using php.ini.default~orig too and the same problem happens. Any way to find out what is wrong with the php.ini.default file? </p>
  
  <p>Edit2: Upon further random trial and error, if my php.ini only contains:</p>
  
  <pre><code>[PHP]
  short_open_tag = On
  </code></pre>
  
  <p>PHP works. If it only contains:</p>
  
  <pre><code>[PHP]
  short_open_tag = Off
  </code></pre>
  
  <p>PHP doesn't work. I'm so confused.</p>
  
  <p>Edit3: <strong>Oh!</strong> The php.ini.default file had <code>short_open_tag = Off</code>, and of course I'm using short open tags everywhere. Edit2 clued me in. Wasted half a day on this. This is so embarrassing. Everything is working now.</p>