Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.3: Where to find and edit the php.ini file' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Where to find and edit the php.ini file
Authored by: vorovsky on Nov 12, '03 02:41:42PM

Its always a good idea to keep register_globals turned off if possible. Just as in C/C++ programming, making every variable a global variable just for the sake of being easy is poor programming practice and can lead to some very serious security flaws.

Also, anyone familiar with *nix should know that to locate any file, just use:

find / | grep "php.ini"

and it'll search through the drive and give you a list of results.



[ Reply to This | # ]
10.3: Where to find and edit the php.ini file
Authored by: fds on Nov 12, '03 05:53:28PM
Note that in my experience Panther does not install a php.ini anywhere. PHP is just configured to look for it in /etc, but no customized or sample php.ini ends up there on its own; so PHP as it ships with Panther simply gets initialized with all the default options.

As such searching for the non-existant file isn't particularly helpful.

Since the CLI version gets installed, the easiest way is probably to extract the path from the phpini output, as it's already noted above:


php -i | grep php.ini
Theoretically of course it's perfectly possible to have the Apache SAPI copy of the PHP interpreter and the CLI version point to different php.ini paths, so it's not a bad idea checking the phpinfo() output via a web browser.

[ Reply to This | # ]
Sample file was installed...
Authored by: robg on Nov 13, '03 10:11:26AM

On my clean install of 10.3, I wound up with php.ini.default in /etc, and I know I didn't put it there!

-rob.



[ Reply to This | # ]
Sample file was installed...
Authored by: TvE on Nov 13, '03 11:52:20AM

It's probably because a lot of people asked "where IS that php.ini" in previous versions of X" and it took them a long time to realise that they had to create (copy) it themselves...



[ Reply to This | # ]
10.3: Where to find and edit the php.ini file
Authored by: mark242 on Nov 12, '03 05:54:15PM

Horribly inefficient.

Run this command from the terminal:

sudo find / -name php.ini -print

That will only spit out files called "php.ini". Your grep will spit out files that contain php.ini in them.



[ Reply to This | # ]
10.3: Where to find and edit the php.ini file
Authored by: nayr on Nov 13, '03 12:17:32AM

Horribly inefficient.

locate php.ini



[ Reply to This | # ]