程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> PHP交叉編譯和移植

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-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]
<?php 
phpinfo(); 
?> 

<?php
phpinfo();
?>
4)、開發板上啟動lighttpd
5)、在PC上輸入http://192.168.*.*/test.php,則在浏覽器上顯示php的信息

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved