标签 PHP 下的文章

编译icu72

wget https://github.com/unicode-org/icu/releases/download/release-72-1/icu4c-72_1-src.tgz
tar -xzf icu4c-72_1-src.tgz
cd icu/source
./runConfigureICU Linux --prefix=/usr/local/icu72
make -j$(nproc)
make install

编译PHP7.4.33时的make参数

make -j$(nproc) \
  CXXFLAGS="-I/usr/local/icu72/include -std=gnu++11 -O2 -fPIC" \
  CPPFLAGS="-I/usr/local/icu72/include" \
  LDFLAGS="-L/usr/local/icu72/lib" \
  ZEND_EXTRA_LIBS='-liconv'

由于将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.

阅读剩余部分

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

阅读剩余部分