下载地址 http://demo.cms8.com/ /CodeDown/PhpDown/OpenSource/PHPizabi_0.848b_C1.zip http://www.phpizabi.net/?L=downloads.downloadcore 中文语言包单独提供 PHPizabi 0.848b C1(开源交友系统)安装过程中的注意事项 PHPizabi在安装的光程中如果你的数据库字符集使用的是GBK或者GB2312,可能会在第六步的Database Structure Creation数据库创建导入过程中出现too long for column的情况,这个时候,你需要将字符集修改为UTF8,操作方法如下: 打开你的数据库(物理路径,比如我的D:\MySQL\MySQL Server 5.0\data\toll),使用记事本编辑db.opt,内容为: default-character-set=utf8 default-collation=utf8_general_ci 重新启动MYSQL,重新安装即可. 另外一个注意事项就是,Admin Account Creation 创建管理员帐户. Administrative account creation results: There has been an error trying to create your administrative account. Server replied: Field act_history doesnt have a default value 添加用户的时候,默认每个用户有很多字段需要填写,而创建管理员用户的时候,我们只写入了:(`username`,`password`,`email`,`email_verified`,`active`,`is_administrator`,`is_superadministrator`) act_history值为空,没有默认值.不光是act_history,其它还有很多是空值. 三种解决方法: 第一种,需要你修改PHPizabi 0.848b C1\install\includes\database\admincreate.php程序,把空余字段的值全部赋予. 一下是我写的admincreate.php,你可以直接复制另存覆盖原文件: 代码: <script type="text/javascript"> var label = document.getElementById('createresult'); </script> <?php if ($conection = @mysql_connect($_SESSION["DB"]["dbhost"], $_SESSION["DB"]["dbun"], $_SESSION["DB"]["dbpw"])) { @mysql_select_db($_SESSION["DB"]["dbname"]); } if (@mysql_query(" INSERT INTO `{$_SESSION["DB"]["dbpre"]}users` (`id`, `token`, `last_load`, `act_history`, `last_login`, `username`, `password`, `email`, `email_verified`, `city`, `state`, `country`, `zipcode`, `latitude`, `longitude`, `timezone`, `birthdate`, `astrologic_sign`, `horoscope`, `horoscope_date`, `age`, `gender`, `language`, `use_theme`, `description`, `quote`, `header`, `notepad_body`, `profile_data`, `mailboxes`, `pictures`, `mainpicture`, `contacts`, `relationship_requests`, `block`, `profile_views`, `profile_votes`, `pictures_votes`, `favorites`, `nudges`, `settings`, `spam_reports`, `abuse_reports`, `account_type`, `account_expire`, `registration_date`, `registration_reference`, `active`, `disable_until`, `is_administrator`, `is_superadministrator`) VALUES ( NULL, '', '0', '', '0', '{$_POST["adminun"]}', '".md5($_POST["adminpass"])."', '{$_POST["adminem"]}', '1', '', '', '', '', '0', '0', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', '', '1', '0', '1', '1' ) ")) { echo " <script type=\"text/javascript\"> label.innerHTML = 'Success ... Please press Continue'; document.getElementById('submit').disabled = false; document.getElementById('submit').className = 'submit'; </script>" ; } else { echo " <script type=\"text/javascript\"> label.innerHTML = 'There has been an error trying to create your administrative account. Server replied: ".str_replace("'", "", mysql_error())."'; </script>" ; } ?> 第二种,使用phpmyadmin直接运行sql添加管理员帐户. 代码: INSERT INTO `phpizabi_users` (`id`, `token`, `last_load`, `act_history`, `last_login`, `username`, `password`, `email`, `email_verified`, `city`, `state`, `country`, `zipcode`, `latitude`, `longitude`, `timezone`, `birthdate`, `astrologic_sign`, `horoscope`, `horoscope_date`, `age`, `gender`, `language`, `use_theme`, `description`, `quote`, `header`, `notepad_body`, `profile_data`, `mailboxes`, `pictures`, `mainpicture`, `contacts`, `relationship_requests`, `block`, `profile_views`, `profile_votes`, `pictures_votes`, `favorites`, `nudges`, `settings`, `spam_reports`, `abuse_reports`, `account_type`, `account_expire`, `registration_date`, `registration_reference`, `active`, `disable_until`, `is_administrator`, `is_superadministrator`) VALUES (NULL, '', '0', '', '0', 'admin', '21232f297a57a5a743894a0e4a801fc3', '[email protected]', '1', '', '', '', '', '0', '0', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '0', '', '1', '0', '1', '1'); 使用admin/admin登录即可 第三种,就是修改database.txt,同理设计. 如果你使用的是php5 会遇到语言包无法加载的问题,具体症状如下: 网页上出现大量的[My Contacts {345}] , [Manage Contacts Groups {6010}] ,[Create Groups {6050}] 等内容。 这个时候,这是因为程序本身的问题 可以尝试使用一下方法解决: 打开 /system/functions/classes/template.class.php 大约在251行左右,找到 代码: '/\[((?:.(?(?<=\\\\\[)|(?<!\[)))+) \{(\d+)\}\]/USie', 使用一下代码替换: 代码: '/\[([^\]\[\{\}]+) ?\{(\d+)\}\]/Usie',