mkdir /opt/dev cd /opt/dev git clone git://github.com/facebook/hiphop-php.git export CMAKE_PREFIX_PATH=`pwd`/.. export HPHP_HOME=`pwd` sudo apt-get update sudo apt-get install git-core cmake g++ libboost1.48-dev libmysqlclient-dev \ libxml2-dev libmcrypt-dev libicu-dev openssl build-essential binutils-dev \ libcap-dev libgd2-xpm-dev zlib1g-dev libtbb-dev libonig-dev libpcre3-dev \ autoconf libtool libcurl4-openssl-dev libboost-regex1.48-dev libboost-system1.48-dev \ libboost-program-options1.48-dev libboost-filesystem1.48-dev wget memcached \ libreadline-dev libncurses-dev libmemcached-dev libbz2-dev \ libc-client2007e-dev libgoogle-perftools-dev \ libcloog-ppl0 libelf-dev libdwarf-dev libunwind7-dev subversion
# libevent git clone git://github.com/libevent/libevent.git cd libevent git checkout release-1.4.14b-stable cat ../hiphop-php/hphp/third_party/libevent-1.4.14.fb-changes.diff | patch -p1 ./autogen.sh ./configure --prefix=$CMAKE_PREFIX_PATH make make install cd .. # curl git clone git://github.com/bagder/curl.git cd curl ./buildconf ./configure --prefix=$CMAKE_PREFIX_PATH make make install cd .. # glog svn checkout http://google-glog.googlecode.com/svn/trunk/ google-glog cd google-glog ./configure --prefix=$CMAKE_PREFIX_PATH make make install cd .. # jemaloc wget http://www.canonware.com/download/jemalloc/jemalloc-3.0.0.tar.bz2 tar xjvf jemalloc-3.0.0.tar.bz2 cd jemalloc-3.0.0 ./configure --prefix=$CMAKE_PREFIX_PATH make make install cd .. # libunwind wget 'http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz' tar -zxf libunwind-1.1.tar.gz cd libunwind-1.1 autoreconf -i -f ./configure --prefix=$CMAKE_PREFIX_PATH make install cd .. # rm -rf libevent curl google-glog jemalloc-3.0.0.tar.bz2 jemalloc-3.0.0 libunwind-1.1
cd hiphop-php # HPHP_HOME, - export HPHP_HOME=`pwd` cmake -D CMAKE_PREFIX_PATH=/opt/dev .
make
Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions. make[2]: *** [hphp/CMakeFiles/hphp_runtime_static.dir/runtime/vm/bytecode.cpp.o] Error 4 make[1]: *** [hphp/CMakeFiles/hphp_runtime_static.dir/all] Error 2 make: *** [all] Error 2
export CMAKE_PREFIX_PATH=`pwd`/.. export HPHP_HOME=`pwd`
PidFile = /run/hiphop.pid Server { # , Port = 4849 # SourceRoot = /var/www/www.mysymfony2site.com/web/ } # , app.php VirtualHost { * { Pattern = .* RewriteRules { * { pattern = .* to = app.php qsa = true } } } }
/opt/dev/hiphop-php/hphp/hhvm/hhvm --mode daemon --config /opt/dev/hiphop-php/hphp/config.hdf
/opt/dev/hiphop-php/hphp/hhvm/hhvm --mode server --config /opt/dev/hiphop-php/hphp/config.hdf
location ~ ^/(app|app_dev|config)\.php(/|$) { # HipHop VP proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_pass http://localhost:4849; }
request.CRITICAL: Doctrine\ODM\MongoDB\Mapping\MappingException: No identifier/primary key specified for Document 'Project\MyBundle\Document\Visitor'. Every Document must have an identifier/primary key. (uncaught exception) at /var/www/www.mysymfony2site.com/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Mapping/MappingException.php line 94 [] [] request.CRITICAL: Exception thrown when handling an exception (Doctrine\ODM\MongoDB\Mapping\MappingException: No identifier/primary key specified for Document 'Project\MyBundle\Document\Visitor'. Every Document must have an identifier/primary key.) [] []
<?php for($i = 0; $i < 1000; $i++) { echo var_dump($_SERVER); }
ab -n 1000 -c 5 http://www.mysymfony2site.com/test.php
Concurrency Level: 5 Time taken for tests: 24.912 seconds Complete requests: 1000 Failed requests: 97 (Connect: 0, Receive: 0, Length: 97, Exceptions: 0) Write errors: 0 Total transferred: 1588072000 bytes HTML transferred: 1587891000 bytes Requests per second: 40.14 [#/sec] (mean) Time per request: 124.558 [ms] (mean) Time per request: 24.912 [ms] (mean, across all concurrent requests) Transfer rate: 62254.02 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.3 0 7 Processing: 44 124 26.9 120 268 Waiting: 38 103 23.5 101 231 Total: 44 124 26.9 120 268
Concurrency Level: 5 Time taken for tests: 387.404 seconds Complete requests: 1000 Failed requests: 85 (Connect: 0, Receive: 0, Length: 85, Exceptions: 0) Write errors: 0 Total transferred: 4263063000 bytes HTML transferred: 4262907000 bytes Requests per second: 2.58 [#/sec] (mean) Time per request: 1937.018 [ms] (mean) Time per request: 387.404 [ms] (mean, across all concurrent requests) Transfer rate: 10746.28 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.5 0 10 Processing: 1163 1936 214.5 1865 3365 Waiting: 1 11 63.6 3 1371 Total: 1163 1936 214.6 1865 3365
Source: https://habr.com/ru/post/189960/
All Articles