Sunday, May 27, 2007

How to solve the 500 Internal Server Error on phpMyAdmin.

Yesterday I freshly installed my LAMP box, with mod_python. Everything was fine, but this morning while started to use phpMyAdmin, it generated the "500 Internal Server Error on phpMyAdmin", states the server is overloaded, blah blah blah.
My solution was to remove the ".htaccess" files under the phpMyAdmin directory.


To solve the remote login problem of MySQL.
Today, I cannot login to the MySQL server from remote computer, it said something like "cannot connect to remote host". The reason was the "skip-networking" was set to ON in the /etc/my.cnf file.

Comment the line to "#skip-networking" and restart the mysqld will solve the problem.
How to setup Django with Apache.

1. Ensure Apache / Mod_python is working by following the link below:
http://www.djangoproject.com/documentation/modpython/

2. Install djano

3. Config apache:
Suppose, the document root is "/home/httpd/html", the Django site is in "/home/httpd/html/django",
add the following section into apache's config file (for arch linux: /etc/httpd/conf/httpd.conf)

SetHandler python-program
PythonPath "['/home/httpd/html/'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE django.settings
PythonDebug On


4. Finally, restart apache (/etc/rc.d/httpd restart)
5. check if it is working by visiting localhost/django
"It Worked" will show up if it is successful.

Wednesday, May 09, 2007

真是故事,
几年前,大一的时候,我和love u(大泡)放假去南岳衡山。

到了那个据说全中国最大的菩萨和道士一家子的庙,被人喋喋不休地找我们烧香。
厌烦中,我love u忽然神秘D问卖香人:“观音会写C吗?他能帮我把C考过,我就烧......”
卖香人不解,不知道Y是不是神经了,就跑来问我......拜拜观音,就能x,y,z.....
俺一句话,说得他没话说了.......

“本人只拜金...”

lolol