PHP-X

安装

修改~/.bashrc设置环境变量:

  • PHPX_ROOT:设置phpx的根路径
  • PATH:将$PHPX_ROOT/bin目录加入系统可执行文件路径
vim ~/.bashrc
export PHPX_ROOT=/path/to/phpx
export PATH=$PHPX_ROOT/bin:$PATH

下载并安装

curl -sS https://swoole-cloud.com/phpx/installer.sh | sh

更新

# 更新 phpx
phpx update self
# 更新内核,包括 php swoole 以及其他扩展
phpx update core

  • 灬白菜灬

    开始C++开发

  • 飞鸿影

    用php-x写php扩展 | 鱼儿的博客 https://yuerblog.cc/2017/07/11/php-x-extension/

  • Ma.Alex

    环境提示cmake 版本过低

    cmake source install as follows:
    
    0 cd ~
    
    1 wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
    
    2 tar xvf cmake-3.5.2.tar.gz
    
    This worked for me  then:
    
    3 cd cmake-3.4.3
    
    4 ./bootstrap --prefix=/usr
    
    这一步很关键,如果没有指定prefix,后面使用时会报错Could not find CMAKE_ROOT
    
    5 make
    
    6 sudo make install
    
    check:
    
    cmake --version
    
    [root@localhost cmake-3.5.2]# cmake --version
    cmake version 3.5.2
    
    CMake suite maintained and supported by Kitware (kitware.com/cmake).
    

  • Ma.Alex

    PHP 7.0 or later
    Linux/MacOS/Windows  
    CMake 3.5 or later. 
    GCC 4.8 or later 
    

    CMake 低版本升级

    cmake source install as follows:
    
    0 cd ~
    
    1 wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
    
    2 tar xvf cmake-3.5.2.tar.gz
    
    This worked for me  then:
    
    3 cd cmake-3.4.3
    
    4 ./bootstrap --prefix=/usr
    
    这一步很关键,如果没有指定prefix,后面使用时会报错Could not find CMAKE_ROOT
    
    5 make
    
    6 sudo make install
    
    check:
    
    cmake --version
    
    [root@localhost cmake-3.5.2]# cmake --version
    cmake version 3.5.2
    
    CMake suite maintained and supported by Kitware (kitware.com/cmake).
    
    

  • Ma.Alex

    各个系统需在结合这个 http://www.cnblogs.com/mophee/archive/2013/03/19/2969456.html

  • 大苏打的苏打水

    执行cmake -j 4 命令的时候出问题了,In file included from /root/PHP-X/src/exec.cc:19:0: /root/PHP-X/include/phpx.h:23:17: 致命错误:php.h:没有那个文件或目录 #include "php.h"

  • 大苏打的苏打水

    执行make -j 4 命令的时候出问题了,In file included from /root/PHP-X/src/exec.cc:19:0: /root/PHP-X/include/phpx.h:23:17: 致命错误:php.h:没有那个文件或目录 #include "php.h"

  • 闻海南

    这个写php扩展的?

  • 开始学习