yum install报错的解决办法

最近在Centos5.3下使用yum install安装软件的时候遇到“thread.error can’t start new thread”的报错提示

下面是解决办法

编辑 /etc/yum/pluginconf.d/fastestmirror.conf
将enabled=1修改为enabled=0,禁用该功能就可以了。

mb_substr修正函数

不支持mb_substr函数的环境中使用了mb_substr函数会出现“Fatal error: Call to undefined function mb_substr()”的提示,下面的函数是定义的替代mb_substr的函数,作用是一样的,用于不支持mb_substr的地方。

// Patch in multibyte support
if (!function_exists('mb_substr')) {
    function mb_substr($str, $start, $len = '', $encoding="UTF-8"){
        $limit = strlen($str);

        for ($s = 0; $start > 0;--$start) {// found the real start
            if ($s >= $limit)
                break;

            if ($str[$s] <= "\x7F")
                ++$s;
            else {
                ++$s; // skip length

                while ($str[$s] >= "\x80" && $str[$s] <= "\xBF")
                    ++$s;
            }
        }

        if ($len == '')
            return substr($str, $s);
        else
            for ($e = $s; $len > 0; --$len) {//found the real end
                if ($e >= $limit)
                    break;

                if ($str[$e] <= "\x7F")
                    ++$e;
                else {
                    ++$e;//skip length

                    while ($str[$e] >= "\x80" && $str[$e] <= "\xBF" && $e < $limit)
                        ++$e;
                }
            }

        return substr($str, $s, $e - $s);
    }
}

eAccelerator-0.9.6安装笔记

cd tmp
wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2
tar -jxvf eaccelerator-0.9.6.tar.bz2
cd eaccelerator-0.9.6
/usr/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config
make
make install

(注:以上文中“phpize”以及“php-config”的路径如果不知道可以使用find命令事先查找一下。)
安装完毕编辑php.ini将其安装为 PHP extension 模式
在php.ini中添加如下:

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.log_file = "/var/log/httpd/eaccelerator_log"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

最后创建/tmp/eaccelerator目录

mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator

New Divide mv

《New Divide》 mv

《2012》最新高清预告片

注意,还有另一部烂片叫《2012 Doomsday》不要搞混了。《2012》上映时间为2009年11月11日,圣光棍节。导演是《后天》的导演希望特技比后天还过瘾。

youku压缩版

Page 1 of 4012345»102030...Last »