Skip to content
/ zan Public
forked from youzan/zan

高效稳定、安全易用、线上实时验证的全异步高性能网络库,通过PHP扩展方式使用。

License

Notifications You must be signed in to change notification settings

xiyang2011/zan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

有赞logo

zanphp logo

高效稳定、安全易用、线上实时验证的全异步高性能网络库,通过PHP扩展方式提供。

遵循Apache协议,基于Swoole 1.8.5版本分支重构研发。

在此特别鸣谢Swoole开发组为PHP开源社区付出的努力和汗水。

License Build Status

Zan做了哪些事儿

  1. 大量模块解耦拆分
  2. 修复大量Bug、逻辑缺陷(内存泄露、释放逻辑)
  3. 内置通用连接池
  4. 支持时间轮算法
  5. 异步接口支持超时
  6. 增强Mysql client安全性(预处理、事务)
  7. Nova协议支持(RPC协议)
  8. 支持平滑重启
  9. 接口单元测试覆盖率100%
  10. 实时、全面的API文档
  11. ...

编译安装步骤

git clone https://github.com/youzan/zan.git
cd zan-extension
phpize
./configure --enable-sockets --enable-async-redis  --enable-openssl
make 
make install

Zan编译安装常见问题

  1. 若执行phpize报xxx/sed: No such file,请重装php或将/usr/bin/sed拷贝到xxx目录下。
  2. 若执行phpize报Cannot find autoconf,请先安装autoconf工具。
  3. 若执行configure时报错libcurl not installed,请重新安转curl库,并保证库与头文件名称与路径正确。 1) 如库名称与路径/usr/lib/libcurl.so(通常带版本号的libxxx.so.xxx会软连接到libXXX.so供链接器识别), 对应头文件路径则为/usr/include/curl。 2) 确认curl库正确安装后,请务必重新phpize && configure以保证新的配置生效。 3) 若按1)、2)操作后仍然报错,则可修改config.m4中PHP_CURL的配置路径为你安装curl的路径。
  4. 若执行make编译时报错Enable sockets support, require sockets extension,请确认PHP版本及sockets扩展正确安装。 1) 保证PHP版本在5.6以上版本。 2) sockets扩展被正确安装(HAVE_SOCKETS这个宏定义),如果没有请重新安装。 3) 若仍然报错,请按编译扩展的步骤安装sockets,即phpize && ./configure XXX && make && make install。
  5. 若执行configure时报错Enable openssl support, require openssl library,请重新安装openssl库并保证能链接正确。 1) 重新安装openssl库。 2) 添加openssl库路径供链接器找lib,如将-L/usr/local/opt/openssl/lib补充到config.m4中的LDFLAGS。 3) 添加openssl库依赖头文件路径,如将-I/usr/local/opt/openssl/include添加到config.m4中的CPPFLAGS。 4) 依然需要重新配置,按编译扩展步骤安装,phpize && ./configure XXX && make && make install。

官方交流渠道

官网:点我进入

Zan 的文档仓库地址:zan-doc

在线查看文档:http://zandoc.zanphp.io ✈

QQ群:115728122

常用链接

捐赠我们

捐赠通道

License

Zan 框架基于 Apache2.0 license 进行开源。

About

高效稳定、安全易用、线上实时验证的全异步高性能网络库,通过PHP扩展方式使用。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 70.0%
  • PHP 28.8%
  • M4 0.6%
  • C++ 0.4%
  • Shell 0.1%
  • CMake 0.1%