Page 1 of 1

which .ini to edit

Posted: Fri Oct 23, 2015 2:05 pm
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.

Re: which .ini to edit

Posted: Fri Oct 23, 2015 2:54 pm
by Celauran
Homebrew PHP?

Re: which .ini to edit

Posted: Fri Oct 23, 2015 2:57 pm
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]

Re: which .ini to edit

Posted: Fri Oct 23, 2015 3:14 pm
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.

Re: which .ini to edit

Posted: Fri Oct 23, 2015 4:14 pm
by Celauran
Yes. I'd recommend also checking phpinfo() to see if CLI and Apache are using the same php.ini

Re: which .ini to edit

Posted: Mon Oct 26, 2015 7:14 am
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 :)