分享

PHP交叉编译和移植

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

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多