PHP

Can't find PHP headers in /usr/include/php

# pecl install Seaslog
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading SeasLog-1.2.3.tgz ...
Starting to download SeasLog-1.2.3.tgz (66,692 bytes)
.................done: 66,692 bytes
22 source files, building
running: phpize
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
ERROR: `phpize' failed
已邀请:

采菊篱下 - 无分享不快乐 助力技术开源分享 运维一枚

赞同来自:

你可以安装xdebug定位问题,如下步骤:
> 1.安装php命令执行的开发包


# yum -y install php-devel
如果是php5.4的话,如下安装
# yum -y install php54w-devel确保你php-pear的包安装了# yum -y install php-pear
php5.4安装如下
# yum -y install php54w-pear
> 2.安装GCC和c++编译器GCC用来编译php的Xdebug扩展


# yum install gcc gcc-c++ autoconf automake
> 3.编译Xdebug


# pecl install Xdebug
> 4.查找php.ini


# locate php.ini添加如下内容到php.ini中,活着添加到/etc/php.d/xdebug.ini也行,放到扩展目录中
zend_extension="/usr/lib64/php/modules/xdebug.so"
xdebug.remote_enable = 1
> 5.重启Apache


# service httpd restart
> 6.创建test.php测试Xdebug的工作原理


<?php phpinfo(); ?>

要回复问题请先登录注册