# parse errors no longer visible

- Thread: https://externals.io/message/1020
- Original archive: https://news-web.php.net/php.internals/1020
- Started by Derick Rethans on 2003-04-23T20:53:03+00:00
- Messages: 2
- 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

---

## #1020 — Derick Rethans — 2003-04-23T20:53:03+00:00

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

Hello,

I was trying to make a screenshot of a parse error today, but found out 
that I was unable to get it shown on the screen. Error reporting was set 
to 2047 in php.ini, but still nothing to see (only in my apache error 
log). So I tracked the calls into php_error_cb, and see here the 
results:



(gdb) run -X
Starting program: /dat/dev/php/apache_1.3.27/src/httpd -X

Program received signal SIGINT, Interrupt.
0x407c15be in __select () at __select:-1
-1	__select: No such file or directory.
	in __select
(gdb) bre php_error_cb
Breakpoint 1 at 0x80aefce: file /dat/dev/php/php-5.0.0dev/main/main.c,
line 584.(gdb) cont
Continuing.

Breakpoint 1, php_error_cb (type=4, 
    error_filename=0x841ae84 "/home/httpd/html/test/xdebug_error.php", 
    error_lineno=3, format=0x84d1710 "parse error", args=0xbfffbbe8)
    at /dat/dev/php/php-5.0.0dev/main/main.c:584
warning: Source file is more recent than executable.

584		buffer_len = vspprintf(&buffer, PG(log_errors_max_len), format, args);
(gdb) next
585		if (PG(ignore_repeated_errors)) {
(gdb) next
595			display = 1;
(gdb) next
597		strlcpy(last_error.buf, buffer, sizeof(last_error.buf));
(gdb) next
598		strlcpy(last_error.filename, error_filename, sizeof(last_error.filename));
(gdb) next
599		last_error.lineno = error_lineno;
(gdb) next
602		if (display && (EG(error_reporting) & type || (type & E_CORE))
(gdb) print executor_globals.error_reporting
$1 = 0


As you see the error_reporting level is '0' here, and thus nothing is
shown. I couldn't find why it is '0' here, but I suspect that the
following patch might be the problem:

http://news.php.net/article.php?group=php.zend-engine.cvs&article=638


Derick


-- 

-------------------------------------------------------------------------
 Derick Rethans                                 http://derickrethans.nl/ 
 JDI Media Solutions                             http://www.jdimedia.nl/
 PHP Magazine - PHP Magazine for Professionals       http://php-mag.net/

---

## #1021 — Zeev Suraski — 2003-04-23T21:43:59+00:00

URL: https://externals.io/message/1020#1021 · In reply to: #1020

I have no problem getting a parse error to be shown, can you describe what 
you did to get that behavior?

Zeev

At 16:53 23/04/2003, Derick Rethans wrote:
>Hello,
>
>I was trying to make a screenshot of a parse error today, but found out
>that I was unable to get it shown on the screen. Error reporting was set
>to 2047 in php.ini, but still nothing to see (only in my apache error
>log). So I tracked the calls into php_error_cb, and see here the
>results:
>
>
>
>(gdb) run -X
>Starting program: /dat/dev/php/apache_1.3.27/src/httpd -X
>
>Program received signal SIGINT, Interrupt.
>0x407c15be in __select () at __select:-1
>-1      __select: No such file or directory.
>         in __select
>(gdb) bre php_error_cb
>Breakpoint 1 at 0x80aefce: file /dat/dev/php/php-5.0.0dev/main/main.c,
>line 584.(gdb) cont
>Continuing.
>
>Breakpoint 1, php_error_cb (type=4,
>     error_filename=0x841ae84 "/home/httpd/html/test/xdebug_error.php",
>     error_lineno=3, format=0x84d1710 "parse error", args=0xbfffbbe8)
>     at /dat/dev/php/php-5.0.0dev/main/main.c:584
>warning: Source file is more recent than executable.
>
>584             buffer_len = vspprintf(&buffer, PG(log_errors_max_len), 
>format, args);
>(gdb) next
>585             if (PG(ignore_repeated_errors)) {
>(gdb) next
>595                     display = 1;
>(gdb) next
>597             strlcpy(last_error.buf, buffer, sizeof(last_error.buf));
>(gdb) next
>598             strlcpy(last_error.filename, error_filename, 
>sizeof(last_error.filename));
>(gdb) next
>599             last_error.lineno = error_lineno;
>(gdb) next
>602             if (display && (EG(error_reporting) & type || (type & E_CORE))
>(gdb) print executor_globals.error_reporting
>$1 = 0
>
>
>As you see the error_reporting level is '0' here, and thus nothing is
>shown. I couldn't find why it is '0' here, but I suspect that the
>following patch might be the problem:
>
>http://news.php.net/article.php?group=php.zend-engine.cvs&article=638
>
>
>Derick
>
>
>--
>
>-------------------------------------------------------------------------
>  Derick Rethans                                 http://derickrethans.nl/
>  JDI Media Solutions                             http://www.jdimedia.nl/
>  PHP Magazine - PHP Magazine for Professionals       http://php-mag.net/
