[nycphp-talk] Advice on setting for testing server
ajai at bitblit.net
Sun Aug 23 11:41:38 EDT 2009
On Sun, 23 Aug 2009, lists at nopersonal.info wrote:
> At present, aside form having set passwords I'm still using the default
> config files that were installed with Apache 2.2.11, PHP 5.26, MySQL
> 5.0.75, and phpMyAdmin 3.1.2. I'd like to turn off things that are
> commonly disabled in shared hosting environments so that I don't
> inadvertently use something that's not going to work on a production
> server over which I have little or no control.
> Do any of you have recommendations on configuration settings to use?
Most of these packages come with pretty sensible config settings so I
probably would *not* mess with them without knowing the consequences.
> Which packages/extensions/modules should be installed/enabled?
That kind of depends on what software you're writing dont you think? Some
frameworks will need additional extensions and tweaks to Apache so there
is no simple fits-all rule. The other thing to consider is that any
changes you make should be easy to maintain and put back after a software
update. (In the case of Apache I tend to leave the main config alone since
any changes will likely be overwritten when the software is updated). IIRC
Ubuntu has something like a sites-enabled/sites-available folder where you
can put vhost files (one per vhost is good practice). I usually create a
file called ALL that contains any global config tweaks.
> Should I go ahead and turn off error reporting and enable it via my
> scripts, or should I leave it on all the time? If I should leave it on,
> at what level should I set it? E_ALL?
If you're using a framework it might already do all that for you and maybe
provide its own config file for you to tweak that in.
> Are there any other settings or extensions that might be helpful someone
> like me who's still prone to making rookie mistakes?
Firebug is good on the browser side (also look at the Web Developer
Toolbar and the YSlow extension for Firebug). On the server side look at
FirePHP and Xdebug extensions for PHP.
> Would it be a good idea to use one php.ini file while I'm writing &
> debugging my code, and then a second one for testing immediately prior
> to moving to a production server? If so, how should they differ?
Again, I personally would not mess with it too much unless there is a very
good reason. All the caveats about maintenanced and updates apply there
too. Some frameworks might need a few tweaks though but cross that bridge
when you get to it.
> Would this be a good time to learn how to use CVS or Subversion?
All developers should be using version control. Subversion is very popular
but Git is also becoming so these days.
More information about the talk