# Is php_errmsg The Right Location for SyntaxErrors?

- Thread: https://externals.io/message/26071
- Original archive: https://news-web.php.net/php.internals/26071
- Started by Bruce Bailey on 2006-10-16T21:11:57+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #26071 — Bruce Bailey — 2006-10-16T21:11:57+00:00

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

Hi

I discovered that php_errmsg is populated with the error text from 
zend_eval_string.  Is this the correct way for my embedded-php program to 
access error text?

code:

if (zend_eval_string(buffer, 0, "embedded code" TSRMLS_CC) == FAILURE)
{
   zval **php_errmsg;

   if (zend_hash_find(EG(active_symbol_table),
                        "php_errormsg",
                        sizeof("php_errormsg"),
                        (void **)&php_errmsg) == SUCCESS)
         err_text = Z_STRVAL_PP(php_errmsg);
}


Thanks,

Bruce

P.S.  If this is not the correct place to post these questions, please let 
me know.

_________________________________________________________________
Stay in touch with old friends and meet new ones with Windows Live Spaces 
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
