Not Equal C && !=C && 不等于西
RSS icon Email icon Home icon
  • Best way to create you own php.ini on Windows host

    Posted on June 25th, 2012 Sean Add comments

         I have a Windows host package on, and recently moved my wordpress blog to this hosting server. Sometimes I need to change some php settings for the wordpress, so I decide to create my own php.ini instead of using Godaddy one.
         First of all, we don’t need to create a brand new php.ini from scratch. We can just use Godaddy’s default php.ini as reference. So, just create a php file called “phpinfo.php”, put the following code below and upload the file to your hosting server (this step is to find where the Godaddy’s php.ini file located. If you know the location, just skip this step):

         Browse this file from your hosting, and will see the phpinfo page including all the settings. Look at the line of “Loaded Configuration File” section, find the location of Godaddy’s php.ini. In my case, it’s “c:\cgi\php5\php.ini”.
         Next, create another file called “phpfile.php”, and put the following code below, then upload to the server.

         Browser this file and get a page with lot of plain text. Use your browser to view the source of this page, save the source as “php5.ini” (Note: NOT “php.ini”), and you got Godaddy’s php.ini already.
         In my case, I just need to change some settings like below:

         After modified your php5.ini, upload it to the root directory of hosting server. In Godaddy hosting, you need to do the following:

    1. Log in to your Account Manager.
    2. Click Web Hosting.
    3. Next to the hosting account you want to use, click Launch.
    4. In the Content section of the Hosting Control Center, click the IIS Management icon.
    5. Click Recycle App Pool and follow any prompts.
    6. Reload the phpinfo.php page to see if the desired changes have taken effect.
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
  • MVC3 with IIS7 credential error

    Posted on March 19th, 2012 Sean Add comments

         When I deploy my new MVC 3 project to a Windows 2008 R2 with IIS 7 server, I got an error with “401 – Unauthorized: Access is denied due to invalid credentials” on every page.
         After some google’s, I figure out the reason was: in my “_layout” page, I have the code “@Html.RenderAction(…)”, and the action I was trying to render actually is under “Home” controller with “[Authorize]” attribute. In another word, when IIS calling MVC pages, ASP.NET will ask for authentication, and if not authenticated, it’s supposed to redirect to “_logon” page, but unfortunately the “_logon” page (which is using “_layout” as master page of cause) also asked for authentication because of rendering action. It became to a dead end.
         Based on the reason explained above, the fastest solution is remove the “[Authorize]” attribute from the controller. But if you don’t want change your code, go to IIS management tool, select the website your are running, choose “Error Pages”, and “Edit Feature Settings”, change “Error Responses” to “Detailed errors”.

  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
  • Install Linksys Wireless PCI Adapter(WMP54G) Driver for Windows 7 64Bit

    Posted on August 21st, 2011 Sean Add comments

         Seems like linksys doesn’t provide wireless PCI adapter driver for new Windows OS. The only way to install driver for Windows 7 is force to install the driver from the chip company.

    1. Download the driver from Here
    2. Unzip to somewhere. Let’s say “C:\”
    3. Go to “Control Panel” -> “Device Manager”, look for this adapter. Normally it will be shown like “Unknown Network Controller” or something like that
    4. Click this device, select “Update Driver Software”
    5. Select “Browse My Computer for driver software”
    6. Select “Let me pick from a list of device drivers on my computer”
    7. Scroll down to “Network Adapters” and double click. Then click “Have Disk”
    8. In the box that pops up, navigate to “C:\driver_folder”, and select the driver file
    9. Scroll down to “Ralink Technology Corp” in the box on the left side. On the right side, select “802.11b/g Wireless Adapter.” (Here I have tried select “Linksys” on the left, and “Linksys Wireless Adapter” on the right. It also works! Just choose whatever you want)
    10. Click YES on the warning window (if you see it)
    11. Done! (Sometimes the device still might not be working, try to right click the device and uninstall the driver, but DO NOT check “Delete the driver software for this device”, and restart the computer. Then Windows will help you install the driver again)
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
  • How to Change the Frequency of Windows Internet Time Synchronisation

    Posted on September 28th, 2010 Sean 2 comments
    1. Run command “regedit” to open Windows Registry
    2. Navigate to “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient “
    3. Find key “SpecialPollInterval”
    4. Change the value to what you want in seconds. e.g. 3600 (1 hour)
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
  • Multiple websites in IIS on Windows XP Pro

    Posted on August 17th, 2010 Sean Add comments

         Unlike Windows Server Edition, XP pro does not support multiple websites in IIS. However, we still can use several ways around this.
         First option, just use IIS Admin, a simple program developed by a third-party developer for this purpose. (Download From Here)
         The second option is to use adsutil.vbs, located in the folder “C:\Inetpub\AdminScripts”:

         Where x is replaced by the new numbered site. For example if you run the first command and the highest numbered site is 4, then replace x to 5.

         The third option is to use Metabase Explorer from the IIS 6.0 Resource Kit Tools.Copy the default website (/LM/W3SVC/1/) and then paste it. This will also give you another website, ready to use. (Download From Here)
         Also we can delete the website using adsutil.vbs, Metabase Explorer or ADSI/WMI. To delete a website using adsutil.vbs, write this in a command prompt:

  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)