Terence Chang Photography

YUI asyncRequest post with “Length required” error on IIS6 + FireFox

June 4, 2007 10:30 amTerence Chang

I am using Yahoo YUI Javascript library on one of my client’s web site. The web site is hosted on MediaTemple.net‘s GS (Grid Service) server, which is Linux based web hosting server. My client asked me to move the web site to another Windows 2003 + IIS6 based web server for testing and backup purpose. I have moved the code and everything work fine except the AJAX feature is not working right.

Whenever I set the asyncRequest request, it does not post the data. Instead, it always returns an error about “Length Required”. In other words, the server script do not receive any post data so it return an warning that there is zero data length.
[Read more...]

MSSQL-PHP-ADODB Issues

January 11, 2007 9:59 amTerence Chang

MSSQL-PHP-ADODB Issues

  • MSSQL only support FETCH_MODE_ASSOC
  • $rs->EOF cause unlimited loop
  • Only the first select statement in the procedure are returned as query object
  • the rest of query are return as true array
  • You can only fetchRow once
  • text, ntext, image fields can not be local variables
  • index on datetime will not be used if date range is in the query select statement

The following features are not working in the linked server env.

  • @@IDENTITY insert won’t return at all
  • SET ROWCOUNT 500 for insert/update/select
  • Need to use SET XACT_ABORT ON to be able to write to the linked server

DOS: loop

February 1, 2006 9:29 amTerence Chang

@ECHO OFF
set counter=1
set second=10
set minute=%second% / 60
set /A stopper=1000*%second%
echo Delay … %second% second(s)

:loop
set /A counter=%counter%+1

if %counter% EQU %stopper% GOTO OK
GOTO loop

:OK
REM Put the command below
MOVE file1.txt file2.txt

MySQL Tips

July 28, 2005 4:14 pmTerence Chang

Write output into a file
Login into mysql

mysql> \T D:\temp\innodb_status.txt
Logging to file ‘D:\temp\innodb_status.txt’
mysql> show innodb status
mysql> \t
Outfile diabled

Related Posts Plugin for WordPress, Blogger...