phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.79k stars 1.97k forks source link

$compiler->compileString() returns FALSE instead of a string #2198

Closed dedalozzo closed 9 years ago

dedalozzo commented 10 years ago

This code used to work in the past, but I have tried to downgrade with no success. After many tests I figured out that any calls to compileString() returns FALSE:

$volt = new \Phalcon\Mvc\View\Engine\Volt($this->view, $this->di);
$compiler = $volt->getCompiler();
$compiler->addFilter('ucwords', 'ucwords');
var_dump($compiler->compileString('{{ "hello"|ucwords }}'));

should return:

// string '<?php echo ucwords('hello'); ?>' (length=31)

instead it returns:

// false

Since the compileString() returns FALSE, I'm not able to get a valid response, unless I don't use a custom filter. In case of a custom filter in fact I get a "no data received" Chrome blank page.

This is the service:

<?php

use Phalcon\Mvc\View\Engine\Volt;

// Creates an instance of Volt template engine and return it.
$di->setShared('volt',
  function($view, $di) use ($root, $config) {
    $volt = new Volt($view, $di);

    $volt->setOptions(
      [
        'compiledPath' => $root.$config->application->cacheDir.'volt/',
        'compiledExtension' => '.compiled',
        'compiledSeparator' => '_',
        'compileAlways' => TRUE
      ]
    );

    $compiler = $volt->getCompiler();

    $compiler->addFilter('minustospace',
      function($resolvedArgs, $exprArgs) {
        return "str_replace('-', ' ', '".$resolvedArgs."')";
      }
    );

    return $volt;
  }
);

This instead is the template when I'm using the filter:

{% if subsectionMenu is defined  %}
<ul class="list pills small">
  {% for i, item in subsectionMenu %}
    <li{{ (i == subsectionIndex) ? ' class="active pull-right"' : ' class="pull-right"' }}><a href="{{ controllerPath~actionPath~item }}">{{ item|minustospace|upper }}</a></li>
  {% endfor %}
</ul>
{% endif %}

I can only use a built-in filter, because any custom filter produces the issue described.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

phalcon commented 10 years ago

1.2.6 only had a change in Phalcon\Security, there's no way it could affect Volt

dedalozzo commented 10 years ago

Using git I see that my last commit to the volt.php file is dated June 9, 2013 with the message: "added the 'minustospace' filter, that replaces minus with spaces". Maybe something related to 1.2.5? I can try to downgrade Phalcon to see what happens.

dedalozzo commented 10 years ago

Tried to downgrade and nothing changed. Probably is something I have changed but I can't figure out what. If I remove the following statement

  $compiler->addFilter('minustospace',
    function($resolvedArgs, $exprArgs) {
      return "str_replace('-', ' ', '".$resolvedArgs."')";
    }
  );

I get an exception because the program can't find the filter, else I get a "No data received" in Chrome and the page is not displayed. Any idea? I can't even debug because the template is not generated when the filter is added. At this point I don't think it's a Phalcon bug, but any hint can be useful to find a solution.

dedalozzo commented 10 years ago

OK, dunno what happens here, but this code returns FALSE:

$volt = new \Phalcon\Mvc\View\Engine\Volt($this->view, $this->di);
$compiler = $volt->getCompiler();
$compiler->addFilter('ucwords', 'ucwords');
var_dump($compiler->compileString('{{ "hello"|ucwords }}'));

should return:

// string '<?php echo ucwords('hello'); ?>' (length=31)

instead it returns:

// false

So it's definitely a bug. Please try it and let me know how can I help you.

phalcon commented 10 years ago

Executing this test:

<?php

$di = new Phalcon\DI\FactoryDefault();

$di['view'] = function(){
    return new Phalcon\Mvc\View();
};

$volt = new \Phalcon\Mvc\View\Engine\Volt($di['view'], $di);
$compiler = $volt->getCompiler();
$compiler->addFilter('ucwords', 'ucwords');
var_dump($compiler->compileString('{{ "hello"|ucwords }}'));

It outputs:

string(31) "<?php echo ucwords('hello'); ?>"

Could you please update my test to demonstrate the bug?

dedalozzo commented 10 years ago

When a closure is provided the filter doesn't work. See the code below:

$volt = new \Phalcon\Mvc\View\Engine\Volt($di['view'], $di);

$compiler = $volt->getCompiler();

$compiler->addFilter('minustospace',
  function($resolvedArgs, $exprArgs) {
    return "str_replace('-', ' ', '".$resolvedArgs."')";
  }
);

$compiler->addFilter('ucwords', 'ucwords');

$compiler->addFilter('likeucwords',
  function($resolvedArgs, $exprArgs) {
    return "ucwords('".$resolvedArgs."')";
  }
);

var_dump($compiler->compileString('{{ "it-works"|ucwords }}')); // Works.
var_dump($compiler->compileString('{{ "it-works"|upper }}')); // Works.
var_dump($compiler->compileString('{{ "it-does-not-work"|likeucwords }}')); // Doesn't work.
var_dump($compiler->compileString('{{ "it-does-not-work"|minustospace }}')); // Doesn't work.
maxgalbu commented 10 years ago

I have just tested it under php 5.5 and it works. Are you on windows? see https://github.com/phalcon/cphalcon/issues/2269

dedalozzo commented 10 years ago

I'm on Mac OS X version 10.7.5 with PHP 5.5.10. Did you try on Linux?

maxgalbu commented 10 years ago

Yes I did, CentOS with php 5.5.9 from CLI. Did you try from cli? Just put the test code in a file and then run

php -f [your_filename].php

Here's my full test file:

<?

$di = new Phalcon\DI\FactoryDefault();

$di['view'] = function(){
    return new Phalcon\Mvc\View();
};

$volt = new \Phalcon\Mvc\View\Engine\Volt($di['view'], $di);

$compiler = $volt->getCompiler();

$compiler->addFilter('minustospace',
  function($resolvedArgs, $exprArgs) {
    return "str_replace('-', ' ', '".$resolvedArgs."')";
  }
);

$compiler->addFilter('ucwords', 'ucwords');

$compiler->addFilter('likeucwords',
  function($resolvedArgs, $exprArgs) {
    return "ucwords('".$resolvedArgs."')";
  }
);

var_dump($compiler->compileString('{{ "it-works"|ucwords }}')); // Works.
var_dump($compiler->compileString('{{ "it-works"|upper }}')); // Works.
var_dump($compiler->compileString('{{ "it-does-not-work"|likeucwords }}')); // Doesn't work.
var_dump($compiler->compileString('{{ "it-does-not-work"|minustospace }}')); // Doesn't work.
?>

I'm getting

string(34) "<?php echo ucwords('it-works'); ?>"
string(46) "<?php echo Phalcon\Text::upper('it-works'); ?>"
string(44) "<?php echo ucwords(''it-does-not-work''); ?>"
string(58) "<?php echo str_replace('-', ' ', ''it-does-not-work''); ?>"
maxgalbu commented 10 years ago

Wait LOL I think i saw the problem, there's double quotes around the string when the closure is used, how did I not see that?

Let me try with php 5.3.

dedalozzo commented 10 years ago

php -f lippo.php

string(34) "<?php echo ucwords('it-works'); ?>" string(46) "<?php echo Phalcon\Text::upper('it-works'); ?>" Segmentation fault: 11

dedalozzo commented 10 years ago

This is the lippo.phpcontent:

<?php

use Phalcon\DI\FactoryDefault as DependencyInjector;
use Phalcon\Mvc\Application as Application;

$loader = new \Phalcon\Loader();
$loader->register();

$di = new DependencyInjector();

$di['view'] = function(){
    return new Phalcon\Mvc\View();
};

$volt = new \Phalcon\Mvc\View\Engine\Volt($di['view'], $di);
$compiler = $volt->getCompiler();

$compiler->addFilter('minustospace',
  function($resolvedArgs, $exprArgs) {
    return "str_replace('-', ' ', '".$resolvedArgs."')";
  }
);

$compiler->addFilter('ucwords', 'ucwords');

$compiler->addFilter('likeucwords',
  function($resolvedArgs, $exprArgs) {
    return "ucwords(".$resolvedArgs.")";
  }
);

var_dump($compiler->compileString('{{ "it-works"|ucwords }}'));
var_dump($compiler->compileString('{{ "it-works"|upper }}'));
var_dump($compiler->compileString('{{ "it-does-not-work"|likeucwords }}'));
var_dump($compiler->compileString('{{ "it-does-not-work"|minustospace }}'));

It's a segmentation fault, something related memory allocation I think.

maxgalbu commented 10 years ago

Tested under MacOSX 10.8.5 and php 5.3 (default installed), no segmentation fault. Can you rebuild phalcon in debug mode and then run it under gdb? See these instructions:

cd cphalcon/ext

#reinstall phalcon in debug mode
sudo ./install

#run gdb with php cli
gdb --args /usr/bin/php -f testvolt.php

#when you see gdb cli, input:
run

#when it segfaults, input:
bt

#and then paste your input here
dedalozzo commented 10 years ago

gdb /usr/bin/php -f ../../lippo.php

GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug 5 03:00:42 UTC 2012) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .... warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/blocksort.o" - no debug information available for "blocksort.c".

warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/huffman.o" - no debug information available for "huffman.c".

warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/crctable.o" - no debug information available for "crctable.c".

warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/randtable.o" - no debug information available for "randtable.c".

warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/compress.o" - no debug information available for "compress.c".

warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/decompress.o" - no debug information available for "decompress.c". warning: Could not find object file "/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/bzlib.o" - no debug information available for "bzlib.c".

...... done

"/Users/fff/Downloads/cphalcon/ext/../../lippo.php" is not a core dump: File format not recognized (gdb) run Starting program: /usr/bin/php Reading symbols for shared libraries +++++++++......................... done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries ............... done Reading symbols for shared libraries ......................................................................................................... done Reading symbols for shared libraries . done Reading symbols for shared libraries .. done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries ...... done Reading symbols for shared libraries .. done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries .. done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries .. done Reading symbols for shared libraries . done

At this time, nothing happens.

maxgalbu commented 10 years ago

Sorry, i forgot the --args parameter:

gdb --args /usr/bin/php -f testvolt.php
dedalozzo commented 10 years ago

Same result, except for the starting program now is /usr/bin/php -f lippo.php

On Apr 2, 2014, at 5:50 PM, maxgalbu wrote:

Sorry, i forgot the --args parameter:

gdb --args /usr/bin/php -f testvolt.php — Reply to this email directly or view it on GitHub.

maxgalbu commented 10 years ago

If not even your gdb works correctly I can't help you past this point, sorry.

Here's my gdb output if it helps:

GNU gdb 6.3.50-20050815 (Apple version gdb-1824) (Wed Feb  6 22:51:23 UTC 2013)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ..................... done

(gdb) run
Starting program: /usr/bin/php -f testvolt.php
Reading symbols for shared libraries ++++++++++++++++++++...........................................................................................................warning: Could not find object file "/Users/darwin/Library/Developer/Xcode/DerivedData/Asepsis-bqmcpjehyilrwjfeiccmkfdjoyah/Build/Intermediates/wrapper.build/Release/DesktopServicesPrivWrapper.build/Objects-normal/x86_64/init.o" - no debug information available for "init.c".

warning: Could not find object file "/Users/darwin/Library/Developer/Xcode/DerivedData/Asepsis-bqmcpjehyilrwjfeiccmkfdjoyah/Build/Intermediates/wrapper.build/Release/DesktopServicesPrivWrapper.build/Objects-normal/x86_64/mach_override.o" - no debug information available for "mach_override.c".

warning: Could not find object file "/Users/darwin/Library/Developer/Xcode/DerivedData/Asepsis-bqmcpjehyilrwjfeiccmkfdjoyah/Build/Intermediates/wrapper.build/Release/DesktopServicesPrivWrapper.build/Objects-normal/x86_64/interposing.o" - no debug information available for "interposing.c".

............................ done
Reading symbols for shared libraries . done
string(34) "<?php echo ucwords('it-works'); ?>"
string(46) "<?php echo Phalcon\Text::upper('it-works'); ?>"
string(42) "<?php echo ucwords('it-does-not-work'); ?>"
string(56) "<?php echo str_replace('-', ' ', 'it-does-not-work'); ?>"

Program exited normally.
dedalozzo commented 10 years ago

Finally I got gdb working. Here it is:

(gdb) run
Starting program: /usr/bin/php -f lippo.php
string(34) "<?php echo ucwords('it-works'); ?>"
string(46) "<?php echo Phalcon\Text::upper('it-works'); ?>"

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000028
0x0000000100d81f44 in xdebug_add_stack_frame ()

(gdb) bt
#0  0x0000000100d81f44 in xdebug_add_stack_frame ()
#1  0x0000000100d73c36 in xdebug_execute_internal ()
#2  0x00000001001b1dc7 in zend_call_function ()
#3  0x000000010216d4c4 in phalcon_call_user_function (object_pp=0x0, obj_ce=0x0, type=phalcon_fcall_function, function_name=0x7fff5fbfa830, retval_ptr_ptr=0x7fff5fbfbb60, param_count=2, params=0x7fff5fbfad30) at fcall.c:429
#4  0x000000010216d7b1 in phalcon_call_func_aparams (return_value_ptr=0x7fff5fbfbb60, func_name=0x10252aa9a "call_user_func_array", func_length=20, param_count=2, params=0x7fff5fbfad30) at fcall.c:508
#5  0x00000001023019c0 in phalcon_return_call_function (return_value=0x100af0510, return_value_ptr=0x7fff5fbfbb60, func=0x10252aa9a "call_user_func_array", func_len=20, param_count=2, params=0x7fff5fbfad30) at fcall.h:563
#6  0x0000000102303f33 in zim_Phalcon_Mvc_View_Engine_Volt_Compiler_resolveFilter (ht=2, return_value=0x100af0510, return_value_ptr=0x7fff5fbfbb60, this_ptr=0x100aed8f8, return_value_used=1) at compiler.c:1329
#7  0x0000000102168861 in phalcon_execute_internal (execute_data_ptr=0x7fff5fbfb1e0, fci=0x7fff5fbfb338, return_value_used=1) at phalcon.c:53
#8  0x0000000100d73d20 in xdebug_execute_internal ()
#9  0x00000001001b1dc7 in zend_call_function ()
#10 0x000000010216d4c4 in phalcon_call_user_function (object_pp=0x7fff5fbfb548, obj_ce=0x102d2ca60, type=phalcon_fcall_method, function_name=0x7fff5fbfb4e0, retval_ptr_ptr=0x7fff5fbfbb60, param_count=2, params=0x7fff5fbfb9f8) at fcall.c:429
#11 0x000000010216dc60 in phalcon_call_class_method_aparams (return_value_ptr=0x7fff5fbfbb60, ce=0x102d2ca60, type=phalcon_fcall_method, object=0x100aed8f8, method_name=0x10252b28c "resolvefilter", method_len=13, param_count=2, params=0x7fff5fbfb9f8) at fcall.c:562
#12 0x00000001023074db in zim_Phalcon_Mvc_View_Engine_Volt_Compiler_expression (ht=1, return_value=0x100aef778, return_value_ptr=0x7fff5fbfc788, this_ptr=0x100aed8f8, return_value_used=1) at compiler.c:1725
#13 0x0000000102168861 in phalcon_execute_internal (execute_data_ptr=0x7fff5fbfc2c0, fci=0x7fff5fbfc418, return_value_used=1) at phalcon.c:53
#14 0x0000000100d73d20 in xdebug_execute_internal ()
#15 0x00000001001b1dc7 in zend_call_function ()
#16 0x000000010216d4c4 in phalcon_call_user_function (object_pp=0x7fff5fbfc628, obj_ce=0x102d2ca60, type=phalcon_fcall_method, function_name=0x7fff5fbfc5c0, retval_ptr_ptr=0x7fff5fbfc788, param_count=1, params=0x7fff5fbfc750) at fcall.c:429
#17 0x000000010216dc60 in phalcon_call_class_method_aparams (return_value_ptr=0x7fff5fbfc788, ce=0x102d2ca60, type=phalcon_fcall_method, object=0x100aed8f8, method_name=0x10252a766 "expression", method_len=10, param_count=1, params=0x7fff5fbfc750) at fcall.c:562
#18 0x000000010230e21f in zim_Phalcon_Mvc_View_Engine_Volt_Compiler_compileEcho (ht=1, return_value=0x100aef670, return_value_ptr=0x7fff5fbfd170, this_ptr=0x100aed8f8, return_value_used=1) at compiler.c:2456
#19 0x0000000102168861 in phalcon_execute_internal (execute_data_ptr=0x7fff5fbfc990, fci=0x7fff5fbfcae8, return_value_used=1) at phalcon.c:53
#20 0x0000000100d73d20 in xdebug_execute_internal ()
#21 0x00000001001b1dc7 in zend_call_function ()
#22 0x000000010216d4c4 in phalcon_call_user_function (object_pp=0x7fff5fbfccf8, obj_ce=0x102d2ca60, type=phalcon_fcall_method, function_name=0x7fff5fbfcc90, retval_ptr_ptr=0x7fff5fbfd170, param_count=1, params=0x7fff5fbfd060) at fcall.c:429
#23 0x000000010216dc60 in phalcon_call_class_method_aparams (return_value_ptr=0x7fff5fbfd170, ce=0x102d2ca60, type=phalcon_fcall_method, object=0x100aed8f8, method_name=0x10252bc52 "compileecho", method_len=11, param_count=1, params=0x7fff5fbfd060) at fcall.c:562
#24 0x0000000102313453 in zim_Phalcon_Mvc_View_Engine_Volt_Compiler__statementList (ht=2, return_value=0x100af0360, return_value_ptr=0x7fff5fbfde40, this_ptr=0x100aed8f8, return_value_used=1) at compiler.c:3082
#25 0x0000000102168861 in phalcon_execute_internal (execute_data_ptr=0x7fff5fbfd900, fci=0x7fff5fbfda58, return_value_used=1) at phalcon.c:53
#26 0x0000000100d73d20 in xdebug_execute_internal ()
#27 0x00000001001b1dc7 in zend_call_function ()
#28 0x000000010216d4c4 in phalcon_call_user_function (object_pp=0x7fff5fbfdc68, obj_ce=0x102d2ca60, type=phalcon_fcall_method, function_name=0x7fff5fbfdc00, retval_ptr_ptr=0x7fff5fbfde40, param_count=2, params=0x7fff5fbfddd0) at fcall.c:429
#29 0x000000010216dc60 in phalcon_call_class_method_aparams (return_value_ptr=0x7fff5fbfde40, ce=0x102d2ca60, type=phalcon_fcall_method, object=0x100aed8f8, method_name=0x10252b3d2 "_statementlist", method_len=14, param_count=2, params=0x7fff5fbfddd0) at fcall.c:562
#30 0x0000000102316054 in zim_Phalcon_Mvc_View_Engine_Volt_Compiler__compileSource (ht=2, return_value=0x100aef108, return_value_ptr=0x100ab40d8, this_ptr=0x100aed8f8, return_value_used=1) at compiler.c:3321
#31 0x0000000102168861 in phalcon_execute_internal (execute_data_ptr=0x7fff5fbfe1b0, fci=0x7fff5fbfe308, return_value_used=1) at phalcon.c:53
#32 0x0000000100d73d20 in xdebug_execute_internal ()
#33 0x00000001001b1dc7 in zend_call_function ()
#34 0x000000010216d4c4 in phalcon_call_user_function (object_pp=0x7fff5fbfe518, obj_ce=0x102d2ca60, type=phalcon_fcall_method, function_name=0x7fff5fbfe4b0, retval_ptr_ptr=0x100ab40d8, param_count=2, params=0x7fff5fbfe6a8) at fcall.c:429
#35 0x000000010216dc60 in phalcon_call_class_method_aparams (return_value_ptr=0x100ab40d8, ce=0x102d2ca60, type=phalcon_fcall_method, object=0x100aed8f8, method_name=0x10252bdca "_compilesource", method_len=14, param_count=2, params=0x7fff5fbfe6a8) at fcall.c:562
#36 0x000000010230a6db in phalcon_return_call_class_method (return_value=0x100aef288, return_value_ptr=0x100ab40d8, ce=0x102d2ca60, type=phalcon_fcall_method, object=0x100aed8f8, method_name=0x10252bdca "_compilesource", method_len=14, param_count=2, params=0x7fff5fbfe6a8) at fcall.h:592
#37 0x00000001023173d0 in zim_Phalcon_Mvc_View_Engine_Volt_Compiler_compileString (ht=1, return_value=0x100aef288, return_value_ptr=0x100ab40d8, this_ptr=0x100aed8f8, return_value_used=1) at compiler.c:3456
#38 0x00000001021688b9 in phalcon_execute_internal (execute_data_ptr=0x100ab4570, fci=0x0, return_value_used=1) at phalcon.c:57
#39 0x0000000100d73d20 in xdebug_execute_internal ()
#40 0x0000000100224fe4 in zend_do_fcall_common_helper_SPEC ()
#41 0x00000001001e0e02 in execute_ex ()
#42 0x0000000100d73a64 in xdebug_execute_ex ()
#43 0x00000001001bdf44 in zend_execute_scripts ()
#44 0x000000010016aca7 in php_execute_script ()
#45 0x0000000100242323 in do_cli ()
#46 0x00000001002417ba in main ()
(gdb) 
dedalozzo commented 10 years ago

OK, it's an issue related to xdebug. I disabled it and the everything works:

string(34) "<?php echo ucwords('it-works'); ?>"
string(46) "<?php echo Phalcon\Text::upper('it-works'); ?>"
string(42) "<?php echo ucwords('it-does-not-work'); ?>"
string(56) "<?php echo str_replace('-', ' ', 'it-does-not-work'); ?>"

Program exited normally.

Now I'm asking, why this happen? It's a Phalcon bug or an xdebug issue? It seems that xdebug is trying to read a memory location that can't be read.

maxgalbu commented 10 years ago

It could be a phalcon stack trace that xdebug is trying to inspect or some leak from phalcon that affect xdebug. I had some issues too with xdebug, disabled it and had no issue since that.

Also, see https://github.com/phalcon/cphalcon/issues/2239.

phalcon commented 10 years ago

Added a pull request on xdebug to fix the problem: xdebug/xdebug#120