/********************************************************************************
* matrix-gui-2.0 undefined function json_encode()
* 声明:
* 本文解决matrix-gui-2.0中遇到的:
* Fatal error:
* Call to undefined function json_encode() in /www/generate.php on line 134
* 以及busybox httpd找不到index.html,主要是由于index.html被替换成了index.php
*
* 2016-1-31 深圳 南山平山村 曾剑锋
*******************************************************************************/ 一、参考文章:
. PHP移植
http://www.cnblogs.com/dancheblog/p/3508675.html
. Ubuntu Correct path to libxml2 when configuring PHP
https://www.howtoforge.com/community/threads/ubuntu-correct-path-to-libxml2-when-configuring-php-5.9982/
. 编译安装php
http://www.cnblogs.com/alexqdh/archive/2012/11/20/2776017.html
. linux下安装PHP出现错误 求助大家了
http://bbs.chinaunix.net/thread-1962843-1-1.html
. Using the busybox HTTP server
http://wiki.chumby.com/index.php?title=Using_the_busybox_HTTP_server 二、下载、编译libxml2-2.7..tar.gz
. https://buildroot.org/downloads/
. sudo ./configure --host=arm-linux-gnueabihf --prefix=/usr/local/php && make && make install
. 注意配置好编译器环境变量。 三、 下载、编译zlib-1.2..tar.gz
. http://www.zlib.net/
. sudo CC=arm-linux-gnueabihf-gcc ./configure --shared --prefix=/usr/local/php && make && make install
. 注意配置好编译器环境变量。 四、重新编译php-5.5..tar.bz2
./configure --host=arm-linux-gnueabihf --prefix=/usr/local/php --disable-all --enable-fastcgi --enable-session --enable-tokenizer --enable-pdo --with-sqlite --with-sqlite3 --with-pdo-sqlite --with-pcre-regex --without-iconv --with-libxml-dir=/usr/local/php --enable-libxml --enable-spl --enable-simplexml --enable-json --with-zlib --with-zlib-dir=/usr/local/php 五、error:
. 错误1:
. 错误现象:
......
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... (cached) /usr/bin/xml2-config
configure: error: xml2-config not found. Please check your libxml2 installation.
. 解决办法:
. 编译安装:libxml2-2.7..tar.gz
. php-5.5.31加入编译条件(目录根据自己前面编译libxml是写的目录):
--enable-libxml --with-libxml-dir=/home/Qt/rootfs/busybox/php/libxml2-2.7.
. 错误2:
. 错误现象:
......
checking for strftime... (cached) yes
checking which regex library to use... php
checking whether to enable LIBXML support... yes
checking libxml2 install dir... /home/Qt/rootfs/busybox/php/libxml2-2.7.
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
. 解决办法:“
sudo apt-get install libxml2-dev
. 错误3:
. 错误现象:
......
checking whether to enable the SQLite3 extension... yes
checking bundled sqlite3 library... yes
checking for ZLIB support... yes
checking if the location of ZLIB install directory is defined... no
checking for zlib version >= 1.2.0.4... 1.2.3.4
checking for gzgets in -lz... no
configure: error: ZLIB extension requires gzgets in zlib
. 解决办法:
. 编译安装:zlib-1.2..tar.gz
. php-5.5.31加入编译条件(目录根据自己前面编译zlib是写的目录):
--with-zlib --with-zlib-dir=/usr/local/php 六、matrix_gui 找不到index.html:
. 这可能是由于busybox的httpd默认识别的index.html,但我们的是index.php;
. 由上可知,我们需要在matrix_gui中指定我们需要访问的是index.php;
. 当然,我们也是可以在/etc/httpd.conf配置:
I:index.php # Show index.php when a directory is requested 七、总结:
zlib最好要先于libxml2编译,同时在编译libxml2的时候将zlib的安装目录放置于PATH最前面。

busybox filesystem matrix-gui-2.0 undefined function json_encode()的更多相关文章

  1. busybox filesystem add ldd function

    /******************************************************************** * busybox filesystem add ldd f ...

  2. busybox filesystem httpd php-5.5.31 sqlite3 webserver

    /******************************************************************** * busybox filesystem httpd php ...

  3. 在ubuntu16.10 PHP测试连接MySQL中出现Call to undefined function: mysql_connect()

    1.问题: 测试php7.0 链接mysql数据库的时候发生错误: Fatal error: Uncaught Error: Call to undefined function mysqli_con ...

  4. "Fatal error: Call to undefined function: file_put_contents()"

    打开页面时提示这个错误: Fatal error: Call to undefined function: file_put_contents() 意思是请求未定义的函数,出现这个提示通常有两种情况: ...

  5. fatal error: Call to undefined function mysqli_connect()

    在搭建PHP5.6+APACHE2.4+MYSQL5的平台时,测试是否成功连接mysql, 测试程序index.php <?php phpinfo() ?> 没有出现mysql的信息 所以 ...

  6. Mac下Call to undefined function imagettftext() 解决方案

    文章转载至Mac下Call to undefined function imagettftext()终极解决方案 安装了一套onethink程序准备调试,结果在登录页面发现验证码无法显示,单独访问验证 ...

  7. JS魔法堂:从void 0 === undefined说起

    一.前言 当使用coffeescript书写如下代码时 name = person?.name 会被预编译为 ; ,那么void 0到底是什么意思呢?运行得知void 0===undefined为tr ...

  8. Fatal error: Call to undefined function imagettftext()解决办法

    Fatal error: Call to undefined function imagettftext()解决办法   我的问题是php编译安装时指定了gd的目录,其实不用指定.就可以了 博客分类: ...

  9. PHP ERROR : Call to undefined function curl_init()

    在使用PHP 的Curl方法时出现了以下错误 可能的解决办法: 在php.ini 中确保 启用了php_curl.dll组件 确保PHP版本 (PHP 4 >= 4.0.2, PHP 5, PH ...

随机推荐

  1. 增强学习(Reinforcement Learning and Control)

    增强学习(Reinforcement Learning and Control)  [pdf版本]增强学习.pdf 在之前的讨论中,我们总是给定一个样本x,然后给或者不给label y.之后对样本进行 ...

  2. 山寨小小军团开发笔记 之 Arrow Projectile

    好久没怎么更新博客了,今天抽空来一篇,讨论一下弓箭的轨迹生成. 一.原理 弓箭的轨迹本质就是一个数学问题,使用一个 bezier 曲线公式就可以插值生成.得到轨迹后,做一个lookAt就可以了. 二. ...

  3. POJ2104 k-th number 划分树

    又是不带修改的区间第k大,这次用的是一个不同的方法,划分树,划分树感觉上是模拟了快速排序的过程,依照pivot不断地往下划分,然后每一层多存一个toleft[i]数组,就可以知道在这一层里从0到i里有 ...

  4. ZOJ 1642 Match for Bonus (DP)

    题目链接 题意 : 给你两个字符串,两个字符串都有共同的字母,给你每个字母的值,规则是,找出两个字符串中的共同的一个字母,然后这个字母的值就可以加到自己的分数上,但是这步操作之后,这两个字母及其之前的 ...

  5. VisualSvn+TortoiseSVN的安装说明

    一.VisualSvn安装及简单使用 下载VisualSvn:VisualSVN-Server-2.5.5.msi 系统:Win7系统 安装步骤: 1.下载VisualSVN-Server-2.5.5 ...

  6. [mock]8月8日

    第一题是整数的方阵,求其中的子方阵,和最大.返回最大和以及子方阵宽度.因为做了topcoder的题,所以比较顺手,O(n^3)的复杂度. pair<int,int> maxiSum(vec ...

  7. HTML5入门6---视频播放按钮

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  8. Linux内核的同步机制

    本文详细的介绍了Linux内核中的同步机制:原子操作.信号量.读写信号量和自旋锁的API,使用要求以及一些典型示例 一.引言 在现代操作系统里,同一时间可能有多个内核执行流在执行,因此内核其实象多进程 ...

  9. JavaScript基础精华01(变量,语法,数据类型)

    JavaScript是一种脚本语言. 脚本,一条条的文字命令.执行时由系统的一个解释器,将其一条条的翻译成机器可识别的指令,然后执行 JavaScript基本组成 1.基本语法(浏览器基本都支持,有统 ...

  10. IP地址字符串与BigInteger的转换

    /**  * Copyright (c) 2010, 新浪网支付中心  *      All rights reserved.  *  * Java IP地址字符串与BigInteger的转换,  * ...