NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHundamentals Topic #4: php.ini settings

John Lacey jlacey at att.net
Wed Nov 12 16:19:18 EST 2003


well, for one, error_reporting should ideally be set for "all errors" 
(E_ALL)

But when using someone else's code, Notices (E_NOTICE) may have to be 
turned off.  If not, you may get lots of "benign" Notices being thrown 
because the programmer was not careful to code using good practices. 
(e.g. testing a variable when it was never set or reset should throw a 
Notice).

Also, there are times when you might want to have display_errors set to 
"On" when developing, but turned off when the site goes live site so the 
user doesn't get nebulous error messages that they can't do anything 
about anyway.  Logging to a file is recommended.

When needing to do File Uploads, upload_max_filesize defautlts to 2M. 
Handling large [graphic] files may be a problem if this is too low.

It is best to code with the short_open tags set to "Off", and use <?php 
in all cases, but again, if using someone else's code, they may have to 
remain on.  This option will be defaulted to "Off" in a future release, 
I believe.

Session save path differences between Linux/Unix and Windows boxen
(/tmp vs. c:\temp) or whereever you choose to save session info. 
Whether session cookies will be used, or not for some.

A segment on magic quotes meaning and usage is essential.  Perhaps 
someone can volunteer that one.

The usual info about register_globals, max_execution_time caveats, 
working with output_buffering enabled, needs to be included.


There are no doubt other goodies, but these are the ones that come 
quickly to mind.


John







More information about the talk mailing list