Bailed out without a bailout address (embed sapi)

[email protected] (Marc)
Newsgroups php.internals.win
Organization MisterPHP
Message-ID <[email protected]>
Hi,

I have a problem with the following code using embed sapi.

zend_catch() is never called and there is a DebugBreak() in
zend_output_debug_string().

It is a windows issue. It works fine under linux.

I have compiled PHP with ZTS and debug mode.

What is wrong with this code?

Thank you,

Marc

#include <sapi/embed/php_embed.h>

void main()
{
 int count=1;
 char*arguments[1];
 
 arguments[0]="test";

 zend_file_handle h; 
 
 h.type=ZEND_HANDLE_FP;
 h.filename="bailout.php";
 h.opened_path=0;
 h.free_filename=false;
 h.handle.fp=fopen(h.filename,"rb");

 PHP_EMBED_START_BLOCK(count,arguments)
 {
  zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC,0,1,&h); 
  
  printf("done\n");
 }
 PHP_EMBED_END_BLOCK()
 
 printf("end");
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.