Navigation-Menus (Do Not Edit Here!)

Friday, December 30, 2011

PHP 5.x with IIS6 and FastCGI Installation Guide


PHP 5.x with IIS6 and FastCGI Installation Guide

Most how to guide and forum posts you get on a Google search is outdated after searching around the net for this i found this nifty detailed article on installing & configuring PHP on IIS

if you have already setup PHP using the installer available on PHP.net

then check your script mappings and the path variables. 

note : path should point to php-cgi.exe in your PHP installation folder


Prerequisites
  • IIS 6

Install PHP

  • Unpack the content of the zip archive into a folder of your choice, for example C:\PHP\
  • Copy the C:\PHP\php.ini-production to C:\PHP\php.ini
  • Open the php.ini,search for the following lines, uncomment them and make sure they look like these below.

1
 extension_dir = "C:\PHP\ext"

error_log="C:\inetpub\temp\php-errors.log"

3
 cgi.force_redirect = 0

4
 fastcgi.impersonate = 1

5
 fastcgi.logging = 0

cgi.fix_pathinfo=1

  • Install Microsoft 2008 C++ Runtime (x86)

Install FastCGI

  • Install FastCGI 1.5. Just follow the installation process 
  • Using the CMD prompt, go to C:\Windows\System32\inetsrv 
  • Execute the following commands (source)

cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe"

cscript fcgiconfig.js -set -section:"PHP" -InstanceMaxRequests:10000

cscript fcgiconfig.js -set -section:"PHP" -EnvironmentVars:PHP_FCGI_MAX_REQUESTS:10000


Manually Create script mapping

Note: This may not be necessary,
  • Launch inetmgr.exe.
  • Double click the machine icon for the local computer.
  • Right click on Web Sites and pick Properties.
  • Click the Home Directory tab.
  • Click the Configuration… button.
  • Click the Add… button.
  • Browse to the fcgiext.dll located in %windir%\system32\inetsrv.
  • Enter .php as the Extension.
  • Enter Verbs as GET,HEAD,POST.
  • Ensure that Script Engine and Verify that file exists are checked

Configure the default document in IIS

Use the Internet Information Services Manager (IIS Manager) to configure the default document in IIS. Most of the PHP applications use a file named index.php as the default application document. (source)

  • Launch inetmgr.exe
  • Double click the machine icon for the local computer.
  • Right click Web Sites and pick Properties.
  • Click the Documentstab.
  • Click the Add… button and enter index.php for Default Document Name
  • Click OK.


Test the PHP installation

  • Create a file with the name phpinfo.php with the following line of content

             <?php phpinfo() ?>

  • Save it in the C:\Inetpub\wwwroot folder.

  • Go to your Internet Explorer and in the address bar type http://localhost/phpinfo.php




Wednesday, December 28, 2011

How to setup Nvidia Driver on Linux


I recently moved to Mint cause of the unstable unity UI in ubuntu and i havent looked back since...

while setting up my linux box, installing Downloaded Nvidia drivers is a bit of a hastle it doesnt have to be ubuntu i ran in to this in in almost all distros. since most solutions on forums were outdated..i had to google around a bit to find a way to get rid of each error..
i figured i should put it up here to save someone else's time spent on this :D

this guide is for Setting up the driver in an Ubuntu-based distro


Assuming you have downloaded the driver from the Nvidia Website



install the following packages through Package Manager or terminal:


For the newer nvidia cards - GTX 5xx - 6xxx series ( all models listed here)

Code:
apt install nvidia-kernel-dkms nvidia-glx build-essential nvidia-settings nvidia-xconfig



For older cards - Gforce FX5xxx
you need to download 173.14 driver for this models Download_Link

Code:
apt install nvidia-kernel-legacy-173xx-dkms nvidia-glx-legacy-173xx build-essential nvidia-settings nvidia-xconfig

Ancient cards - Gforce 4 and below (all models listed here)
you need to download 96.43.xx driver for these models Download_Link

Code:
apt install nvidia-kernel-legacy-96xx-dkms nvidia-glx-legacy-96xx build-essential
nvidia-settings nvidia-xconfig



with the Xserver(GUI) running you cannot install the Driver pakage. to jump to the CLI mode
Press  

Alt+Ctrl+F1




Remove the Nouveau driver (Basic driver) installed by the OS :

you can either Black List it or Remove the Package

Blacklist

Code:
sudo echo blacklist nouveau > /etc/modprobe.d/blacklist-nouveau.conf 


Remove 


Code:
apt remove --purge xserver-xorg-video-nouveau libdrm-nouveau1a



Stop the Xserver:


Code:
sudo service lightdm stop




Install the Driver Package:

Code:

sudo sh NvidiaDriver.run

Follow the instructions on the screen and install the Driver


Reboot!!!

Code:

sudo init 6

or press the power button :P

Full size

Friday, November 18, 2011

Create local administrator account using Group pol...

Domain Trust relationship failures, it may be a virus making it impossible to login using domain credentials..you are bound to run in to scenario's like this while managing a AD environment.you will have to login to a local administrator account on the client pc and re join the domain or do what ever the necessary troubleshooting procedures. in some cases you don't have local admin passwords on some pc's. so this will be a life saver cause i my self had the unfortunate incident where i had to guide a user to reset the local admin password of a pc over the phone using hiren bootcd.

its very simple actually. use this VB script file, modify it accordingly and add it as a computer start up script via Group policy.

this script first queary for the user name you have specified in the script on the local pc, if it doesn't exist it will create it as an member of the local administrator group. if the user name already exist it will change the password to the one specified.


'---------------------------------------------------------------------------------------------------------------
'this section creates the new user called localsupport if it doesn't existDim AdminPassword
AdminPassword = "password"

QueryForUser("user_name")
               
                Set objNetwork = CreateObject("Wscript.Network")
                strComputer = objNetwork.ComputerName
                Set objComputer = GetObject("WinNT://" &strComputer)

                Set colAccounts = GetObject("WinNT://" & strComputer & "")
                Set objUser = colAccounts.Create("user", "localsupport")
                objUser.SetPassword AdminPassword
                objUser.Put "UserFlags", 65600 '
                objUser.SetInfo

'add to administrators group
                Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
                Set objUser = GetObject("WinNT://" & strComputer & "/localsupport,user")
                objGroup.Add(objUser.ADsPath)

           'msgbox "user was created"

'this section just changes the password if the user exists


 Sub QueryForUser(strlocalsupport)
    Set objlocal = GetObject("WinNT://.")
    objlocal.Filter = Array("user")
    For Each User In objlocal
        If lcase(User.Name) = lcase(strlocalsupport) Then

                strComputer = "."
                Set objUser = GetObject("WinNT://" & strComputer & "/localsupport, user")
                objUser.SetPassword AdminPassword
                objUser.SetInfo

            'msgbox User.Name & " already exists." & vbCrLf & "The password was re-set."
            WScript.Quit
        End If   
    Next
 End Sub


--------------------------------------------------------------------------------------------------------------


to change the password modify the password within the quotes (marked in red), in the following code section. this also allows you to easily change the password in case you have to give the password to a end user.

Dim AdminPassword
AdminPassword = "password"


QueryForUser("user_name")


hope this helps someone, cause this saved my ass so many time. :P

Wednesday, November 2, 2011

Managing calendar permissions in Exchange Server 2010


Admin may get asked to set and add / Edit permissions for shared Calendars.
these Sharing options are not available in EMC, so we have to use exchange power shell on the server to manipulate them.


View existing Calendar permissions

Get-MailboxFolderPermission -identity "Networking Calendar:\Calendar"



There are 4 MailboxFolderPermission cmdlets in Exchange Server 2010:





Each cmdlet have different syntax, follow the links for more information..



In this scenario we need to set following permissions to the Calendar Resource named "Networking Calendar.



user - "Nyckie" - full permissions


all users - permissions to add events without the delete permission



  • To assign calendar permissions to new users  "Add-MailboxFolderPermission"

Add-MailboxFolderPermission -Identity "Networking Calendar:\Calendar" -User [email protected] -AccessRights Owner

 









  • To Change existing calendar permissions  "set-MailboxFolderPermission"

set-MailboxFolderPermission -Identity "Networking Calendar:\Calendar" -User default -AccessRights NonEditingAuthor

 


This assigns the owner righs to the user "nyckig" for the calendar of the "Networking Calendar" resource.and sets NonEditingAuthor permissions as the default permission for the calendar for all other users









__________________________________________
Here are the other permission levels you can assign:-

None - FolderVisible

Owner - CreateItems, ReadItems, CreateSubfolders, FolderOwner, FolderContact, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems

PublishingEditor - CreateItems, ReadItems, CreateSubfolders, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems

Editor - CreateItems, ReadItems, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems

PublishingAuthor - CreateItems, ReadItems, CreateSubfolders, FolderVisible, EditOwnedItems, DeleteOwnedItems

Author - CreateItems, ReadItems, FolderVisible, EditOwnedItems, DeleteOwnedItems NonEditingAuthor - CreateItems, ReadItems, FolderVisible

Reviewer - ReadItems, FolderVisible

Contributor - CreateItems, FolderVisible

The following roles apply specifically to calendar folders:

AvailabilityOnly - View only availability data

LimitedDetails - View availability data with subject and location


source -

technet.microsoft.com

http://blog.powershell.no/2010/09/20/managing-calendar-permissions-in-exchange-server-2010/ 




Friday, September 9, 2011

Deploying User Cutomizations & Office suit setting for M$ Office via Group Policy

Hello internetzzz

As an Administrator, you might run in to situations that requires you to Deploy UI customizations such as customized Ribbon, Quick toolbars, etc for Office applications on user Computers, or in my case Terminal servers.

here is a quick and dirty guide on how to do this via group policy.

For instance, lets say we have to deploy a button to initiate a 3rd party productivity program with in outlook and MS word.

First off, make the necessary changes to outlook or word on a Client pc running MS office.

To customize the Ribbon

  • On the File tab, click Options, and then click Customize Ribbon to open the Ribbon customization dialog.

To customize the Quick Access Toolbar

  • On the File tab, click Options, and then click Quick Access Toolbar to open the Quick Access Toolbar customization dialog.
You can also export your Ribbon and Quick Access Toolbar customizations into a file.

 


















when we make changes to the default Ribbon these user customizations are saved in as .officeUI Files

%localappdata%\Microsoft\Office














The file names will differ according to the office program and the portion of the Ribbon UI  you customized.



Application Description Of .Ribbon File .officeUI File Name
Outlook 2010 Outlook Explorer olkexplorer.officeUI
Outlook 2010 Contact olkaddritem.officeUI
Outlook 2010 Appointment/Meeting (organizer on compose, organizer after compose, attendee) olkapptitem.officeUI
Outlook 2010 Contact Group (formerly known as Distribution List) olkdlstitem.officeUI
Outlook 2010 Journal Item olklogitem.officeUI
Outlook 2010 Mail Compose olkmailitem.officeUI
Outlook 2010 Mail Read olkmailread.officeUI
Outlook 2010 Multimedia Message Compose olkmmsedit.officeUI
Outlook 2010 Multimedia Message Read olkmmsread.officeUI
Outlook 2010 Received Meeting Request olkmreqread.officeUI
Outlook 2010 Forward Meeting Request olkmreqsend.officeUI
Outlook 2010 Post Item Compose olkpostitem.officeUI
Outlook 2010 Post Item Read olkpostread.officeUI
Outlook 2010 NDR olkreportitem.officeUI
Outlook 2010 Send Again Item olkresenditem.officeUI
Outlook 2010 Counter Response to a Meeting Request olkrespcounter.officeUI
Outlook 2010 Received Meeting Response olkresponseread.officeUI
Outlook 2010 Edit Meeting Response olkresponsesend.officeUI
Outlook 2010 RSS Item olkrssitem.officeUI
Outlook 2010 Sharing Item Compose olkshareitem.officeUI
Outlook 2010 Sharing Item Read olkshareread.officeUI
Outlook 2010 Text Message Compose olksmsedit.officeUI
Outlook 2010 Text Message Read olksmsread.officeUI
Outlook 2010 Task Item (Task/Task Request, etc.) olktaskitem.officeUI
Access 2010 Access Ribbon Access.officeUI
Excel 2010 Excel Ribbon Excel.officeUI
InfoPath 2010 InfoPath Designer Ribbon IPDesigner.officeUI
InfoPath 2010 InfoPath Editor Ribbon IPEditor.officeUI
OneNote 2010 OneNote Ribbon OneNote.officeUI
PowerPoint PowerPoint Ribbon PowerPoint.officeUI
Project 2010 Project Ribbon MSProject.officeUI
Publisher 2010 Publisher Ribbon Publisher.officeUI
*SharePoint 2010 SharePoint Workspaces Ribbon GrooveLB.officeUI
*SharePoint 2010 SharePoint Workspaces Ribbon GrooveWE.officeUI
SharePoint Designer 2010 SharePoint Designer Ribbon spdesign.officeUI
Visio 2010 Visio Ribbon Visio.officeUI
Word 2010 Word Ribbon Word.officeUI

You can use these files and push it via Group policy using a simple start up script..

@echo off 
setlocal
set userdir=%localappdata%\Microsoft\Office
set remotedir=\\MyServer\LogonFiles\public\OfficeUI 
for %%r in (Word Excel PowerPoint) do if not exist %userdir%\%%r.officeUI cp %remotedir%\%%r.officeUI %userdir%\%%r.officeUI
endlocal 


A basic script to copy .officeUI files from a network share into the user's local AppData directory, if no .officeUI file currently exists there.
Can easily be modified to use the roaming AppData directory (replace %localappdata% with %appdata%) or to include additional ribbon customizations.

 

Managing Office suit setting via Group Policy

Download and import the ADM templates to the Group policy object editor.
This will allow you to  manage settings Security, UI related options, Trust center, etc.. on office 2010 using GPO

Download Office 2010 Administrative Template files (ADM, ADMX/ADML)

hopefully, this will be help full to someone..
until next time cháo

Wednesday, August 31, 2011

A Pentium III Autopsy Using an Electron Microscope...

"The Microprocessor" one of the marvelous inventions, that propelled humanity towards the technological revolution that is happening today..
Have you ever wondered....what's it is like inside of a processor..well this one guy, a science teacher has taken an old Pentium III chip and cut it open, to get a better look inside.



He managed to removed the core from the package using a power saw and used a scalpel to open the actual CPU cover. 



The interesting part begins with images that were taken using an optical microscope, enabling him to peek through the holes of the cover to see the connecting points between the CPU and the circuit board. The optical microscope took him close enough to see the different layers of the chip.



Since optical microscopy doesn't show very much detail, to take a more closer look he cut the chip in to pieces and loaded the chip into a scanning electron microscope (SEM).


He managed to get a resolution that allowed him to spot structures as small as 2000 nm, which is not
close enough to actually see the transistors, but provides stunning detail of the CPU, even at a 10,000 nm level.

Go to sciencystuff.com for more pictures and Details.



source - http://www.sciencystuff.com/ 
http://www.tomshardware.com/







Crucial M4 SSD New Firmware and how to Flash using a USB thumb drive !!Update!!



well i think the Title pretty much speak for it self..but any how...Crucial released a new Firmware for the M4 SSD's and apparently its suppose to make the drive 20% faster...i updated mine no issues. and i didn't brick it so its all good here hehee.. Tongue

I looked up some Benches from reviews from the time of release and compared them with the benchmarks i did after the FW update, i do get around 20% more increase just like they SAY !!!
.
Crucial's Official Release Notes:

“Release Date: 08/25/2011

Change Log:

    Changes made in version 0002 (m4 can be updated to revision 0009 directly from either revision 0001 or 0002)
    Improved throughput performance.
    Increase in PCMark Vantage benchmark score, resulting in improved user experience in most operating systems.
    Improved write latency for better performance under heavy write workloads.
    Faster boot up times.
    Improved compatibility with latest chipsets.
    Compensation for SATA speed negotiation issues between some SATA-II chipsets and the SATA-III device.
    Improvement for intermittent failures in cold boot up related to some specific host systems.”

Firmware Download:http://www.crucial.com/eu/support/firmware.aspx?AID=10273954&PID=4176827&SID=1iv16ri5z4e7x

to install this via a pen drive with out wasting a blank cd..I know they are like really really cheap but think!!!! how many of you have blank cds or DVDs with you now a days ???

to do this we are gonna use a niffty lil program called UNetbootin
ofcourse you can use this to boot any linux distro from a pen drive.its very easy actually, if you need help go check out the guides on the UNetbootin website

so here we go then...

* First off Download - http://unetbootin.sourceforge.net/





* Run the program
* Select DiskImage Radio button (as shown on the image)
* browse and select the iso file you downloaded from crucial
* Type - USB Drive
* select the Drive letter of your Pendrive
* Click OK!!!

reboot

*Go to bios and put your SSD in to IDE (compatibility) mode ** this is important
*Boot from your Pen drive
*Follow the instructions on screen to update

and Voila

****remember to set your SATA controller to AHCI again in Bios / EFI ****

Update***


SATA 3 Benchmark.







SATA 2 Benchmark 

Well i messed around with some Benchmark programs here are the results