>  기사  >  백엔드 개발  >  PHP交叉编译和移植_PHP教程

PHP交叉编译和移植_PHP教程

WBOY
WBOY원래의
2016-07-14 10:10:051217검색

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

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/477576.htmlTechArticle配置和编译:此处为最简易的版本,disable掉了所有的扩展模块; [plain] ./configure --prefix=/home/pub/johnny/network/install-php --host=mips-linux-gnu --data...
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.