移植php,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-

配置和编译:此处为最简易的版本,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的信息

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值