Taskbar Shuffle
July 20th, 2007
Run php 4 and php 5.2.x on the same machine with IIS 6.0 as ISAPI.
- Extract the ZIP packages of both php 4 & php 5 (not the Windows Installer) to c:\php4 & c:\php5 respectively.
- Setup the corresponding php.ini files in c:\php4 and c:\php5
- Add the Web Service Extensions for php4 and php5. For php4 use c:\php4\sapi\php4isapi.dll, php5 use c:\php5\php5isapi.dll
- Add the following registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5\IniFilePath -> c:\php5 HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath -> c:\php4
- Add c:\php4 to the PATH environment variable.
- Add c:\php5 to the PATH environment variable.
- Associate each web site in IIS with the corresponding php version.
- Reboot.
Note: In IIS you still need to to have the DLL’s in the “Allowed Web Service Extensions List” and the extensions in the appropriate “Application Configuration” settings for the given websites/applications.
Post Comment Now
Enable .NET Web Extensions In ISS via Command Line
May 22nd, 2007
From command line
C:\WINDOWS\Microsoft.NET\Framework\[framework version]\aspnet_regiis.exe -r
After that has run, goto IIS –> Web Service Extensions –> ASP.NET [framework version] –> Enable.
Post Comment Now
ASP.NET Excel Function
April 18th, 2007
This function written in c# builds a MS excel out of a dataSet.
private DataSet dataSet = new DataSet(); private DataView dView = new DataView(); private void LoadPeople() { SqlConnection conn = new SqlConnection("Data Source=asdf;User ID=asdf;Password=asdf;Database=Directory"); SqlDataAdapter dAdapter = new SqlDataAdapter("SELECT * FROM People", conn); dAdapter.Fill(dataSet, "peeps"); dView.Table = dataSet.Tables["peeps"]; personel_cnt = dView.Count; dView.Table.Columns.Add("is_a_member"); conn.Close(); } private void buildExcelReport() { DataSet dsExport = dataSet; System.IO.StringWriter tw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw); DataGrid dgGrid = new DataGrid(); dgGrid.DataSource = dsExport; //Report Header hw.WriteLine("My Super Duper Excel Report"); hw.WriteLine("<br>∓nbsp;"); // Get the HTML for the control. dgGrid.HeaderStyle.Font.Bold = true; dgGrid.DataBind(); dgGrid.RenderControl(hw); // Write the HTML back to the browser. Response.ContentType = "application/vnd.ms-excel"; this.EnableViewState = false; Response.Write(tw.ToString()); Response.End(); }
Post Comment Now
IIS 6.0: How To Eliminate the Delay in Serving Updated ASP
February 13th, 2007
Due to some new enhancements in IIS 6.0, users may encounter a significant delay before receiving the content on the page. This can be a great annoyance for the users and prevent them from visiting your site. To eliminate this delay, follow these instructions:
- Copy the following:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters] "DisableLazyContentPropagation"=dword:00000001
- Open Notepad and paste the text.
- Save the text file and rename it to for example “IIS6_Delay_Fix.reg”.
- Merge the file into the registry by double-clicking it.
- Reboot.
Post Comment Now

