phpv8 / v8js

V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
http://pecl.php.net/package/v8js
MIT License
1.83k stars 200 forks source link

Error - Memory Limit / Time limit #10

Closed ghost closed 11 years ago

ghost commented 11 years ago

Hello,

My name is Fernando and I installed the extension v8js in my PHP 5.3.10-1ubuntu3.6 But when i try to set the memory limit e time limit it doesn't work. I'm using the following scripts that i found in the repository at github for test:

v8js / tests / memory_limit.phpt

v8js / tests / time_limit.phpt

This is the link of my phpinfo: http://198.199.111.114/teste03.php

For Example:

<?php $JS = <<< EOT var text = "abcdefghijklmnopqrstuvwyxz0123456789"; var memory = ""; for (var i = 0; i < 1000000; ++i) { memory += text; }

print('end');

EOT;

$v8 = new V8Js();

try { var_dump($v8->executeString($JS, 'basic.js', V8Js::FLAG_NONE, 0, 10000000)); } catch (V8JsMemoryLimitException $e) { var_dump($e); } ?>

Result: Null

<?php $JS = <<< EOT var text = "abcdefghijklmnopqrstuvwyxz0123456789"; var memory = ""; for (var i = 0; i < 1000000; ++i) { memory += text; }

print('end');

EOT;

$v8 = new V8Js();

try { var_dump($v8->executeString($JS, 'basic.js', V8Js::FLAG_NONE)); } catch (V8JsMemoryLimitException $e) { var_dump($e); } ?>

Result: endint(3)

Note: I switched var_dump($v8->executeString($JS, 'basic.js', V8Js::FLAG_NONE, 0, 10000000)); to var_dump($v8->executeString($JS, 'basic.js', V8Js::FLAG_NONE));

I downloaded the files from repository on github and i tried to compile and install (phpize,./configure, make, make install) v 0.1.4. But when i execute the command make, I get the following error: make: *\ [v8js.lo] Error 1

I also tried to download from pecl (http://pecl.php.net/get/v8js-0.1.3.tgz) and compile/install and everything worked ok.

This is the link of file with the output of the command make: http://pastebin.com/qwxKmdyR

andrewtch commented 11 years ago

I don't think that it's packaged in pecl, since, according to packages.xml, the version having limits is 0.1.4, and it's not packaged yet.

Yes, I'm having the same problems with build, but it looks like your v8js lib is too old.

andrewtch commented 11 years ago

My bad, looks like it's c++11 support. Digging through )

andrewtch commented 11 years ago

It looks like it fails just because gcc can not find thread support. @preillyme , can you please list develoment packages from you machine, including version of phtread etc?

beest commented 11 years ago

You need to have C++11 support to build the memory / time limit support as it makes use of std::thread. You should be using GCC 4.6+.

However, I don't see any error messages related to the above.

What I see is that you're probably using an older version of libv8. The memory / time limit features required more recent V8 features. The error messages in the make output are consistent with using an older version of libv8.

Try grabbing the latest stable libv8 and then make V8Js again using this.

andrewtch commented 11 years ago

➜ ~ dpkg -l | grep v8 ii libv8-3.8.9.20 3.8.9.20-2 amd64 v8 JavaScript engine - runtime library ii libv8-dev 3.8.9.20-2 amd64 v8 JavaScript engine - development files ➜ ~ dpkg -l | grep gcc ii gcc 4:4.7.3-1ubuntu10 amd64 GNU C compiler ii gcc-4.6 4.6.4-1ubuntu1 amd64 GNU C compiler ii gcc-4.6-base:amd64 4.6.4-1ubuntu1 amd64 GCC, the GNU Compiler Collection (base package) ii gcc-4.7 4.7.3-1ubuntu1 amd64 GNU C compiler ii gcc-4.7-base:amd64 4.7.3-1ubuntu1 amd64 GCC, the GNU Compiler Collection (base package) ii gcc-4.7-base:i386 4.7.3-1ubuntu1 i386 GCC, the GNU Compiler Collection (base package) ii gcc-4.7-multilib 4.7.3-1ubuntu1 amd64 GNU C compiler (multilib files) ii gcc-multilib 4:4.7.3-1ubuntu10 amd64 GNU C compiler (multilib files) ii lib32gcc-4.7-dev 4.7.3-1ubuntu1 amd64 GCC support library (32 bit development files) ii lib32gcc1 1:4.7.3-1ubuntu1 amd64 GCC support library (32 bit Version) ii libgcc-4.7-dev:amd64 4.7.3-1ubuntu1 amd64 GCC support library (development files) ii libgcc1:amd64 1:4.7.3-1ubuntu1 amd64 GCC support library ii libgcc1:i386 1:4.7.3-1ubuntu1 i386 GCC support library ii libx32gcc-4.7-dev 4.7.3-1ubuntu1 amd64 GCC support library (x32 development files)

these are my versions. What are yours?

ghost commented 11 years ago

My versions are:

~# dpkg -l | grep v8 ii libv8-3.7.12.22 3.7.12.22-3 v8 JavaScript engine - runtime library ii libv8-dbg 3.7.12.22-3 v8 JavaScript engine - debugging symbols ii libv8-dev 3.7.12.22-3 v8 JavaScript engine - development files ~# dpkg -l | grep gcc ii gcc 4:4.6.3-1ubuntu5 GNU C compiler ii gcc-4.6 4.6.3-1ubuntu5 GNU C compiler ii gcc-4.6-base 4.6.3-1ubuntu5 GCC, the GNU Compiler Collection (base package) ii libgcc1 1:4.6.3-1ubuntu5 GCC support library

andrewtch commented 11 years ago

your are older, yet I cant compile. Have you any specific libboost-thread, pthread and so on?

satoshi75nakamoto commented 11 years ago

Can you guys try again after pulling down: https://github.com/preillyme/v8js/commit/4a82311b4dc31d79d2146fc1ec47700565390c27

—Patrick

andrewtch commented 11 years ago

nope:

➜  v8js git:(master) make 
/bin/bash /tmp/v8js/libtool --mode=compile g++ -std=c++11 -I. -I/tmp/v8js -DPHP_ATOM_INC -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/v8js/v8js.cc -o v8js.lo 
libtool: compile:  g++ -std=c++11 -I. -I/tmp/v8js -DPHP_ATOM_INC -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/v8js/v8js.cc  -fPIC -DPIC -o .libs/v8js.o
In file included from /tmp/v8js/v8js.cc:25:0:
/tmp/v8js/config.h:66:0: warning: "PHP_V8_VERSION" redefined [enabled by default]
/tmp/v8js/v8js.cc:23:0: note: this is the location of the previous definition
/tmp/v8js/v8js.cc:80:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/v8js/v8js.cc:80:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/v8js/v8js.cc:80:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/v8js/v8js.cc: In function 'HashTable* php_v8js_v8_get_properties(zval*)':
/tmp/v8js/v8js.cc:233:42: error: no matching function for call to 'v8::HandleScope::HandleScope(v8::Isolate*&)'
/tmp/v8js/v8js.cc:233:42: note: candidates are:
In file included from /tmp/v8js/php_v8js_macros.h:30:0,
                 from /tmp/v8js/v8js.cc:28:
/usr/include/v8.h:463:3: note: v8::HandleScope::HandleScope(const v8::HandleScope&)
/usr/include/v8.h:463:3: note:   no known conversion for argument 1 from 'v8::Isolate*' to 'const v8::HandleScope&'
/usr/include/v8.h:438:3: note: v8::HandleScope::HandleScope()
/usr/include/v8.h:438:3: note:   candidate expects 0 arguments, 1 provided
/tmp/v8js/v8js.cc: In function 'void zim_V8Js___construct(int, zval*, zval**, zval*, int)':
/tmp/v8js/v8js.cc:580:41: error: no matching function for call to 'v8::HandleScope::HandleScope(v8::Isolate*&)'
/tmp/v8js/v8js.cc:580:41: note: candidates are:
In file included from /tmp/v8js/php_v8js_macros.h:30:0,
                 from /tmp/v8js/v8js.cc:28:
/usr/include/v8.h:463:3: note: v8::HandleScope::HandleScope(const v8::HandleScope&)
/usr/include/v8.h:463:3: note:   no known conversion for argument 1 from 'v8::Isolate*' to 'const v8::HandleScope&'
/usr/include/v8.h:438:3: note: v8::HandleScope::HandleScope()
/usr/include/v8.h:438:3: note:   candidate expects 0 arguments, 1 provided
/tmp/v8js/v8js.cc:597:14: error: 'class v8::Context' has no member named 'SetAlignedPointerInEmbedderData'
/tmp/v8js/v8js.cc: In function 'void php_v8js_timer_thread()':
/tmp/v8js/v8js.cc:714:16: error: 'class v8::Isolate' has no member named 'GetHeapStatistics'
/tmp/v8js/v8js.cc: In function 'void zim_V8Js_executeString(int, zval*, zval**, zval*, int)':
/tmp/v8js/v8js.cc:761:41: error: no matching function for call to 'v8::HandleScope::HandleScope(v8::Isolate*&)'
/tmp/v8js/v8js.cc:761:41: note: candidates are:
In file included from /tmp/v8js/php_v8js_macros.h:30:0,
                 from /tmp/v8js/v8js.cc:28:
/usr/include/v8.h:463:3: note: v8::HandleScope::HandleScope(const v8::HandleScope&)
/usr/include/v8.h:463:3: note:   no known conversion for argument 1 from 'v8::Isolate*' to 'const v8::HandleScope&'
/usr/include/v8.h:438:3: note: v8::HandleScope::HandleScope()
/usr/include/v8.h:438:3: note:   candidate expects 0 arguments, 1 provided
/tmp/v8js/v8js.cc: In function 'void php_v8js_persistent_zval_ctor(zval**)':
/tmp/v8js/v8js.cc:902:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/v8js/v8js.cc: In function 'void php_v8js_persistent_zval_dtor(zval**)':
/tmp/v8js/v8js.cc:915:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/v8js/v8js.cc: At global scope:
/tmp/v8js/v8js.cc:1051:1: warning: narrowing conversion of '-1' from 'int' to 'zend_uint {aka unsigned int}' inside { } [-Wnarrowing]
/tmp/v8js/v8js.cc:1065:1: warning: narrowing conversion of '-1' from 'int' to 'zend_uint {aka unsigned int}' inside { } [-Wnarrowing]
/tmp/v8js/v8js.cc:1068:1: warning: narrowing conversion of '-1' from 'int' to 'zend_uint {aka unsigned int}' inside { } [-Wnarrowing]
/tmp/v8js/v8js.cc: In function 'void php_v8js_write_property(zval*, zval*, zval*, const zend_literal*)':
/tmp/v8js/v8js.cc:1088:41: error: no matching function for call to 'v8::HandleScope::HandleScope(v8::Isolate*&)'
/tmp/v8js/v8js.cc:1088:41: note: candidates are:
In file included from /tmp/v8js/php_v8js_macros.h:30:0,
                 from /tmp/v8js/v8js.cc:28:
/usr/include/v8.h:463:3: note: v8::HandleScope::HandleScope(const v8::HandleScope&)
/usr/include/v8.h:463:3: note:   no known conversion for argument 1 from 'v8::Isolate*' to 'const v8::HandleScope&'
/usr/include/v8.h:438:3: note: v8::HandleScope::HandleScope()
/usr/include/v8.h:438:3: note:   candidate expects 0 arguments, 1 provided
/tmp/v8js/v8js.cc: In function 'void php_v8js_unset_property(zval*, zval*, const zend_literal*)':
/tmp/v8js/v8js.cc:1105:41: error: no matching function for call to 'v8::HandleScope::HandleScope(v8::Isolate*&)'
/tmp/v8js/v8js.cc:1105:41: note: candidates are:
In file included from /tmp/v8js/php_v8js_macros.h:30:0,
                 from /tmp/v8js/v8js.cc:28:
/usr/include/v8.h:463:3: note: v8::HandleScope::HandleScope(const v8::HandleScope&)
/usr/include/v8.h:463:3: note:   no known conversion for argument 1 from 'v8::Isolate*' to 'const v8::HandleScope&'
/usr/include/v8.h:438:3: note: v8::HandleScope::HandleScope()
/usr/include/v8.h:438:3: note:   candidate expects 0 arguments, 1 provided
make: *** [v8js.lo] Error 1
satoshi75nakamoto commented 11 years ago

@andrewtch — Can you paste the checking for V8 version... line from the configure output?

andrewtch commented 11 years ago

here is full dump:

➜  v8js git:(master) ./configure 
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20100525
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for V8 Javascript Engine... yes, shared
checking for V8 files in default path... found in /usr
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for V8 version... 3.8.9.20
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
satoshi75nakamoto commented 11 years ago

@andrewtch — also you could:

git clone git://github.com/v8/v8.git
make dependencies
make native library=shared -j8

then copy:

/usr/include/v8-debug.h
/usr/include/v8.h
/usr/lib/libv8.so

from

./out/native/lib.target/
and 
./includes
satoshi75nakamoto commented 11 years ago

@andrewtch — checking for V8 version... 3.8.9.20 is too old.

Can you build your own using what I pasted above.

andrewtch commented 11 years ago

build success, but

FAILED TEST SUMMARY
---------------------------------------------------------------------
Test V8::executeString() : Time limit [tests/memory_limit.phpt]
Test V8::executeString() : Time limit [tests/time_limit.phpt]
andrewtch commented 11 years ago

i'll dig through this tomorrow

beest commented 11 years ago

@andrewtch - this might be a really obvious point, but are you installing the new libv8js.so with a "make install"? Want to make sure you're not still using the old version.

Can you post the output diffs for the tests that failed to see if that helps to diagnose the problem?

ghost commented 11 years ago

@preillyme i did what you said above but I'm getting this error:

root@testv8com:/downloads/v8/v8-master# make native library=shared -j8 make[1]: Entering directory /downloads/v8/v8-master/out' CXX(target) /downloads/v8/v8-master/out/native/obj.target/v8_base.ia32/src/factory.o CXX(target) /downloads/v8/v8-master/out/native/obj.target/v8_base.ia32/src/handles.o CXX(target) /downloads/v8/v8-master/out/native/obj.target/v8_base.ia32/src/heap-profiler.o CXX(target) /downloads/v8/v8-master/out/native/obj.target/v8_base.ia32/src/heap-snapshot-generator.o CXX(target) /downloads/v8/v8-master/out/native/obj.target/v8_base.ia32/src/heap.o CXX(target) /downloads/v8/v8-master/out/native/obj.target/v8_base.ia32/src/hydrogen-instructions.o CXX(target) /downloads/v8/v8-master/out/native/obj.target/v8_base.ia32/src/hydrogen.o CXX(target) /downloads/v8/v8-master/out/native/obj.target/v8_base.ia32/src/ic.o g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions. make[1]: *** [/downloads/v8/v8-master/out/native/obj.target/v8_base.ia32/src/hydrogen.o] Error 4 make[1]: *** Waiting for unfinished jobs.... g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions. make[1]: *** [/downloads/v8/v8-master/out/native/obj.target/v8_base.ia32/src/heap.o] Error 4 make[1]: Leaving directory/downloads/v8/v8-master/out' make: *\ [native] Error 2

my versions: root@testv8com:/downloads/v8/v8-master# dpkg -l | grep gcc ii gcc 4:4.7.2-1ubuntu2 i386 GNU C compiler ii gcc-4.6-base:i386 4.6.3-10ubuntu1 i386 GCC, the GNU Compiler Collection (base package) ii gcc-4.7 4.7.2-2ubuntu1 i386 GNU C compiler ii gcc-4.7-base:i386 4.7.2-2ubuntu1 i386 GCC, the GNU Compiler Collection (base package) ii gcc-4.7-multilib 4.7.2-2ubuntu1 i386 GNU C compiler (multilib files) ii gcc-multilib 4:4.7.2-1ubuntu2 i386 GNU C compiler (multilib files) ii lib64gcc1 1:4.7.2-2ubuntu1 i386 GCC support library (64bit) ii libgcc1:i386 1:4.7.2-2ubuntu1 i386 GCC support library

OS: Ubuntu 12.10 x32 Server

beest commented 11 years ago

Wow, this error looks nasty! This isn't a code error, it's an internal error in g++.

Here are my versions, in case this helps:

ii gcc 4:4.6.3-1ubuntu5 GNU C compiler ii gcc-4.6 4.6.3-1ubuntu5 GNU C compiler ii gcc-4.6-base 4.6.3-1ubuntu5 GCC, the GNU Compiler Collection (base package) ii gcc-4.6-multilib 4.6.3-1ubuntu5 GNU C compiler (multilib files) ii gcc-multilib 4:4.6.3-1ubuntu5 GNU C compiler (multilib files) ii lib32gcc1 1:4.6.3-1ubuntu5 GCC support library (32 bit Version) ii libgcc1 1:4.6.3-1ubuntu5 GCC support library

OS: Ubuntu 12.04.1 LTS

satoshi75nakamoto commented 11 years ago

@alatui — I've tried your test.

php -d extension=/tmp/v8js.preilly/modules/v8js.so alatui.php

object(V8JsMemoryLimitException)#2 (7) {
  ["message":protected]=>
  string(46) "Script memory limit of 10000000 bytes exceeded"
  ["string":"Exception":private]=>
  string(0) ""
  ["code":protected]=>
  int(0)
  ["file":protected]=>
  string(28) "/tmp/v8js.preilly/testgh.php"
  ["line":protected]=>
  int(16)
  ["trace":"Exception":private]=>
  array(1) {
    [0]=>
    array(6) {
      ["file"]=>
      string(28) "/tmp/v8js.preilly/testgh.php"
      ["line"]=>
      int(16)
      ["function"]=>
      string(13) "executeString"
      ["class"]=>
      string(4) "V8Js"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(5) {
        [0]=>
        string(138) "var text = "abcdefghijklmnopqrstuvwyxz0123456789";
var memory = "";
for (var i = 0; i < 1000000; ++i) {
    memory += text;
}

print('end');
"
        [1]=>
        string(8) "basic.js"
        [2]=>
        int(1)
        [3]=>
        int(0)
        [4]=>
        int(10000000)
      }
    }
  }
  ["previous":"Exception":private]=>
  NULL
}
satoshi75nakamoto commented 11 years ago

@andrewtch — It looks like you might have just run out of memory try removing the, "-j8" argument.

andrewtch commented 11 years ago

@preillyme , it seems tests are wrong cos exception is thrown:

class V8JsMemoryLimitException#2 (8) {
  protected $message =>
  string(46) "Script memory limit of 10000000 bytes exceeded"
  private $string =>
  string(0) ""
  protected $code =>
  int(0)
  protected $file =>
  string(32) "/tmp/v8js/tests/memory_limit.php"
  protected $line =>
  int(13)
  private $trace =>
  array(1) {
    [0] =>
    array(6) {
      'file' =>
      string(32) "/tmp/v8js/tests/memory_limit.php"
      'line' =>
      int(13)
      'function' =>
      string(13) "executeString"
      'class' =>
      string(4) "V8Js"
      'type' =>
      string(2) "->"
      'args' =>
      array(5) {
        ...
      }
    }
  }
  private $previous =>
  NULL
  public $xdebug_message =>
  string(290) "\nV8JsMemoryLimitException: Script memory limit of 10000000 bytes exceeded in /tmp/v8js/tests/memory_limit.php on line 13\n\nCall Stack:\n    0.0001     228336   1. {main}() /tmp/v8js/tests/memory_limit.php:0\n    0.0044     229624   2. V8Js->executeString() /tmp/v8js/tests/memory_limit.php:13\n"
}
===EOF===
andrewtch commented 11 years ago

i've fixed the tests in PR #11 since proposed tests were using absolute urls like /var/www/v8js etc.

the only problem now is packaging for modern distros; have you thought about that?

satoshi75nakamoto commented 11 years ago

@andrewtch — Thanks for the PR. I've merged it. Yeah I'm not 100% sure what to do in regards to packaging. It's really the lib V8 dependancies that's a pain.

andrewtch commented 11 years ago

Maybe this week I'll try to make up a PPA for updated v8 and this package if you have nothing against that )

satoshi75nakamoto commented 11 years ago

@andrewtch — that's fine by me. But I just worry about Node.js issues. You can use the current PPA as a guideline.

beest commented 11 years ago

Perhaps we just need to improve documentation, and include an installation section to highlight run through the steps to get the extension up and running.

beest commented 11 years ago

I'll take a stab at writing it this week.

satoshi75nakamoto commented 11 years ago

@beest thanks, I really appreciate it.