# php 5.1.1 syntax errors

- Thread: https://externals.io/message/21228
- Original archive: https://news-web.php.net/php.internals/21228
- Started by Daine Mamacos on 2005-12-15T12:15:04+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #21228 — Daine Mamacos — 2005-12-15T12:15:04+00:00

URL: https://externals.io/message/21228#21228

Is there any reason why the php 5.1.1 command processor does not report syntax
errors despite all errors being on in the .ini file?

Maybe I'm doing something stupid.

--
random signature

---

## #21231 — Jochem Maas — 2005-12-15T14:45:47+00:00

URL: https://externals.io/message/21228#21231 · In reply to: #21228

internals,

it may be a badly worded (and inappropriately directed) post BUT I can categorically
say that php5+ does have problems with displaying errors under certain
circumstances - you see nothing anywhere regardless of ini/log/display settings.
I have had such issues since php.5.0.3beta, I have never been able to
reproduce the issue in a simple script (certain degree of code complexity is
required - in practice that means running a 'production' framework of some sort).

examples of the sort of problems that cause NOTHING to be reported, NOTHING to be
logged and NOTHING to be displayed:

1. failed require/require_once statements.
2. non-abstract class with abstract methods (as declared in a base class).
3. method signature incompatibilities.

when faced with such an error (like I just spent another 2 hours figuring out
a newly developed class was missing a method [no. 2] - not the first time!) the
only recourse I have it to start at the first line of php that is run and
write something like:

die("WTF IS GOING ON!?!?! :-(");

and then keep moving it a line or 2 down at a time (stepping into
all/any include files, of which there are normally about 25-50) until
I find the offending line/file (at which point I can try to figure out
what is actually wrong).


Daine Mamacos wrote:
> Is there any reason why the php 5.1.1 command processor does not report syntax
> errors despite all errors being on in the .ini file?
> 
> Maybe I'm doing something stupid.

mee too - wish I knew what it was.

> 
> --
> random signature

---

## #21235 — Daine Mamacos — 2005-12-15T17:04:06+00:00

URL: https://externals.io/message/21228#21235 · In reply to: #21231

I think I know what this is due to.
I have an autoloader in places for classes.
It seems that when a class is autoloaded, no matter what you do, it won't
bother throwing an error when it loads a class. It however just stops
processing. FULL STOP.
If the error is in the localfile, it works fine. runtime errors work fine. It
seems to be pre-runtime errors, now I don't know if this is because of the way
the autoloader works at run time as opposed to pre-runtime.

I don't know.
Anyhow.

If anyone could enlighten me, it would be great.


On Thu, 15 Dec 2005 15:45:47 +0100, Jochem Maas wrote
> internals,
> 
> it may be a badly worded (and inappropriately directed) post BUT I 
> can categorically say that php5+ does have problems with displaying 
> errors under certain circumstances - you see nothing anywhere 
> regardless of ini/log/display settings. I have had such issues since 
> php.5.0.3beta, I have never been able to reproduce the issue in a 
> simple script (certain degree of code complexity is required - in 
> practice that means running a 'production' framework of some sort).
> 
> examples of the sort of problems that cause NOTHING to be reported,
>  NOTHING to be logged and NOTHING to be displayed:
> 
> 1. failed require/require_once statements.
> 
> 2. non-abstract class with abstract methods (as declared in a base 
> class).
> 3. method signature incompatibilities.
> 
> when faced with such an error (like I just spent another 2 hours 
> figuring out a newly developed class was missing a method [no. 2] -
>  not the first time!) the only recourse I have it to start at the 
> first line of php that is run and write something like:
> 
> die("WTF IS GOING ON!?!?! :-(");
> 
> and then keep moving it a line or 2 down at a time (stepping into
> all/any include files, of which there are normally about 25-50) until
> I find the offending line/file (at which point I can try to figure 
> out what is actually wrong).
> 
> Daine Mamacos wrote:
> > […]
> 
> mee too - wish I knew what it was.
> 
> > […]
> 
> -- 
> 
> 


--
random signature

---

## #21239 — Jochem Maas — 2005-12-15T17:49:10+00:00

URL: https://externals.io/message/21228#21239 · In reply to: #21235

Daine Mamacos wrote:
> I think I know what this is due to.
> I have an autoloader in places for classes.
> It seems that when a class is autoloaded, no matter what you do, it won't
> bother throwing an error when it loads a class. It however just stops
> processing. FULL STOP.
> If the error is in the localfile, it works fine. runtime errors work fine. It
> seems to be pre-runtime errors, now I don't know if this is because of the way
> the autoloader works at run time as opposed to pre-runtime.

I have also been caught out with regard to __autoload() related issues; but
I removed my __autoload() function from my project about 18 months ago.

thats not to say the problem may not be related to __autoload(), but
I can say that you don't need to be using it to have the describe
issue rear its head.

> 
> I don't know.
> Anyhow.
> 
> If anyone could enlighten me, it would be great.

ditto - I'd love to find out what it is that I (or maybe the
engine?) am/is doing wrong.
