/********************************************************************************
* 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. ios Camera学习笔记

    检测设备的摄像头是否可用: - (BOOL) isCameraAvailable{ return [UIImagePickerController isSourceTypeAvailable: UII ...

  2. EXTJS学习笔记

    由于公司统一决策,决定使用EXTJS作为前台的开发UI框架,所以从今天开始学习EXTJS,对学习过程中遇到的问题做记录. 首先第一个问题:为什么要用ExtJS作为公司开发基础架构?   推荐一篇文章: ...

  3. IntelliJ IDEA 14 利用JRebel实现热部署 二

    前言:今天下午和一个qq群里讨论JRebel时,忽然得到“自动部署”的奥秘--真有听君一席话,胜读十年书的感悟. 这是此群友的热部署博客:http://blog.csdn.net/martinkey/ ...

  4. 【BZOJ】【2561】最小生成树

    网络流/最小割 对于所有小于L的边求一个割使得U,V不连通,这样就可以保证L可能在最小生成树里. 最大生成树同理. 答案累加一下即可.(Orz Hzwer) (我一开始怎么会sb地去想到一起求呢……) ...

  5. [C/CPP系列知识] 在C中使用没有声明的函数时将发生什么 What happens when a function is called before its declaration in C

    http://www.geeksforgeeks.org/g-fact-95/ 1 在C语言中,如果函数在声明之前被调用,那么编译器假设函数的返回值的类型为INT型, 所以下面的code将无法通过编译 ...

  6. 【WCF--初入江湖】08 并发与实例模式

    08 并发与实例模式 1. 实例上下文模式   一个服务代理:servicePoxy ChannelFactory<IService1> factoryservicel = new Cha ...

  7. uva 514

    栈的简单应用 /************************************************************************* > Author: xlc28 ...

  8. spoj 274

    离散化   枚举行  扫描横坐标 #include <iostream> #include <cstdio> #include <cstring> #include ...

  9. fedora下缺少autopoint包的解决办法

    编译过程中,报错,缺少autopoint包 然而无论是yum install autopoint 还是yum search autopoint都没有理想的答案 执行yum install gettex ...

  10. zoj 2777 Visible Lattice Points(欧拉函数,基础)

    题目 #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string.h> #include<algo ...