Re: finding compile time errors



..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
.



Relevant Pages

  • Re: how to run scripts after a page has already loaded and been sent to a users browser?
    ... > It's because PHP is a server side scripting language, ... > do stuff before you send stuff to user's web browser. ... As we've discussed on this newsgroup before, if a script starts ... that is after the last HTML is sent to a web browser. ...
    (alt.php)
  • Re: PHP / MySQL
    ... Should I be able to click on a php file and have it ... I have Apache, MySQL servers running. ... running, you can type, http://localhost in your browser and get the ... develope your web sites, all of the applications that you use have ...
    (alt.os.linux.suse)
  • Re: PHP / MySQL
    ... Should I be able to click on a php file and have it ... I have Apache, MySQL servers running. ... running, you can type, http://localhost in your browser and get the ... develope your web sites, all of the applications that you use have access ...
    (alt.os.linux.suse)
  • Re: PHP / MySQL
    ... Should I be able to click on a php file and have it ... I have Apache, MySQL servers running. ... running, you can type, http://localhost in your browser and get the ... develope your web sites, all of the applications that you use have access ...
    (alt.os.linux.suse)
  • Re: PHP / MySQL
    ... Should I be able to click on a php file and have it ... I have Apache, MySQL servers running. ... running, you can type, http://localhost in your browser and get the default ... so if you want to use one of the html builders or one of the more elaberate ...
    (alt.os.linux.suse)