Re: finding compile time errors
- From: Michael Fesser <netizen@xxxxxx>
- Date: Fri, 13 Jun 2008 18:42:34 +0200
..oO(Jeff)
As I'm learning PHP, I'm making a fair number of mistakes in syntax.
In perl, you can turn on reading these errors from the browser by
adding this:
use CGI::Carp 'fatalsToBrowser';
Is there something like this in PHP?
In PHP error messages are printed to the browser by default (or to the
console if you use the CLI version). With the error_reporting directive
you can control which types of errors should be shown. On a development
machine this directive should be set to E_ALL|E_STRICT in the php.ini.
Also make sure that display_errors is turned on.
Or do I need to find the php.ini file and look to see where the error
log is?
By default there is no error log, but you can enable it.
I spent some time trying to figure out why my class constructor
crashed until I found that I was writing php5 on a php4 setup. What is
most of the established base, is it 4 or 5?
PHP 4 is dead, the last support for it will finally end in a few weeks.
After that there will be no more security fixes released. So there's
absolutely no point in writing PHP 4 scripts anymore. Use a recent 5.2
instead.
I see in the php docs that
some examples use 5.3, considering that the latest stable release is 5.2
I can see how there might be a lot of hair lost!
5.3 will introduce two major features that were "backported" from PHP 6,
but it's not released yet. It's not unusual that the manual already
contains short notes or even full documentation about coming features,
because many people already use 5.3 or even 6 for testing.
Any recommendations on creating form elements? I've always used
CGI.pm which handles all the gotchas. Is there anything that comes with
the standard php install? All I really need is radio, select, checkbox
and text... I'm used to writing what I need, but I'm also used to not
reinventing a wheel that was written by someone far smarter!
There are various classes and libraries out there for creating and
maintaining forms with PHP. I can't recommend one, since I use my own
code. You could try a Google search.
Is there a standard include_path being used? Are there any standard
extensions for included libararies, generally I'd like them to be seen
*only* by the parent script.
Not sure what you mean.
Micha
.
- Follow-Ups:
- Re: finding compile time errors
- From: Jeff
- Re: finding compile time errors
- References:
- finding compile time errors
- From: Jeff
- finding compile time errors
- Prev by Date: Light at the end of the tunnel - and it's NOT a train !
- Next by Date: Re: finding compile time errors
- Previous by thread: finding compile time errors
- Next by thread: Re: finding compile time errors
- Index(es):
Relevant Pages
|