php.ini

So I've switched from using the standard PHP supplied with Ubuntu to one which I have compiled myself. The only problem is it does not come with a pre-existing php.ini file so I am unsure where to put it. I've installed PHP into /opt/php and php-fpm.conf lives in /opt/php/etc so is that where I should put the php.ini file for global configuration options? I need to load APC and set a couple of other options.

Thanks :).

2 Replies

Is PHP working? If so, you can output phpinfo() to a page and it will tell you where it expects to find the .ini file in the configuration listing.

For future reference if anyone looks at this thread the php.ini file goes in the /lib folder of the prefix you used when compiling by hand. So for example I used –prefix=/opt/php when compiling so the php.ini goes in /opt/php/lib/php.ini.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct