Where Can I find the php.ini File?

Hello,

Quick question: I am running Mandrake 9.1 large but can't seem to find the php.ini file to make changes. Can someone point out where it would have been installed by default with my OS image?

Thanks.

7 Replies

@mlarrabee:

can't seem to find the php.ini file to make changes. Can someone point out where it would have been installed by default
/etc/php.ini on a Mandrake box here at home.

That's what I thought but it doesn't exist there on my Linode, but PHP still works.

locate php.ini

I've seen a few distros put it with the other apache conf files.

Built up the locate database and ran it looking for the file but it still didn't find it…odd.

Search results:

[root@localhost share]# locate php.ini
/usr/share/doc/libphp_common430-430/php.ini-recommended
/usr/share/doc/libphp_common430-430/php.ini-dist
[root@localhost share]#

Yet php is running because I can run php pages through Apache2 and they work fine.

@mlarrabee:

Built up the locate database and ran it looking for the file but it still didn't find it…odd.
Then do as root

find . -name php.ini

Well, if you can still run PHP, write a phpinfo() script, and the first info block will tell you what php.ini file it's using.

For instance, I've got Gentoo running with php installed as a module, and the default location for me is: /etc/php/apache2-php4/php.ini

To get /etc/php.ini on Mandrake, you need to install the php-ini package. Otherwise, by default, PHP on Mandrake is set up to use /etc/php/ as a directory containing many different INI files, which it uses in addition to /etc/php.ini, but it does also use /etc/php.ini as well.

Hope this helps. :)

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