# 下载到/var/www/php5目录下 cd /var/www/php5 wget http://mirrors.sohu.com/php/php-5.2.14.tar.gz # 解压 tar zxvf php-5.2.14.tar.gz # 进入PHP的openssl扩展模块目录 cd php-5.2.14/ext/openssl/ /var/www/php5/bin/phpize # 这里为你自己的phpize路径,如果找不到,使用whereis phpize查找 # 执行后,发现错误 ...
Read More »Monthly Archives: 三月 2015
不同域名 kindeditor 批量上传失败
解决方法是在请求上传的服务器根目录下添加crossdomain.xml *号代表所有域
Read More »字体文件跨域 Access-Control-Allow-Origin
解决办法: 1、把字体文件放在你网站根目录下。 2、给字体文件的http头里面添加Access-Control-Allow-Origin属性,以控制指定域引用你的字体文件。 nginx: apache: http.config增加: LoadModule headers_module modules/mod_headers.so 增加: AddType application/vnd.ms-fontobject .eot AddType font/ttf .ttf AddType font/ot ...
Read More »PHP操作MongoDB
PHP 5.6 Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version
升级php5.6后发现POST提交时出现 : Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. 查看官网后发现 使用 always_populate_raw_post_data 会产生 E_DEPRECATED 错误。 请使用 php://input 替代$HTTP_RAW_POST_DATA, 因为它可能在后续的 PHP ...
Read More »nginx 支持php path_info
server { listen 80; server_name www.frankway.net; index index.html index.htm index.php; root /a/b/c; location ~ \.php($|/) { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_index index ...
Read More »nginx中php出现白屏解决方法
nginx;php-fpm安装后,html静态页面没问题,但是phpinfo页面虽然返回200,但总是空白页 也没有任何报错,考虑应该是nginx已经将php页面转移给php处理了,所以问题应该在php的配置上,经过查找,发现需要在nginx中加入一句话 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 在nginx.conf中的 location ~ \.php$ { roo ...
Read More »memcached常见命令
1、启动Memcache 常用参数 -p <num> 设置端口号(默认不设置为: 11211) -U <num> UDP监听端口(默认: 11211, 0 时关闭) -l <ip_addr> 绑定地址(默认:所有都允许,无论内外网或者本机更换IP,有安全隐患,若设置为127.0.0.1就只能本机访问) -d 独立进程运行 -u <username> 绑定使用指定用于运行进程<username> ...
Read More »在Linux上安装Memcached服务
下载并安装Memcache服务器端 服务器端主要是安装memcache服务器端. 下载:http://www.danga.com/memcached/dist/memcached-1.2.2.tar.gz 另外,Memcache用到了libevent这个库用于Socket的处理,所以还需要安装libevent,libevent的最新版本是libevent-1.3。(如果你的系统已经安装了libevent,可以不用安装) 官网:http://www.monkey.org/~provos/libev ...
Read More »Ubuntu安装php即常见错误解决方法
下载PHP源码包 wget http://cn2.php.net/distributions/php-5.3.8.tar.gz 解压tar zxvf php-5.3.8.tar.gz 解压后进入php目录中,“cd php-5.3.8”回车,并执行“sudo ./configure –prefix=/usr/local/server/php –with-config-file-path=/usr/local/server/php –enable-mbstrin ...
Read More »mongoDB-python
import pymongo con = pymongo.Connection('localhost', 27017) mydb = con.mydb # new a database mydb.add_user('test', 'test') # add a user mydb.authenticate('test', 'test') # check auth muser = mydb.user # new a table muser.save({'id':1, 'name':'test'}) ...
Read More »mongodo 权限认证
1. 在开启MongoDB 服务时不添加任何参数时,可以对数据库任意操作,而且可以远程访问数据库。如果启动的时候指定—auth参数,可以对数据库进行用户验证。 $ ./mongod –auth >> mongodb.log & 开启 ./mongo MongoDB shell version: 1.8.1 connecting to: test >show dbs admin (empty) local ( ...
Read More »mongodb 管理
1. 启动和停止MongoDB: 执行mongod命令启动MongoDB服务器。mongod有很多可配置的选项,我们通过mongod –help可以查看所有选项,这里仅介绍一些主要选项: –dbpath: 缺省情况下数据库的数据目录为/data/db。对于Windows平台,如果当前的可执行文件位于D盘,那么其缺省数据目录为D:\data\db。我们可以通过这个选项为服务程序重新指定数据目录。如果当前主机运行多个mongod,那么必须为每个服务程序指定不同的数据目录,因 ...
Read More »