服务器最近全面升级, php已经升级到 5.3.3, 但 ZendOptimizer 好像跟不上, ZendOptimizer-3.3.9 下载下来一看, 只支持到php5.2版本, 好吧, 如果有时间, 自己编译一份5.2削足适履吧.
脚大得不能削的, 可以考虑 Zend Guard Loader, 最新版本代替了ZendOptimizer的功用, 可以跟 php5.3.3 相处愉快, 想用看本文结尾,
我虽然脚比较大, 但心比较浅, 那就亦足吧.
解决办法
从phpinfo(); 得知尸位素餐的ZendOptimizer还是霸占了php.ini的位置:
Loaded Configuration File /usr/local/Zend/etc/php.ini
Ubuntu Root Shell Colorize
vi /root/.bashrc
把注释去掉就可以了
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
PHP真大牌, 好好的&, 说不用就不用
Joomla在php升级后的报错,
reference的解决方案很简单, 把 =& 换成 = 就好了
eregi() 换成 preg_match()
split () 换成 preg_split()
Deprecated: Assigning the return value of new by reference is deprecated in /http/dir/administrator/components/com_joomfish/classes/JoomfishManager.class.php on line 184
Deprecated: Assigning the return value of new by reference is deprecated in /http/dir/administrator/components/com_joomfish/classes/JoomfishManager.class.php on line 193
Deprecated: Assigning the return value of new by reference is deprecated in /http/dir/administrator/components/com_joomfish/classes/JoomfishManager.class.php on line 217
Deprecated: Assigning the return value of new by reference is deprecated in /http/dir/administrator/components/com_joomfish/classes/JoomfishManager.class.php on line 226
Deprecated: Function eregi() is deprecated in/http/dir/plugins/system/jfrouter.php on line 188
Deprecated: Function split() is deprecated in /http/dir/plugins/system/jfrouter.php on line 459
Warning: Cannot modify header information – headers already sent by (output started at /http/dir/administrator/components/com_joomfish/classes/JoomfishManager.class.php:184) in /http/dir/plugins/system/jfrouter.php on line 315
Warning: Cannot modify header information – headers already sent by (output started at /http/dir/administrator/components/com_joomfish/classes/JoomfishManager.class.php:184) in /http/dir/plugins/system/jfrouter.php on line 316
Warning: Cannot modify header information – headers already sent by (output started at /http/dir/administrator/components/com_joomfish/classes/JoomfishManager.class.php:184) in /http/dir/plugins/system/jfrouter.php on line 317
Ubuntu 8.04 升级到 10.04
命令如下
do-release-upgrade
开始有段警告, 大胆按 j 吧
Diese Sitzung läuft offenbar über SSH. Es wird davon abgeraten,
eine Systemaktualisierung über SSH durchzuführen, da im Fehlerfall
eine Wiederherstellung schwierig sein kann.
Wenn Sie fortfahren, wird ein zusätzlicher SSH-Dienst auf Port
»9004« gestartet.
Sind Sie sicher, dass Sie fortfahren möchten?
有段时间比较难熬, 估计有半小时之久
Reading package lists: Done
Reading state information: Done
Reading state information: Done
Reading state information: Done
: 42
aptitude update
aptitude upgrade
aptitude dist-upgrade
升级另一台服务器的时候, 可能是先升级了内核, 因为没有重启, 在装软件的时候, 老是提示:
如果真的执行那句命令, 却发现屏幕老是走几步就冻住不动了, 只好 Ctrl + C, 于是出现下面的画面:
dpkg: error processing at (-configure):
subprocess installed post-installation script killed by signal (Interrupt)
Setting up openssh-server (1:5.3p1-3ubuntu6) …
* Stopping OpenBSD Secure Shell server sshd
…done.
dpkg: error processing openssh-server (—configure):
subprocess installed post-installation script killed by signal (Interrupt)
Setting up mysql-server-5.1 (5.1.41-3ubuntu12.10) …
dpkg: error processing mysql-server-5.1 (—configure):
subprocess installed post-installation script killed by signal (Interrupt)
Setting up irqbalance (0.55+20091017-3ubuntu2) …
dpkg: error processing irqbalance (—configure):
subprocess installed post-installation script killed by signal (Interrupt)
Setting up rsyslog (4.2.0-2ubuntu8.1) …
dpkg: error processing rsyslog (—configure):
subprocess installed post-installation script killed by signal (Interrupt)
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.1; however:
Package mysql-server-5.1 is not configured yet.
dpkg: error processing mysql-server (—configure):
dependency problems – leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-minimal:
ubuntu-minimal depends on rsyslog; however:
Package rsyslog is not configured yet.
dpkg: error processing ubuntu-minimal (—configure):
dependency problems – leaving unconfigured
Errors were encountered while processing:
at
openssh-server
mysql-server-5.1
irqbalance
rsyslog
mysql-server
ubuntu-minimal
(Interrupt) 就是我按Ctrl + C 之后出现的.
google了半天也没有什么结果, 只好仔细分析出错信息, 最后我找到的解决的办法如下, 首先杀掉这些配置进程
kill 掉那些配置进程
然后在这个目录下找到post-installation脚本:
ls openssh*
vi openssh-server.postinst
然后在第一行加入 exit 0 保存退出.
重新安装一个已经装好了的程序, 比如
apt-get install gcc
这个程序过后就会重复上面那堆出错信息, 不过会少了openssh-server,
依次解决其它的软件就好了.
在处理openssh-server的时候要小心, 尤其是SSH远程登录升级的朋友, 最好打开三两个窗口, 都登录到服务器, 在主窗口SSH服务关掉之后:
* Stopping OpenBSD Secure Shell server sshd
…done.
要在另外的窗口重新启动SSH,
Go Daddy Auctions Membership W/ DomainAlert(R)
今天被通知会员资格自动延长一年:
Customer #: 88888888
We just want to let you know we've automatically renewed the following items according to our agreement:
Product Name Unit Price Qty Total Price
Go Daddy Auctions Membership w/ DomainAlert® – … $4.99 1 $4.99
Purchased on original receipt: 88888888
Go Daddy Auctions Membership – Renewal
Purchased on original receipt: 88888888
DomainAlert® Pro Monitoring – 100 Pack – Renewal
Purchased on original receipt: 88888888
Subtotal: $4.99
Tax: $0.00
TOTAL: $4.99
We have billed your Paypal agreement ending with the last two digits: 37 for the amount of $4.99.
Some Notes
一个基于经度和纬度的公式:http://zips.sourceforge.net/
1999年人口普查的美国邮政编码列表:http://www.census.gov/geo/www/tiger/zip1999.html
Magento: Invalid Transactional Email Code
不得不说Magento是浪得虚名, 用千万的钱, 堆出来的产品一堆Bug, 以前改的就不说了, 今天说一下发Email方面的.
开始我用System → Transaktions-E-Mails修改了一些Email模板, 后来在System → Configuration → Sales Emails里面选配了一些被修改过的模板.
一段时间过后, 我觉得直接修改目录/app/locale/de_DE/template/email下的文件是个更好的主意, 于是我把System → Transaktions-E-Mails里面的模板全删除了, 当然System → Configuration → Sales Emails里面也选成了默认模板, 不过系统仍旧没有更新, 还是找我原来设定的模板, 那当然只能甩错给我看: Invalid transactional email code: 5, 这个5只是我原来修改的模板的ID, 也可以是其它值.
放狗搜了一下, 发现配置都在core_config_data表中,
改过的email模板都在core_email_template表中, 还好我原来还有一个弃用的数据库, 在两个库中先后运行这个语句,
SELECT * FROM `core_config_data` WHERE `path` LIKE '%template%'
比较后发现, 其实只保留path为以下值的记录就可以了.
catalog/productalert/email_stock_template
catalog/productalert_cron/error_email_template
design/theme/template
design/theme/template_ua_regexp
MySQL InnoDB 文件夹copy复制
一直用MyISAM, 对InnoDB没怎么关心过, 所以还是通过复制/var/lib/mysql/下文件夹的方式备份了由InnoDB表组成的数据库.
我心想数据库已经备份, 那就随便改吧. 等我覆盖文件夹想恢复数据的时候, 发现数据竟然没有变化!
原来InnoDB的数据是存储在/var/lib/mysql/ibdata1 文件中的,我只保留了frm文件, 那只是表的结构和定义。
幸好我改得不是很过份, 还有救, 希望看官看到我这篇日志的时候, 不会有撞墙的冲动.
以后还是用phpMyAdmin或者mysqldump吧.
PHP 把标点换成空格, 把多个空格换成一个空格
第一个, 把标点换成空格:
第二个, 把多个空格换成一个空格
在Ubuntu 10.04 LTS Server上通过SSH安装Virtualbox 4.0
直接在Server上安装virtualbox-ose(Open Source Edition)版本后, 启动老是提示出错:
1 2 3 4 |
|
后来发现官方网站上闭源版本的介绍, 真是很详尽: http://www.virtualbox.org/wiki/Linux_Downloads
1
|
|
添加一句:
1
|
|
1 2 3 4 5 |
|
第一次运行出错:
1 2 3 4 5 6 7 8 9 10 |
|
查找错误日志 /var/log/vbox-install.log 发现提示要安装linux-headers-2.6.32-28-server
1
|
|
或者
1 2 |
|
再次启动就正常了
1 2 |
|
运行Setup看看:
1 2 3 4 5 |
|
如果Linux内核升级后,出现 Failed, trying without DKMS
1 2 3 4 5 6 7 8 9 10 |
|
那就安装dkms
1
|
|
好了, 现在可以用普通用户的身份来使用虚拟机了
Ubuntu1010是网上下载的IDE硬盘系统
Ubuntu1004是自己装的Sata硬盘系统
在上传虚拟机镜像之前,最好在本地打开虚拟机,清除一下网卡MAC addresses的Cache后再关机:
1
|
|
创建Windows的虚拟机