Doneeh Mabok lagi

aih aih aih doneeh.
lagi mo post tagboard yayang, taunya malah error message yang di dapat :)
dah beberapa kali nemuin kaya gini :)

Warning: mysql_connect(): Can’t connect to local MySQL server through
socket ‘/var/tmp/mysql.sock’ (2) in /home/doneeh/public_html/lib/config.inc.php on line 8
Can’t connect to local MySQL server through socket ‘/var/tmp/mysql.sock’ (2)

eh saran sih buat developernya, untuk security akan lebih baik kalo bikin error trapping jadi katakanlah kalo ga bisa connect ke mysql database servernya tinggal pake $xxx= mysql_pconnect(“x”,”y”,”z’) or Die(“currently we’re not able to process your request”);

oh iyah, jangan lupa error_reporting(0); di awal file buat matiin error msg displaynya :) Ini kan mesin production, amat ga baik atuh buat display error msgs ke publik, kalo development sih ga masalah. Error msg nya di dump ke tempat lain ajah, bisa pake set_error_handler utk bikin handler error tersendiri, atau di redirect ke textfile
dengan sedikit utak atik parameter php.ini nya :)

This entry was posted in General by nuri. Bookmark the permalink.

About nuri

Hi, i am Nuri. Just another IT guy working on fintech and telco at Jakarta, Indonesia. While tech stuff became my daily breakfast, i also love to travel around the globe and taking photos also. I DJ on my spare time (not professionally) while dealing with a mess my 9 cats made at home :)