NYCPHP Meetup

NYPHP.org

[nycphp-talk] Advice on setting for testing server

Mark Armendariz lists at enobrev.com
Sun Aug 23 10:44:34 EDT 2009


>> 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?
>
> For a test server I'd say set it to E_ALL. You may get annoyed at times with
> messages, but better you get annoyed than someone else later.
>

As a test server, errors can show site wide.  Personally, I stick with
E_ALL | E_STRICT, which can sometimes help with the "rookiemistakes"

>> 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?
>
> I'm not the typicaly PHP developer, but I'd think you want your test (and
> development?) sytem and production system to be configured the same. What
> purpose is there when you test on configuration A when in the end your
> production system uses configuration B?

Besides error reporting, I could not agree more.

>
>> Would this be a good time to learn how to use CVS or Subversion?
>
> YES! I'd recommend to go with Subversion, but you want to use some source
> control.

You want version control as much of a habit as "Ctrl + S".  It can be
a pain at first and sometimes even seems silly when you start out and
develop on your own.  But it is Very nice to have an undo button that
reaches back all the way to the first line of code you've written.

Personally I'm a fan of the distributed apps (bazaar, git, mercurial).
 They have all the best parts of SVN and a few more goodies to boot.
I tend towards bazaar specifically for portability and simplicity, but
git seems to be the popular favorite.

Regardless of which, I can't stress enough how useful it is to have
code history.

Mark



More information about the talk mailing list