Home about IT Motivation Course Sales Project About Me

Saturday, August 21, 2010

sql query from command line

below example for auto update query at mysql from command line;

please write below script and save as coba.bat
then set as autorun use scheduler task from windows

mysql -u root -p4321 -D fos -e "update jns_cuti set lama_jcuti = 1 where date_jcuti = CURDATE()"

remote IP at access log apache seen as 0.0.0.0

happen at Apache ver 2.2 on windows 2000 proffesional sp4.

According to Apache documentation, AcceptEx() is a Microsoft WinSock v2 API that provides some performance improvements over the use of the BSD style accept() API in certain circumstances. Some popular Windows products, typically virus scanning or virtual private network packages, have bugs that interfere with the proper operation of AcceptEx().

The resolution to the above problem is to disable the use of AcceptEx by using Win32DisableAcceptEx directive. Win32DisableAcceptEx only available in Apache version 2.0.49 and later version though.

Win32DisableAcceptEx directive should be place in httpd.conf configuration file. If you are using distribution from apachefriend’s xampp, the directive should be placed at httpd.conf file too, and not the httpd-mpm configuration file. The directive can be placed together with the line of #EnableMMAP off and #EnableSendfile off in httpd.conf.

If you still facing issue after enable the Win32DisableAcceptEx directive, try to uncomment (disable) the EnableMMAP and EnableSendfile directive. The line should looks like this:

EnableMMAP off
EnableSendfile off
Win32DisableAcceptEx

Note: I found that enable Win32DisableAcceptEx directive cause Apache running on Windows XP to crash frequently. So it’s possibe to try to just turn off (uncomment) EnableMMAP and EnableSendfile without Win32DisableAcceptEx for stability issue, although it doesn’t guarantee reliability of Apache web server.