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