Windows 中编译 PHP5.4 + xdebug
来源:互联网 发布:阿里云统计 编辑:程序博客网 时间:2024/06/06 22:45
参考 http://www.phpvim.net/web/php/build-php5-4-and-xdebug-on-win32.html
1. error C2466: cannot allocate an array of constant size 0
用C/C++写PHP的扩展模块,如果VS2005编译,可能会出现下面的错误:
<VS2005安装目录>\VC\include\sys/stat.inl(44) : error C2466: 不能分配常量大小为 0 的数组
,出现这种情况时,只需在 <VS2005安装目录>\vc\include\malloc.h 文件中找到:
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[ (expr) ]
并改成:
#ifdef PHP_WIN32
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[ (expr)?(expr):1 ]
#else
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[ (expr) ]
#endif
就可以了。
单独编译 pdo:
打开 VS2005 命令行工具
1)执行命令cscript /nologo configure.js --enable-pdo
php error C2491: 'strnlen' : definition of dllimport function
https://bugs.php.net/bug.php?id=47787
Description:
------------
Building 5.2.9 with VC++ 2005 results in the error:
main\spprintf.c(184) : error C2491: 'strnlen' : definition of dllimport function not allowed
This appears to be due to the change here: http://cvs.php.net/viewvc.cgi/php-src/main/spprintf.c?r1=1.25.2.2.2.14&r2=1.25.2.2.2.15
The issue is resolved by adding:
#define HAVE_STRNLEN 1
to win32/build/config.w32.h.in
2)ext\dom\php_dom.h(33) : fatal error C1083: Cannot open include file: 'libxml/parser.h': No such file or directory
修改 config 命令:cscript /nologo configure.js --enable-pdo --without-libxml
3)ext\calendar\jewish.c(324) : error C2001: newline in constant
关于 calendar.c 和 jewish.c 的编码问题:
这两个文件使用的是 ANSI 编码,包含有一些西文的特殊字符,GBK 字符集中不存在。
可用 editplus 打开,编码选择:West European (Windows),另存为 UTF-8。
- Windows 中编译 PHP5.4 + xdebug
- php5.4+xdebug
- windows下php5.4开启xdebug 或者是新安装xdebug
- Windows下使用VS2010编译PHP5.4
- PHP5 XDebug 的安装
- PHP5.4 linux 编译
- 在php中集成xdebug(windows平台)
- php5.4.14/5.3.24/5.2.17安装(In windows),配置Apache,MySQL,phpMyAdmin,zendOptimizer,xdebug
- php5.4.0安装(In windows),配置Apache,MySQL,phpMyAdmin,zendOptimizer,xdebug
- php5.4.5/5.3.15/5.2.17安装(In windows),配置Apache,MySQL,phpMyAdmin,zendOptimizer,xdebug
- php xdebug php5.dll missing
- php5.2.x安装xdebug
- windows 上 怎样编译 php 和 xdebug的 源代码
- 关于Xdebug 在PHP5.3中无法取得local variable值的问题解决
- 源码编译安装xdebug
- wordpress 调试环境建立【Xampp + Zend studio + xdebug(php5.4 thread safe) 】
- php5.3 xdebug 调试器安装配置
- Quick Reference:php5 Xdebug 生成Profiles
- 无堵塞的并发编程
- 罗技魏文杰:入门级市场有很大需求
- linux有关进程的使用
- c# winform 获取当前程序运行根目录
- 前置声明和Include以及预编译头
- Windows 中编译 PHP5.4 + xdebug
- 博客的变迁
- 五年java人的一点感悟
- 解决:Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into Flu
- JS 屏蔽 tab 键等
- 数据库设置初始化脚本
- 社交网络:小偷的行窃利器
- 安装R语言及R与python接口Rpy
- “可玩”摄像头 狂掀游戏风潮