O
O
Oleg2014-03-06 20:38:56
linux
Oleg, 2014-03-06 20:38:56

How to run KPHP?

Good day!
Does anyone know how to build and run KPHP properly ? The documentation has instructions for building, but it does not include building KPHP.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
Mikhail Osher, 2014-03-07
@miraage

You don't need it if you don't know how to assemble it.

L
Lesha Kiselev, 2014-03-07
@Yakud

We clone the KPHP repository
In the folder with the turnip we do
Do not forget to install the necessary libraries.
We look at /kphp-kdb/objs/bin/kphp2cpp
There you can see
Run:
File [kphp/[email protected]] changed
File [kphp/xmain.cpp] changed
File [kphp/init_scripts.cpp] changed
File [kphp/init_scripts.h] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/vars0.cpp] changed
File [kphp/vars.cpp] changed

G
Gregory, 2014-04-13
@ximik777

Installed on Ubuntu 12.04.4 LTS
sudo apt-get install git-core openssl zlib1g-dev libcg libprcre3-dev
Install libre2:
wget re2.googlecode.com/files/re2-20140304.tgz
tar -zxvf re2-20140304.tgz
cd re2 /
make
make test (Ignore the error)
make install
make testinstall
cd /usr/local/src/
git clone https://github.com/vk-com/kphp-kdb
cd /usr/local/src/kphp- kdb/
make kphp
Check build: /usr/local/src/kphp-kdb/objs/bin/kphp2cpp
If everything is ok:
export KPHP_PATH=/usr/local/src/kphp-kdb
An example of compiling php to kphp:
For example, take a file bench.php
It lies here: https://gist.github.com/anonymous/9391146
Download, put.
mkdir /var/www/testkphp
cd /var/www/testkphp/
Compile bench.php into kphp
python /usr/local/src/kphp-kdb/KPHP/tests/kphp.py bench.php -o bench
After compilation, run
. /bench
We will see the table of tests.
Compare with php:
php bench.php Rejoice
!

A
arseny30, 2014-03-07
@arseny30

export KPHP_PATH=<path_to_git>
python KPHP/tests/kphp.py a.php -o a

R
rumkin, 2014-03-06
@rumkin

make && make installdid not help?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question