which .ini to edit

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
publicGenome
Forum Contributor
Posts: 110
Joined: Thu Apr 16, 2015 7:55 am

which .ini to edit

Post by publicGenome »

Hi Members,

I'm having a miserable time with setting up with debugger. I've PDT Eclipse. I tried with Zend, and XDebug both, to no success. In pursuit of fixing, installing, messing these I stumbled upon an article on Stackover flow, (link lost in the wonder world) on php.ini files. The poster had 2 ini, and that fixed his/her issue.

I'm really scared to mess/play with the settings on .ini file. I'm on OSX 10.9
I've one .ini file at /etc/
Until now I've been editing it, and can see result in my small web application. Example - removing comments from PDO, helps me connect to Database. :)

I've another at:
ls /usr/local/php5/lib
I've never ever played, touched, this holy file.
which php
gives me output as:
/usr/local/php5/bin/php
I had changed PHP version long back to 5.5 current which it is:
php -v
Do making changes in /etc/php.ini helps me, or should I make changes in /usr/local/php5/lib ?

Once I've this ground clear, I'd be pouring in issues with debugger installation. :(
Kindly help, and guide me.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: which .ini to edit

Post by Celauran »

Homebrew PHP?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: which .ini to edit

Post by Celauran »

Actually, check php -i

You should see the full path you need to edit.
[text][15:52][local][~/Sites/Sandbox]
% which php
/usr/local/bin/php

[15:54][local][~/Sites/Sandbox]
% php -i | grep ini
Configuration File (php.ini) Path => /usr/local/etc/php/5.6
Loaded Configuration File => /usr/local/etc/php/5.6/php.ini
Scan this dir for additional .ini files => /usr/local/etc/php/5.6/conf.d
Additional .ini files parsed => /usr/local/etc/php/5.6/conf.d/ext-imagick.ini,
/usr/local/etc/php/5.6/conf.d/ext-intl.ini,
/usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini,
/usr/local/etc/php/5.6/conf.d/ext-xdebug.ini
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini[/text]
publicGenome
Forum Contributor
Posts: 110
Joined: Thu Apr 16, 2015 7:55 am

Re: which .ini to edit

Post by publicGenome »

Hi Celauran,
Thanks much for your reply.

I ran your command, pasting top 3 lines of the output, guessing they are relevant here:
Configuration File (php.ini) Path => /usr/local/php5/lib
Loaded Configuration File => /usr/local/php5/lib/php.ini
Scan this dir for additional .ini files => /usr/local/php5/php.d
Additional .ini files parsed => /usr/local/php5/php.d/10-extension_dir.ini,
That means, the loaded one is at /usr/local/php5/lib
which is the output from which php too.
Question:
Now, do I make changes to

/usr/local/php5/lib/php.ini

?

Thanks.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: which .ini to edit

Post by Celauran »

Yes. I'd recommend also checking phpinfo() to see if CLI and Apache are using the same php.ini
publicGenome
Forum Contributor
Posts: 110
Joined: Thu Apr 16, 2015 7:55 am

Re: which .ini to edit

Post by publicGenome »

Celauran wrote:Yes. I'd recommend also checking phpinfo() to see if CLI and Apache are using the same php.ini
In phpinfo():
I see:
Configuration File (php.ini) Path
/usr/local/php5/lib
Thanks Celauran :)
Post Reply