Skip to main content

Posts

Showing posts from 2012

php mail function is very slow + wordpress didn't send mail

I host my another site on my own server [ubuntu+apache+wordpress] and notice that notification mail function on my site is not work. After install sendmail, php mail function is working fine but very slow. If you also have this problem, below is how i fix it. first make sure your /etc/hosts file first line look like this 127.0.0.1 localhost.localdomain localhost yourhostname hostname can found on /etc/hostname. Now php mail function should work correctly. But wordpress still deny to send mail out. This have to fix with little hack[ i don't have other better way yet ]. 1. edit file "wp-includes/class-phpmailer.php". 2. Looking for the line 'public $From = 'root@localhost';'. 3. Change root@localhost to something else like name@yourhost.com. I don't know why but this work for me. :)

putting sqlite3 on nexus s

i just notice that there is no sqlite3 on samsung nexus s (official ICS ROM) and i need it in debugging my application database. so i download it from somewhere on internet can't remember. Anyway the one that come with android sdk linux version should be fine to put it on phone. and here is what i do. E:\android-sdk-windows-1.5_r2\platform-tools>adb shell shell@android:/ $ su su shell@android:/ # mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system shell@android:/ # dd if=/sdcard/sqlite3 of=/system/bin/sqlite3 dd if=/sdcard/sqlite3 of=/system/bin/sqlite3 47+1 records in 47+1 records out 24120 bytes transferred in 0.003 secs (8040000 bytes/sec) shell@android:/ # chmod 4755 /system/bin/sqlite3 chmod 4755 /system/bin/sqlite3 shell@android:/ # mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system shell@android:/ # sqlite3 sqlite3 SQLite version 3.7.4 Enter