当前位置: 技术问答>linux和unix
编译php时出现的问题
来源: 互联网 发布时间:2015-09-25
本文导语: mysql 和apache都已经装好 编译php时 不管执行 ./configure --with-apache=../apache_1.3.33 --with-mysql --disable-debug 还是执行 ./configure --with-apxs=../apache_1.3.33 --with-mysql --disable-debug 都会出现问题 大虾们帮小弟看看什么问题 谢谢...
mysql 和apache都已经装好 编译php时
不管执行
./configure --with-apache=../apache_1.3.33 --with-mysql --disable-debug
还是执行
./configure --with-apxs=../apache_1.3.33 --with-mysql --disable-debug
都会出现问题 大虾们帮小弟看看什么问题 谢谢啊
出错信息
checking for gawk... gawk
checking for bison... no
checking for byacc... no
configure: warning: You will need bison if you want to regenerate the PHP parser
s.
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: line 2422: lex: command not found
configure: error: cannot find output from lex; giving up
不管执行
./configure --with-apache=../apache_1.3.33 --with-mysql --disable-debug
还是执行
./configure --with-apxs=../apache_1.3.33 --with-mysql --disable-debug
都会出现问题 大虾们帮小弟看看什么问题 谢谢啊
出错信息
checking for gawk... gawk
checking for bison... no
checking for byacc... no
configure: warning: You will need bison if you want to regenerate the PHP parser
s.
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: line 2422: lex: command not found
configure: error: cannot find output from lex; giving up
|
你既然把apache这样编译了./configure --prefix=/usr/local/apache
那php编译参数该这样
./configure --with-apxs=/usr/local/apache/bin/apxs --disable-debug
那php编译参数该这样
./configure --with-apxs=/usr/local/apache/bin/apxs --disable-debug
|
>./configure --with-apxs=../apache_1.3.33 --with-mysql --disable-debug
---------------------------^^^^^^^^^^^^^^-----------------------------
应该是=../apache_1.3.33/bin/apxs
---------------------------^^^^^^^^^^^^^^-----------------------------
应该是=../apache_1.3.33/bin/apxs
|
是的.
|
lex yacc估计是必要的
|
在httpd.conf加入
AddType application/x-httpd-php .php
AddType application/x-httpd-source .phps
AddType application/x-httpd-php .php
AddType application/x-httpd-source .phps