Category: Study

Ubuntu安装mysql5.6.10

Ubuntu下继续安装PHP开发环境,到了安装mysql这一步,由于下的是mysql的最新版本mysql-5.6.10,而mysql貌似从5.5已经不用./configure来配置了,换成了cmake。 于是只能google。最后结合几篇文章与mysql官网的配置介绍Source-Configuration Options,搞定了这个配置。 文本如下: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ > -DDEFAULT_CHARSET=utf8 \ > -DDEFAULT_COLLATION=utf8_general_ci \ > -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \ > -DWITH_MYISAM_STORAGE_ENGINE=1 \ > -DWITH_INNOBASE_STORAGE_ENGINE=1 \ > -DWITH_ARCHIVE_STORAGE_ENGINE=1 \ > -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \ > -DWITH_MEMORY_STORAGE_ENGINE=1 \ > -DWITH_READLINE=1 \ > -DENABLED_LOCAL_INFILE=1 \ > -DMYSQL_DATADIR=/db/mysql/data \ > -DMYSQL_USER=mysql \ > -DMYSQL_TCP_PORT=3306 哦对了,有可能会要sudo。 然后出现了一个问题。 Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) […]

Ubuntu搭建LAMP环境(安装新版本的Apache服务器)出现问题,执行配置安装httpd时出错

继续在ubuntu下配置PHP开发环境,做到安装Apache服务器了,执行configure的时候,报错,具体如下 configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/. google以后,发现这是需要下载apr和apr-utils 并解压到./srclib/, 再进行编译。 解决办法: 1.1 在上面的链接或者网上下载 apr-1.4.6.tar.gz和apr-util-1.4.1.tar.gz,放到/usr/local/src/目录下,解压软件包到当前目录的apr-1.4.6/和apr-util-1.4.1/下,命令如下: $ cd /usr/local/usr/                                      // 进入源码包所在目录 $ sudo tar […]

Ubuntu搭建LAMP环境(安装最新的GD库文件)出现问题,没有头文件

继续安装php开发环境,当安装最新的GD库文件,执行make命令的时候,出现了没有头文件的问题。错误代码如下: error: png.h: No such file or directory 其实就是头文件的路径不对。 解决办法: vim gd_png.c 将 #include “png.h”              替换成: #include “/usr/local/libpng/include/png.h”               然后再make就可以了 注:include“”双引号里包含的是libpng安装的路径里的include文件夹

Ubuntu搭建LAMP环境(安装libpng)出现问题,没有makefile文件

继续安装php开发环境,当安装到libpng的时候,输入make命令,确发现提示错误,没有找到makefile。 我还纳闷儿了,明明有makefile.am 和 makefile.in啊,configure以后不就生成makefile了嘛,于是又执行了一遍configure,结果在最后一行发现错误,如下。 configure: error: zlib not installed google以后,发现大家都是用的这个方法解决: 1.进入zlib的源文件目录,执行命令 make clean,清除zlib; 2.重新配置 ./configure,后面不要接–prefix参数; 3.编辑 make && make install 安装; 4.进入libpng目录,执行命令 ./configure –prefix=/usr/local/libpng; 5.编译 make && make install 安装; ————————————-华丽丽的分割线,下面是英语版———————– English Version: Continue to install the PHP environment. When install the libpng package after entering the make command, the error “cannot find the makefile” […]

Ubuntu搭建LAMP环境(安装libxml)出现问题

由于项目需要,得在自己的机器上搭建一套PHP开发环境。在安装libxml2-2.6.30,用make的时候出现以下问题。如下图所示。 In function ‘open’,inlined from ‘xmlNanoHTTPSave__internal_alias’ at nanohttp.c:1588:12: /usr/include/i386-linux-gnu/bits/fcntl2.h:51:24: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments 解决办法: 打开libxml所在目录下的nanohttp.c,第1588行由 fd = open(filename, O_CREAT | O_WRONLY);更换为 fd = open(filename, O_CREAT | O_WRONLY,0777); 亲测,可行,重新make即可。

EasyPHP局域网内其他用户不能访问我的页面

做智能喵居的时候,需要用到PHP,一直都用的是EasyPHP开发。结果当我测试本机PHP与局域网内另一台机器通过socket通信的时候,发现另外一台机器怎么也访问不了我的PHP页面。 Google以后发现是配置问题,在 “你的EasyPHP目录/conf_files/httpd.conf” 文件的第62行(我的是EasyPHP 12.1,其他版本你搜索Listen关键字定位即可),你会发现他在这里指定监听端口号的时候,把IP地址也指定成了127.0.0.1,原话如下。   # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. […]

Windows下的PHP 5.3.x 配置 Zend Guard Loader

一直以来,我都用的EasyPHP(EasyPHP是一个Windows下的Apache+Mysql+Perl/PHP/Python开发包)来做php开发。这周由于项目需要,需要把一个经过Zend Guard加密的PHP项目解密。 由于Zend Optimizer只支持到php5.2.x,所以只好用Zend Guard Loader(支持php5.3.x)。配置了半天都不成功。google以后发现,是由于Zend Guard Loader不支持线程安全版本的php。 要查看自己的php是否支持线程安全,只需要在一个php文件里写上代码 <?php phpinfo(); ?> 然后运行就知道了。 我的运行结果如下图所示。是线程安全的,所以也不用配置了,没用。找其他方法吧。sigh~