Goodspeed

导航

今天踩过的坑——structs和phpmyadmin

phpmyadmin

错误:缺少 mcrypt 扩展
解决
mv -i /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/
sudo php5enmod mcrypt
sudo service apache2 restart

错误: phpMyAdmin 高级功能尚未完全设置,部分功能未激活
解决:
http://teddysun.com/268.html

log4j入库

普遍使用org.apache.log4j.jdbc.JDBCAppender,但是好像有单引号的问题。通过下面的组件能解决。不过写mysql不知为何很慢(可能是虚拟机的问题)
log4j.appender.DATABASE=org.apache.log4j.jdbcplus.JDBCAppender
log4j.appender.DATABASE.layout=org.apache.log4j.PatternLayout
log4j.appender.DATABASE.url=jdbc:mysql://127.0.0.1:50823/feedback?characterEncoding=utf8
log4j.appender.DATABASE.driver=com.mysql.jdbc.Driver
log4j.appender.DATABASE.dbclass=com.mysql.jdbc.Driver
log4j.appender.DATABASE.buffer = 1
log4j.appender.DATABASE.username=myuser
log4j.appender.DATABASE.password=mypassword
log4j.appender.DATABASE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}
log4j.appender.DATABASE.sql=INSERT INTO log4j(logdate, logger, priority, message,thread,detail) VALUES ('@LAYOUT@', '@CAT@', '@PRIO@', '@MSG@','@THREAD@','%l');

posted on 2013-11-15 17:49  Goodspeed  阅读(485)  评论(0编辑  收藏  举报