Typecho PHP7 无法连接数据库
由于将PHP从5升级到了PHP7,部分函数已经不支持了,Typecho直接数据库无法连接。
下面简单讲述下修改Typecho支持新版本PHP7。
在网站根目录下找到config.inc.php文件。
找到
$db = new Typecho_Db('Mysql', 'typecho_');
改为
$db = new Typecho_Db('Pdo_Mysql', 'typecho_');
也就是说,将Mysql改成Pdo_Mysql即可,其他不变。
由于将PHP从5升级到了PHP7,部分函数已经不支持了,Typecho直接数据库无法连接。
下面简单讲述下修改Typecho支持新版本PHP7。
在网站根目录下找到config.inc.php文件。
找到
$db = new Typecho_Db('Mysql', 'typecho_');
改为
$db = new Typecho_Db('Pdo_Mysql', 'typecho_');
也就是说,将Mysql改成Pdo_Mysql即可,其他不变。
源头在于wiki.php.net的漏洞导致wiki账号被盗,而wiki的账号和php代码源的SVN提交权限相关联。
原文:
The wiki.php.net boxwas compromised and the attackers were able to collect wiki account credentials. No other machines in the php.net infrastructure appear to have been affected. Our biggest concern is, of course, the integrity of our source code. We did an extensive code audit and looked at every commit since 5.3.5 to make sure that no stolen accounts were used to inject anything malicious. Nothing was found. The compromised machine has been wiped and we are forcing a password change for all svn accounts.
We are still investigating the details of the attack which combined a vulnerability in the Wiki software with a Linux root exploit.
Mapn 是一个用于 Linux 系统的自动编译环境程序包
Mapn 是以 MySQL + Apache + PHP + Nginx 的安装顺序命名
Mapn 是以 Nginx 作为服务器前端运行, Apache 作为服务器后端运行
Mapn 最新版本号: Ver. 2.9
Mapn 最新发布日期: 2011年2月10日
LNMP一键安装包是一个用Linux Shell编写的可以为CentOS/RadHat、Debian VPS(VDS)或独立主机安装LNMP(Nginx、MySQL、PHP、phpMyAdmin)生产环境的Shell程序。
LNMP 0.6是一个安装优化版,主要是处理脚本安装过程中的错误及添加Ubuntu专用安装脚本(安装成功率大大提升),并未对安装程序的版本进行升级。
安装教程:http://lnmp.org/install.html
LNMP相关软件版本:
Nginx 0.7.67
MySQL 5.1.48
PHP 5.2.14
PHPMyAdmin 3.3.7
昨日,在php官网上php5.2.x系列稳定版更新到php5.2.14,PHP5.3.x系列更新到PHP5.3.3。同时这个版本主要改进了 PHP5.2.x系列的稳定性,修复60多个BUG,部分BUG与安全相关。这个版本标志着对PHP5.2系列更新的结束,在此版本之后不再积极更新 PHP5.2x,其安全补丁可能以单个形式发布。
与此同时,PHP开发团队发布了PHP5.3.3,修复了近100个BUG,鼓励所有PHP5.2系列的用户升级到PHP5.3。 但是实际上国内很多PHP程序对PHP5.3的支持都有不少小问题。
此外,PHP官网着重列出一个PHP5.3.3新的不兼容特性:在命名空间里,和类名一致的函数不再被作为一个构造函数。不过没有使用namespace的类不受影响。
 <?php
namespace Foo;
class Bar {
public function Bar() {
// 在PHP 5.3.0-5.3.2版本作为构造函数
// 在PHP 5.3.3作为一个普通函数
}
} ?> 
以下是PHP5.3.3的修复清单。 Rewrote var_export() to use smart_str rather than output buffering, prevents data disclosure if a fatal error occurs (CVE-2010-2531).
PHP5.2.14主要更新清单
下载:PHP5.3