jiveturkey420 Posted July 18, 2012 Share Posted July 18, 2012 Hey! I'm new to PHP so bear with me please. =) I'm running a LAMP server on my Fedora 17 system. I am looking to modify my PHP.ini file to change the error reporting and possible the timezone settings. I opened a terminal and ran "whereis php.ini" and the output was this...... php: /bin/php /usr/bin/php /etc/php.ini /etc/php.d /lib/php /usr/lib/php /usr/share/php /usr/share/man/man1/php.1.gz Which on is the php.ini file I have to edit? How will I set up the error reporting so it'll help me debug. Thanks for any help guys! Quote Link to comment Share on other sites More sharing options...
Jessica Posted July 18, 2012 Share Posted July 18, 2012 I personally just use error_reporting & ini_set. What I would do to figure out which one it is, create a .php file with an error, and change one of the .ini files. Run the .php file and if there's not an error, change the next .ini on the list. Repeat. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted July 19, 2012 Share Posted July 19, 2012 phpinfo() will tell which .ini file is loaded. Setting error reporting at runtime is ok, but will not report fatal parse errors. Quote Link to comment Share on other sites More sharing options...
xyph Posted July 19, 2012 Share Posted July 19, 2012 I personally just use error_reporting & ini_set. What I would do to figure out which one it is, create a .php file with an error, and change one of the .ini files. Run the .php file and if there's not an error, change the next .ini on the list. Repeat. There's no replacement for setting it directly in the ini. Development should always be all on, production should always be reporting all, displaying none but logging to file. Pikachu beat me to it. Quote Link to comment Share on other sites More sharing options...
Doug G Posted July 21, 2012 Share Posted July 21, 2012 Fedora uses modular php.ini files located in /etc/php,d/ These configuration modules are included by the primary php.ini The main php.ini file is in /etc When I need to make a change to any php.ini settings in fedora I try real hard to edit or create an ini module and not edit /etc/php.ini PS - I'm using fedora 16 but I suspect the php config files are the same in fedora 17. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.