• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Unable to initialize custom php module v8js

nisamudeen97

Regular Pleskian
Hi,

I am trying to enable v8js module for php 7.1 in plesk. I need this for installing dreamfactory. I followed the below doc as base and installed module in the server.

v8js - DreamFactory

Meanwhile i am getting the below information in php cli. Is there any solution for the same ?


Code:
PHP Warning:  PHP Startup: v8js: Unable to initialize module

Module compiled with module API=20151012

PHP    compiled with module API=20160303

These options need to match

 in Unknown on line 0
 
This means the extension was compiled with a different version of PHP than the one you're trying to use. In step 3 of the instructions you linked to, when you run "phpize", you need to choose the one for the version of PHP you'll be using. They're located in /opt/plesk/php/<version>/phpize ("<version>" being 7.0, 7.1 or 7.2 - though your setup may vary depending on which versions of PHP you have installed).
 
You need to start from something like:

# apt-get install plesk-php71-dev libv8-dev
# /opt/plesk/php/7.1/bin/pecl install v8js
...
 
Hi,

I have also tried the same step meanwhile it also failed. See the below information.


Code:
 /opt/plesk/php/7.1/bin/pecl install v8js

WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update

downloading v8js-2.1.0.tgz ...

Starting to download v8js-2.1.0.tgz (101,553 bytes)

.......................done: 101,553 bytes

28 source files, building

running: phpize

Configuring for:

PHP Api Version:         20160303

Zend Module Api No:      20160303

Zend Extension Api No:   320160303

Please provide the installation prefix of libv8 [autodetect] :

building in /tmp/pear-build-rootPPDH05/v8js-2.1.0

running: /tmp/v8js/configure --with-php-config=/opt/plesk/php/7.1/bin/php-config --with-v8js

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... /opt/plesk/php/7.1

checking for PHP includes... -I/opt/plesk/php/7.1/include/php -I/opt/plesk/php/7.1/include/php/main -I/opt/plesk/php/7.1/include/php/TSRM -I/opt/plesk/php/7.1/include/php/Zend -I/opt/plesk/php/7.1/include/php/ext -I/opt/plesk/php/7.1/include/php/ext/date/lib

checking for PHP extension directory... /opt/plesk/php/7.1/lib/php/modules

checking for PHP installed headers prefix... /opt/plesk/php/7.1/include/php

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 C standard version... c++11

checking how to allow c++11 narrowing... -Wno-narrowing

checking for libv8_libplatform... configure: error: could not find libv8_libplatform library

ERROR: `/tmp/v8js/configure --with-php-config=/opt/plesk/php/7.1/bin/php-config --with-v8js' failed
 
Hi,

Yes, I do.

Code:
root@:/opt/plesk/php/7.1/etc/php.d# apt-get install libv8-dev

Reading package lists... Done

Building dependency tree       

Reading state information... Done

libv8-dev is already the newest version (3.14.5.8-5ubuntu2).

0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
 
I suppose that you need to compile v8js according to phpv8/v8js anв then use path /opt/v8 for the question:

Please provide the installation prefix of libv8 [autodetect] :

when you run

# /opt/plesk/php/7.1/bin/pecl install v8js
 
Back
Top