/********************************************************************************
* 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. Codeforces Round #311 (Div. 2) D. Vitaly and Cycle 奇环

    题目链接: 点这里 题目 D. Vitaly and Cycle time limit per test1 second memory limit per test256 megabytes inpu ...

  2. cf 363D

    贪心加二分 虽然比赛后才过 ........ /************************************************************************* &g ...

  3. Android Activity初探

    原地址:Android Activity初探 Activity是一个应用中的组件,它为用户提供一个可视的界面,方便用户操作,比如说拔打电话.照相.发邮件或者是浏览地图等.每个activity会提供一个 ...

  4. Nginx正确记录post日志的方法

    Nginx正确记录post日志的方法 事实上可以很简单,这取决于把 access_log 放在哪个 location 里面. 一,放到包含fastcgi_pass或proxy_pass的Locatio ...

  5. 关于Backtracing中有重复元素的处理办法

    backtracing是一个常用的解法.之前遇到一个题目,求一个集合的子集, 例如给定{1,2,3,4,5},求其大小为3的子集. 利用backtracing可以较快的给出答案. 然而,该题还有一个变 ...

  6. linux源代码阅读笔记 linux文件系统(转)

    linux文件系统:   操作系统的文件数据除了文件实际内容外,还有非常多的属性,如文件权限(rwx)与文件属性(所有者.群组.时间参数等).   文件系统通常将这两部分数据存放在不同的块.权限属性放 ...

  7. HDU 1540 / POJ 2892 Tunnel Warfare (单点更新,区间合并,求包含某点的最大连续个数)

    题意:一条线上有n个点,D x是破坏这个点,Q x是表示查询x所在的最长的连续的点的个数,R是恢复上一次破坏的点. 思路:这题的关键是查询. 将被毁的村庄看成空位,当查询某个点的时候,如果我们知道它左 ...

  8. 为什么android的R类要定义成16进制

    联想到c语言中的宏定义:我想是一个原因 如: #define SDL_INIT_TIMER 0x00000001 #define SDL_INIT_AUDIO 0x00000010 #define S ...

  9. linux入门教程(二) 图形界面还是命令窗口

    对于linux的应用,我想大多数都是用在服务器领域,对于服务器来讲真的没有必要跑一个图形界面.所以我们平时安装linux操作系统时往往是不安装图形界面的.说到这里也许你会有疑问,图形界面还能选择装或者 ...

  10. lintcode :最小路径和

    题目: 最小路径和 给定一个只含非负整数的m*n网格,找到一条从左上角到右下角的可以使数字和最小的路径. 样例   注意 你在同一时间只能向下或者向右移动一步 解题: 这个和求三角形的最小路径的差不多 ...