Install PEAR packages in PHP 5.4.15
	
  
	Information 
	none
	
  
	Operating system used 
	Windows Vista Home Premium SP 2
	
  
	Software prerequisites 
	PHP5.4.15 
	PEAR
	
  
		
	Procedure
	
	- After you have run php go-pear.phar, see Install PEAR in PHP 5.4.15 you can
		now install PEAR packages using the pear command.
		
  
	 	
	- To determine which package to install go to
		http://pear.php.net/packages.php
		and select the package.
 
		In the following example, installation details about the MDB2 package is gathered.
		
  
		
		- Select Database.
			
  
			  
			
  	
		 
		- Select MDB2.
			
  
			  
			
  	
		 	
		- Select download.
			
  
			  
			
  	
		 			
		- Select the latest stable version.
			
  
			  
			
  	
		 				
		
		- Read the information about this package and also it dependencies. 
 
			The pear command is displayed: pear install MDB2-2.4.1 
			
  
			  
			
  	
		 			
		 
	
	 
	- Open a dos window and goto the directory where your php is installed.
 
		In this directory the pear.bat is located. For example: 
		C:\tools\php-5.4.15-Win32-thread-safe
		
  
	 	
	- First clear Web Services cache, type:
 
		pear clear-cache	
		
  
	 
	- Install MDB2 database, type:
 
		pear install MDB2-2.4.1
		
  
		You will see the following:
		
  
		
		downloading MDB2-2.4.1.tgz ... 
		Starting to download MDB2-2.4.1.tgz (119,790 bytes) 
		..........................done: 119,790 bytes 
		install ok: channel://pear.php.net/MDB2-2.4.1 
		MDB2: Optional feature fbsql available (Frontbase SQL driver for MDB2) 
		MDB2: Optional feature ibase available (Interbase/Firebird driver for MDB2) 
		MDB2: Optional feature mysql available (MySQL driver for MDB2) 
		MDB2: Optional feature mysqli available (MySQLi driver for MDB2) 
		MDB2: Optional feature mssql available (MS SQL Server driver for MDB2) 
		MDB2: Optional feature oci8 available (Oracle driver for MDB2) 
		MDB2: Optional feature pgsql available (PostgreSQL driver for MDB2) 
		MDB2: Optional feature querysim available (Querysim driver for MDB2) 
		MDB2: Optional feature sqlite available (SQLite2 driver for MDB2) 
		MDB2: To install optional features use "pear install pear/MDB2#featurename"
		
		
  
	 
	- I have installed MySQL 5.1 and should therefore install a MySQL driver for MDB2. According to the output message above,
		the optional feature mysql should be used. Type:
 
		pear install pear/MDB2#mysql
		
  
		You will see the following:
		
  
		
		Skipping package "pear/MDB2", already installed as version 2.4.1 
		downloading MDB2_Driver_mysql-1.4.1.tgz ... 
		Starting to download MDB2_Driver_mysql-1.4.1.tgz (36,481 bytes) 
		..........done: 36,481 bytes 
		install ok: channel://pear.php.net/MDB2_Driver_mysql-1.4.1
		
		
  	
		
	
	
  
 
	
	 
	- Follow the same procedure to gather installation details about the Log package.
 
		In this example the following Log package is installed, type: 
		pear install Log-1.12.7
		
  
		You will see the following:
		
  
		
		WARNING: "pear/DB" is deprecated in favor of "pear/MDB2" 
		Did not download optional dependencies: pear/DB, pear/Mail, use --alldeps to download automatically 
		pear/Log can optionally use package "pear/DB" (version >= 1.3) 
		pear/Log can optionally use package "pear/Mail" 
		pear/Log can optionally use PHP extension "sqlite" 
		downloading Log-1.12.7.tgz ... 
		Starting to download Log-1.12.7.tgz (46,898 byte 
		.............done: 46,898 bytes 
		install ok: channel://pear.php.net/Log-1.12.7 
		
		 
	 	
	- Show all installed packages, type:
 
		pear list
		
  
		You will see the following:
INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
=========================================
PACKAGE           VERSION STATE
Archive_Tar       1.3.11  stable
Console_Getopt    1.3.1   stable
Log               1.12.7  stable
MDB2              2.4.1   stable
MDB2_Driver_mysql 1.4.1   stable
PEAR              1.9.4   stable
Structures_Graph  1.0.4   stable
XML_Util          1.2.1   stable
 		
	 
	- To remove an installed package, type:
 
		pear uninstall <PACKAGE>
		
  
		For example: 
		pear uninstall MDB2-2.4.1
			
	 
	
	 
	
	 
	
	 
	 
	 
	 
	 |