时间是把杀刀猪
ciaos · 共 174 篇文章
vsftpd出现550 SITE CHMOD command failed.
centos 6(centos 7没遇到这个问题) ftp 配置后,用sublime text修改文件保存时出如下问题 b'FTPSync [default] > Connected to: localhost:21 (timeout: 30) (key: cf1870902e065b11b67b92a95b960a3e)' b'FTPSync [default] > Logged in as: ftp (using password: YES)' b'FTPSync [default] > Failed ensure root exists [Exception: 550 SITE CHM…
2016-01-16T17:20:20Z · 非技术 · 评论(0)
docker相关资料
docker技术入门与实战 http://dockerpool.com/static/books/docker_practice/repository/dockerhub.html
2016-01-12T11:33:42Z · 行业应用 · 评论(0)
codeigniter 数据库操作内存泄漏
数据库查询前 $this->db->save_queries = FALSE; 或者配置 $db['default']['save_queries'] = FALSE; 详情参照: http://forum.codeigniter.com/archive/index.php?thread-11020.html
2015-12-16T17:49:03Z · 非技术 · 评论(0)
Sublime Text 3 ftp插件使用
1,安装Package Control 按Ctrl+`调出console, 粘贴以下代码到底部命令行并回车: import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ',…
2015-12-05T15:19:57Z · 非技术 · 评论(0)
Centos下Yum安装PHP5.5,5.6
此外可安装epel,和remi官方源,速度比webtatic更快 转自:http://www.blogjava.net/nkjava/archive/2015/01/20/422289.html Centos下Yum安装PHP5.5,5.6 默认的版本太低了,手动安装有一些麻烦,想采用Yum安装的可以使用下面的方案: 1.检查当前安装的PHP包 yum list installed | grep php 如果有安装的PHP包,先删除他们 yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.…
2015-11-21T09:34:45Z · 非技术 · 评论(0)
远程运行脚本
#!/usr/bin/expect -- #################################### # Run Remote Script # Usage: ./ssh.exp ip user passwd port commands timeout #################################### if { [llength $argv] < 4 } { puts "### USAGE: $argv0 ip user passwd port commands timeout" exit 1 } match_max 600000 set ip [lin…
2015-11-03T10:20:46Z · 开源软件 · 评论(0)
C++实现urlencode/urldecode编码
#include<iostream> #include<stdio.h> #include<cstring> using namespace std; const char hexchars[] = "0123456789abcdef"; const char HEXCHARS[] = "0123456789ABCDEF"; int PHPhtoi(char *pszStr) { int iValue; int iChar; iChar = ((unsigned char *)pszStr)[0]; if (isupper(iChar)) iChar = tolower(iChar); iV…
2015-10-22T10:37:08Z · 编程语言 · 评论(0)
php开发扩展程序
下载php-src 5.6.13版本(试过5.3版本编译不过) [root]# ./ext_skel --extname=pkey Creating directory pkey Creating basic files: config.m4 config.w32 .gitignore pkey.c php_pkey.h CREDITS EXPERIMENTAL tests/001.phpt pkey.php [done]. To use your new extension, you will have to execute the following steps: 1. $ cd .. …
2015-10-19T20:12:28Z · 编程语言 · 评论(0)
Linux 下 YUM 安装 PHP 5.5
系统环境: CentOS 6.4 x86_64 Fedora 20 x86_64 Fedora 20 源中已经有了PHP的源,直接可以使用以下命令安装即可: # yum install php-fpm php-common php-devel php-mysqlnd php-mbstring php-mcrypt 以下为 CentOS 下安装 PHP 方法: 添加 epel 源 # rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 添加 remi 源 # rpm -…
2015-10-07T16:44:28Z · 编程语言 · 评论(0)
varnish代理缓存配置
yum install varnish,开机自启动,将nginx配置文件改为监听127.0.0.1:8080 配置varnish varnish.params如下(端口改为80) # Varnish environment configuration description. This was derived from # the old style sysconfig/defaults settings # Set this to 1 to make systemd reload try to switch vcl without restart. RELOAD_VCL=1 # Main …
2015-10-03T16:59:17Z · 开源软件 · 评论(0)
swoole提供http服务
swoole是一个php的网络通信框架,可以简单支持http服务。按照官方介绍,如果遇到mysql或者广播消息等耗时或阻塞的业务,需要开启task去提供服务,在Finish回调中处理结果(定时器中如果有阻塞任务,会导致work进程无法提供服务)。 (需要安装配置扩展,如果源码编译运行提示glibc版本不兼容,可以用pecl install swoole) 针对一些数据不常变化的部分,我们可以用定时器读取到内存,然后提供服务,这样对mysql压力小了很多。大致示例代码如下: #!/usr/bin/php <?php date_default_timezone_set("Asia/Shangha…
2015-10-02T10:38:11Z · 编程语言 · 评论(0)
base64encode的一个问题
之前写程序把base64encode的数据提交到服务器,服务器端出现数据的+号被替换为空格的情况。 查了w3规范手册,原因是如下的编码规范中说的,所以服务器会在解码时把+号改为空格然后给到业务。 所以最好再做个urlencode/urldecode 参考:http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1 application/x-www-form-urlencoded This is the default content type. Forms submitted with this content type mus…
2015-09-10T16:29:57Z · 非技术 · 评论(0)
nginx配置https服务器
# 生成CA的key > openssl genrsa -des3 -out ca.key 4096 # 生成CA的证书 > openssl req -new -x509 -days 365 -key ca.key -out ca.crt # 生成我们的key和CSR这两步与上面Self Signed中是一样的 > openssl genrsa -des3 -out myserver.key 4096 > openssl req -new -key myserver.key -out myserver.csr # 使用ca的证书和key,生成我们的证书 # 这里的set_serial指明了证…
2015-09-04T15:23:16Z · 开源软件 · 评论(0)
yii2添加redis支持
yii2官方有插件支持redis扩展,可是按照官方操作手册无法安装(提示和openssl相关的错误) 1,php composer.phar require --prefer-dist yiisoft/yii2-redis 失败 2,在composer.json添加依赖配置如下,执行composer install也不行。 "yiisoft/yii2-redis": "~2.0.0" 自行下载源码部署方法如下: 下载官方插件源码(https://github.com/yiisoft/yii2-redis) 拷贝到项目vendor/yiisoft目录下 修改vendor/yiisoft/ext…
2015-08-09T15:07:57Z · 编程语言 · 评论(0)