Home  >  Article  >  Backend Development  >  PHP cross-compilation and porting_PHP tutorial

PHP cross-compilation and porting_PHP tutorial

WBOY
WBOYOriginal
2016-07-14 10:10:051216browse

Configuration and compilation: This is the simplest version, disable all extension modules;


[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. Test:
1). Modify fastcgi.conf
Added:

[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). Copy /home/pub/johnny/network/install-php/bin/php-cgi to the development board /tmp/network/sbin/php-cgi
3). Create test.php

under /tmp/network/webpages/

[php]
phpinfo();
?>

phpinfo();
?>
4). Start lighttpd on the development board
5). Enter http://192.168.*.*/test.php on the PC, and the php information will be displayed on the browser

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477576.htmlTechArticleConfiguration and compilation: This is the simplest version, disable all extension modules; [plain] . /configure --prefix=/home/pub/johnny/network/install-php --host=mips-linux-gnu --data...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn