How to Install LittleUtils on Linux 64 bit to use OPT GIF PNG JPG

Su or Login with root user.

Install the dependencies with following command.
# yum install gcc libpng libpng-devel gifsicle pngcrush p7zip lzip
Now download the littleutils using the command below.

 Goto http://sourceforge.net/projects/littleutils/

Or wget https://svwh.dl.sourceforge.net/project/littleutils/littleutils-source/1.2.0/littleutils-1.2.0.tar.lz

Download and upload to your directory

Extract the file and install littleutils.
# tar –lzip -xvf littleutils-1.2.0.tar.lz

# cd littleutils-1.2.0

# ./configure

# make

# make install

Thats all.

การตรวจสอบว่าเว็บ wordpress มีerror อะไรด้วย wp debug

เมื่อเร็วๆนี้ มีเว็บลูกค้าเปิดไม่ขึ้น เป็นหน้าขาว ซึ่งเป็นอาการที่พบบ่อยมาก ภายหลังสอบถามว่าเกิดจากการอัพเดตบางอย่าง จึงลองแนะนำว่า สามารถตรวจสอบให้เว็บโชว์ error ออกมาที่หน้าเว็บได้ โดยการเปิดใช้งาน wp_debug โดยดูที่ ไฟล์ wp-config.php ครับ Continue reading “การตรวจสอบว่าเว็บ wordpress มีerror อะไรด้วย wp debug”

การตรวจสอบว่า httpd fail to startจากเหตุใด

เมื่อวันก่อน เกิดปัญหาที่ server หนึ่ง ไม่สามารถสตาร์ท service apache (httpd) ได้

$ service apache2 start
Starting web server
apache2 Action ‘start’ failed.
The Apache error log may have more information.

ใน log file ขึ้นแบบนี้

$ tail var/log/apache2/error.log
AH00016: Configuration Failed, exiting

ขั้นตอนแรก ตรวจสอบก่อนว่า config file ok ไหม

$ apache2ctl configtest
Syntax OK

ต่อมาได้ตรวจสอบการรันของโปรแกรม โดยการใช้ แพคเกจ strace ครับ
ดาวน์โหลดมาติดตั้งก่อน

$ yum -y install strace
$ strace -f  apache2ctl  start
[pid 6068] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f45c6c38000
[pid 6068] read(45, “—–BEGIN PRIVATE KEY—–\nMIIE”…, 4096) = 1704
[pid 6068] close(45)
[pid 6068] munmap(0x7f45c6c38000, 4096) = 0
[pid 6068] write(11, “[Sun Oct 05 07:35:44.207805 2014″…, 189) = 189
[pid 6068] write(2, “AH00016: Configuration Failed\n”, 30) = 30
[pid 6068] select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)

พบว่า เป็นปัญหาที่ ssl จึงมาลองนึกดูอีกที ปรากฎว่า ได้delete server.csr และเอาอันใหม่ใส่ ที่ไม่สัมพันธ์กับ server.key เดิมครับ ทำให้เครื่องรันไม่ได้