12月4
修改index.php部分如下:
1、第36行:
$$var = trim($tmp[$n]);
修改成:
// $$var = trim($tmp[$n]);
// modified by lovecabana
$$var = trim(strtolower($tmp[$n]));
2、第52行:
if ($MYSQLCRYPT == "crypt") {$PW = TRUE;} else {$PW = FALSE;}
修改成:
//if ($MYSQLCRYPT == "crypt") {$PW = TRUE;} else {$PW = FALSE;}
if ($MYSQLCRYPT == "crypt" || $MYSQLCRYPT == "md5" || $MYSQLCRYPT == "password" || $MYSQLCRYPT == "any") {$PW = TRUE;} else {$PW = FALSE;}
3、第75行:
if ($PW) {$USERARRAY['Password']= crypt($DefaultPass,$PWC); }
else {$USERARRAY['Password']= $DefaultPass; }
修改成:
//if ($PW) {$USERARRAY['Password']= crypt($DefaultPass,$PWC); }
//else {$USERARRAY['Password']= $DefaultPass; }
即注释掉那两行;
4、第147、148行:
IF($Password == '<crypted>')$Password = '';
ELSEif($PW)$Password = crypt($Password, $PWC);
修改成:
IF($Password == '<crypted>')$Password = '';
//ELSEif($PW)$Password = crypt($Password, $PWC);
也就是注释掉:ELSEif($PW)$Password = crypt($Password, $PWC);
5、第165行:
if($Password)$PW_QUERY = ",Password='$Password'";
修改成:
//modified by lovecabana
//if($Password)$PW_QUERY = ",Password='$Password'";
/* modification start here */
if($Password){
if ($PW) {
if ($MYSQLCRYPT == "crypt") {
$PW_QUERY = ",Password=encrypt('$Password', '$PWC')";
}
elseif ($MYSQLCRYPT == "password") {
$PW_QUERY = ",Password=password('$Password')";
}
else {
$PW_QUERY = ",Password=md5('$Password')";
}
}
else {
$PW_QUERY = ",Password='$Password'";
}
}
/* modification end here */
// echo $Password;
// echo $PW_QUERY;
// exit();
(说明:由于pureftpd_php_manager版本的不同,可能关键字所在的行号也和上面不同,所以建议搜索关键字来进行相关位置的替换!)
主要是修改PHP_MANAGER中的crypt加密方式可以支持MD5等加密方式。
注意主要是第2、4、5点的修改。
1、第36行:
$$var = trim($tmp[$n]);
修改成:
// $$var = trim($tmp[$n]);
// modified by lovecabana
$$var = trim(strtolower($tmp[$n]));
2、第52行:
if ($MYSQLCRYPT == "crypt") {$PW = TRUE;} else {$PW = FALSE;}
修改成:
//if ($MYSQLCRYPT == "crypt") {$PW = TRUE;} else {$PW = FALSE;}
if ($MYSQLCRYPT == "crypt" || $MYSQLCRYPT == "md5" || $MYSQLCRYPT == "password" || $MYSQLCRYPT == "any") {$PW = TRUE;} else {$PW = FALSE;}
3、第75行:
if ($PW) {$USERARRAY['Password']= crypt($DefaultPass,$PWC); }
else {$USERARRAY['Password']= $DefaultPass; }
修改成:
//if ($PW) {$USERARRAY['Password']= crypt($DefaultPass,$PWC); }
//else {$USERARRAY['Password']= $DefaultPass; }
即注释掉那两行;
4、第147、148行:
IF($Password == '<crypted>')$Password = '';
ELSEif($PW)$Password = crypt($Password, $PWC);
修改成:
IF($Password == '<crypted>')$Password = '';
//ELSEif($PW)$Password = crypt($Password, $PWC);
也就是注释掉:ELSEif($PW)$Password = crypt($Password, $PWC);
5、第165行:
if($Password)$PW_QUERY = ",Password='$Password'";
修改成:
//modified by lovecabana
//if($Password)$PW_QUERY = ",Password='$Password'";
/* modification start here */
if($Password){
if ($PW) {
if ($MYSQLCRYPT == "crypt") {
$PW_QUERY = ",Password=encrypt('$Password', '$PWC')";
}
elseif ($MYSQLCRYPT == "password") {
$PW_QUERY = ",Password=password('$Password')";
}
else {
$PW_QUERY = ",Password=md5('$Password')";
}
}
else {
$PW_QUERY = ",Password='$Password'";
}
}
/* modification end here */
// echo $Password;
// echo $PW_QUERY;
// exit();
(说明:由于pureftpd_php_manager版本的不同,可能关键字所在的行号也和上面不同,所以建议搜索关键字来进行相关位置的替换!)
主要是修改PHP_MANAGER中的crypt加密方式可以支持MD5等加密方式。
注意主要是第2、4、5点的修改。
11月26
[root@CentOS cacti-spine-0.8.7]# ./spine
SPINE: Using spine config file [spine.conf]
MYSQL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES)
MYSQL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES)
MYSQL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES)
MYSQL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES)
MYSQL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES)
11/25/2009 05:12:14 PM - SPINE: Poller[0] FATAL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES) (Spine init)
解决方法:
注意了,此时在/Install/cacti-spine-0.8.7e执行/usr/local/spine/bin/spine
它读取的是/Install/cacti-spine-0.8.7e/spine.conf
所以会提示数据库连接出错
我们rm -f /Install/cacti-spine-0.8.7e/spine.conf
再次执行/usr/local/spine/bin/spine,它读取/etc/spine.conf,这样就正常了。
SPINE: Using spine config file [spine.conf]
MYSQL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES)
MYSQL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES)
MYSQL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES)
MYSQL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES)
MYSQL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES)
11/25/2009 05:12:14 PM - SPINE: Poller[0] FATAL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES) (Spine init)
解决方法:
注意了,此时在/Install/cacti-spine-0.8.7e执行/usr/local/spine/bin/spine
它读取的是/Install/cacti-spine-0.8.7e/spine.conf
所以会提示数据库连接出错
我们rm -f /Install/cacti-spine-0.8.7e/spine.conf
再次执行/usr/local/spine/bin/spine,它读取/etc/spine.conf,这样就正常了。
11月23
今天更新了一下PHP,结果配置的phpmyadmin登陆进去出现“无法在发生错误时创建会话,请检查 PHP 或网站服务器日志,并正确配置 PHP 安装。”的错误。
解决方法:
执行:#chown -R root:username /var/lib/php/session
其中username为apache的承载用户, 我的是apache,所以执行的命令是:
#chown -R root:apache /var/lib/php/session
错误原因:
php更新后,覆盖了原有的/var/lib/php/session的权限,导致apache用户无法写入session,产生此错误。
解决方法:
执行:#chown -R root:username /var/lib/php/session
其中username为apache的承载用户, 我的是apache,所以执行的命令是:
#chown -R root:apache /var/lib/php/session
如果此时还出现那个错误提示,建议执行:
#chmod -R 777 /var/lib/php/session
怕777的权限过大,测试770、766、776都无法解决以上问题,只好先给777权限了。
不知道正试使用的时候会不会有安全隐患,先记下这个位置。





Flash Player文件