Pikachu2000 wrote:My hosting company, by default, has display_errors set to On. Obviously, I don't want that on a production site.
No one should want that... makes me wonder about the competency of your hosting provider. :o
Pikachu2000 wrote:I can create a local php.ini file and upload it, but my understanding is it would not be effective unless the process was restarted, is that correct?
That's unlikely, since you presumably don't have access to restart the web server daemon (or is this a VPS/managed server solution and you do, in fact, have access?).
I'm using Mediatemple, for example, and any chance in my php.ini file I make is reflected on a phpinfo() readout immediately.
Pikachu2000 wrote:Would it be better to use an ini_set() directive in the scripts that are called? If so, does it need to be in every script, even those that are included by other scripts, or does it just need to be in the first script called?
Think of including files as doing nothing more than copying-and-pasting the code from the included' script directly into the parent script (with a couple considerations, such as the PHP parser dropping into HTML mode as well as the fact that the included script gets included at the global scope level, even if you run include() inside of a function). In other words: only the parent script (the one that's doing the include()'ing) would need to set the directive.
However...
Pikachu2000 wrote:Would it be better to use an ini_set() directive in the scripts that are called?
No, it wouldn't. While you could setup PHP to automatically include a file that calls [man]ini_set/man every time a PHP script is parsed, I still think it would be better to make this change in the php.ini file.
If you had a parse error, for example, then the ini_set() would never be executed and PHP would display the error to the user (rather than logging it for later review, which I'm assuming you're planning on doing... right? 😉).