Wednesday, February 27, 2013

LAMP



  • Comparison of WAMPs

http://en.wikipedia.org/wiki/Comparison_of_WAMPs


  • LAMP (software bundle)

LAMP is a solution stack of free, open source software. The acronym LAMP refers to the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software), and PHP, Perl or Python, principal components to build a viable general purpose web server.

Similar terms exist for essentially the same software suite (AMP) running on other operating systems, such as Microsoft Windows (WAMP), Mac OS (MAMP), Solaris (SAMP), iSeries (iAMP), or OpenBSD (OAMP).
http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29

Connecting to MySQL from PHP


Connecting to MySQL from PHP
Open the php.ini configuration file in a text editor.
Find the line ; extension_dir = "ext" and change it to:
extension_dir = "c:\php\ext\"
Find the line ;extension=php_pdo_mysql.dll and uncomment it by removing the semicolon.
Restart the Apache server.


Copy the following listing into a new file under your htdocs directory.
<?php
header('Content-type:text/plain');
$dbh = new PDO('mysql:host=localhost;dbname=test', 'root', 'PASSWORD');
$st = $dbh->prepare('select bar from foo');
$st->execute();
var_dump($st->fetch(PDO::FETCH_ASSOC));
?>

http://www.vbforums.com/showthread.php?651576-Installing-MySQL-Server-5.5-on-Windows-7

building php environment

  • Installing PHP 5.3 and Apache HTTP Server on Windows 7


Installing PHP
version is 5.3.6.
Download PHP from this page:
http://windows.php.net/download/
Get the latest thread-safe VC9 binary in zip archive format.
Extract the archive into a suitable directory — usually C:\php\.
Navigate into this directory and rename the file php.ini-development to php.ini.
Open a terminal window. Change into the directory where you extracted the files and run php -i




  • Installing Apache HTTP Server

version is 2.2.19.
Download Apache from this page:
http://www.apachelounge.com/download/
Get the first link under the heading "Apache 2.2 win32 binary". It's another zip archive.
Extract the archive. The default path is C:\apache2\.
Using your terminal window, change into the bin directory under the Apache directory, and run httpd -k install to install Apache as a service.
Run httpd -k start to start the server.
Now navigate to http://localhost/
The file you are seeing is index.html, under htdocs in the Apache directory.



  • Configuring PHP as an Apache Module

Edit the file conf\httpd.conf under the Apache directory.
Add the following to the bottom of the file:

LoadModule php5_module "c:/php/php5apache2_2.dll"
<IfModule php5_module>
AddType application/x-httpd-php .php
PHPIniDir c:/php/
DirectoryIndex index.php index.html
</IfModule>

In the htdocs directory, create a file called test.php with the following contents:
<?php phpinfo(); ?>

Restart Apache (httpd -k restart) to effect the changes we've made.
Now navigate to http://localhost/test.php in your web browser


  • config with php-5.4.12-Win32-VC9-x86.zip.Use the same config as well as above.Otherwise it gives error with "c:/php/php5apache2_4.dll" parameter



LoadModule php5_module "c:/php/php5apache2_2.dll"
<IfModule php5_module>
AddType application/x-httpd-php .php
PHPIniDir c:/php/
DirectoryIndex index.php index.html
</IfModule>


http://www.vbforums.com/showthread.php?651571-Installing-PHP-5.3-and-Apache-HTTP-Server-on-Windows-7




  • phpMyAdmin

phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the World Wide Web. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement.
http://www.phpmyadmin.net/home_page/index.php




  • SQL Buddy – Web based MySQL administration

http://sqlbuddy.com/



  • Webgrind

Webgrind is an Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job. Here's a screenshot showing the output from profiling:
https://code.google.com/p/webgrind/