您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP交叉编译跟移植

2026/2/10 17:19:25发布13次查看
php交叉编译和移植
配置和编译:此处为最简易的版本,disable掉了所有的扩展模块;[plain]
./configure --prefix=/home/pub/johnny/network/install-php --host=mips-linux-gnu --datadir=/home/pub/johnny/network/install-php/data --disable-feature --disable-all cc=mips-linux-gnu-gcc -el cflags=-el ldflags=-el
make
make istall
./configure --prefix=/home/pub/johnny/network/install-php --host=mips-linux-gnu --datadir=/home/pub/johnny/network/install-php/data --disable-feature --disable-all cc=mips-linux-gnu-gcc -el cflags=-el ldflags=-el
make
make istall
4、测试:
1)、修改fastcgi.conf
添加:
[plain]
fastcgi.server += (
/test.php =>
((
socket => /tmp/lighttpd.test.event.socket,
bin-path => /tmp/network/sbin/php-cgi,
# bin-path => /home/pub/johnny/network/install-php/bin/php-cgi,
# bin-path => /tmp/nmp/bin/test.php,
max-procs => 1,
# host => 127.0.0.1,
# port => 8081,
check-local => disable,
))
)
fastcgi.server += (
/test.php =>
((
socket => /tmp/lighttpd.test.event.socket,
bin-path => /tmp/network/sbin/php-cgi,
# bin-path => /home/pub/johnny/network/install-php/bin/php-cgi,
# bin-path => /tmp/nmp/bin/test.php,
max-procs => 1,
# host => 127.0.0.1,
# port => 8081,
check-local => disable,
))
)
2)、把/home/pub/johnny/network/install-php/bin/php-cgi copy 到开发板/tmp/network/sbin/php-cgi
3)、在/tmp/network/webpages/下创建test.php
[php]
phpinfo();
>
phpinfo();
>
4)、开发板上启动lighttpd
5)、在pc上输入http://192.168.*.*/test.php,则在浏览器上显示php的信息
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product