Main Content

PHP - some quick fixes if scripts have issues, and how to use our support

Archive - Originally posted on "The Horse's Mouth" - 2014-11-19 08:35:20 - Graham Ellis

PHP is a language which is highly configuable throguh the php.ini file - and indeed there are options added / that go away in that file between releases too. So sometimes you'll get warning messages from our scripts even though they work completely correctly for us.

All of this is explained on our courses, and our material on this site is primarily course supporting in its nature. And because of that supporting nature, some of our examples are simplified to the extent that they don't start doing checkes for all possible php.ini settings and reconfiguring to suite.

As a quick rule of thumb, most of the warnings will be cleared by adding
  error_reporting(E_ALL & ~E_NOTICE);
and
  date_default_timezone_set("Europe/London");
to your code. To some extent this is a "work around" but it will clean things up.

If you know enough PHP to make these changes, fantastic and good for you - please feel free to use the examples in your work (but remember that they come without warranty - it's at your risk). If you don't understand my instruction, I'm going to make three suggestions:
  a) Come on one of our PHP courses to learn it
  b) Arrange to pop by one evening and (at no charge), I'll help you for an hour or two
  c) If neither (a) nor (b) is practical, find yourself a local expert who can help
I can help debug code by email at time, but it's not a practical way for me to teach the basics - sorry. It can be done but it's a huge time drain, and it's going to be very frustrating for you too. Rather like a correspondence course that's being specially written, and I don't belive that our regular customer base would want to see less courses and higher prices while I sort out the basics for people who I want to encourage, and to whom I've offered three alternatives, only one of which would cost them anything. Much appreciate your understanding!