Friday, August 20, 2010

National Health Information Collaboration - Health Repository

Check out this SlideShare Presentation:
National Health Information Collaboration - Health Repository




View more presentations from Anil Mishra.

How to Install PHP on Windows 7








Installing PHP on Windows 7 is quite a simple affair. However, as the more experienced developers would know, you need to have a web server running first. I suggest using the world's most popular web server - get instructions on how to install Apache on Windows 7 operating system. And if you are a budding PHP programmer, you would very soon like to use it with MySQL database. So once you have finished with PHP installation, read the steps to install MySQL on Windows 7.

Assuming you have successfully been able to install Apache on Windows 7 and have seen the "It works" page, download the PHP file from www.php.net. Though I am on a 64 bit Windows 7 system, I downloaded php-5.2.11-Win32.zip because PHP doesn't come in 64 bit flavour.

Create a folder to install PHP

This tutorial will tell you how to install PHP from the zip archive and not from the installer file - [Slide 1]. Somehow, I've found this is a little simpler. So the first thing is to create a folder where you would like to unzip the PHP files. I like to keep things segregated and yet accessible. Giving PHP its own directory under the C: drive is what I generally do. So go ahead and create a folder called PHP in the C drive on your hard disk. Now unzip the contents of the downloaded PHP zip file into this folder - [Slide 2].
In this C:/PHP folder, you'll see a file called php.ini-recommended. Right-click on this file and choose Copy - [Slide 3]. Now paste the file in the same directory - [Slide 4].
Very important: Rename this file to
php.ini. Windows will tell you that changing the extension will make it unusable - Ignore the message and continue - [Slide 5].


Configuration Apache 2.2 web server for PHP installation

Though you have been able to put PHP on your computer, it's still not "installed" in the true sense of the word. We have to help the Apache web server communicate with PHP. This is done by editing the Apache configuration file, httpd.conf. Go to All Programs -> Apache HTTP Server 2.2 -> Configure Apache Server -> Edit the Apache httpd.conf Configuration File. This opens httpd.conf file in Notepad - [Slide 6].
Gear up to make some changes to this file- check the screenshots from the slideshow as you go along.


  • Locate the "LoadModule section" (Tip: use the Find feature or the Ctrl-F key combination). Add the following line - [Slide 7]LoadModule php5_module "c:/PHP/php5apache2_2.dll"

    Note: If you have chosen to install PHP is a different folder and not C:/PHP, you have to change the path in the above line.

  • Find the "AddType" section and put in the line below - [Slide 8].AddType application/x-httpd-php .php

    Note: You can also use other file extensions for PHP like .php3 or .php4 - simply add them at the end of the above line separated by a blank space.

  • Move to the end of the httpd.conf file and add the line below - [Slide 9]PHPIniDir "C:/PHP"

    Note: This tells the Apache web server the location of the PHP configuration file -
    php.ini.

  • If you've read my instructions on installing Apache on Windows7 know that all web site files are to be kept in the htdocs folder located under the Apache install directory. This means when you load http://localhost, Apache checks the htdocs folder - the "It works" file that's displayed the first time you test Apache installation is actually the index.html file in this folder.
    In accordance to my habit of having things organized, I like to keep web site files in their own folder away from Apache program and configuration files... something like
    C:/websites. The good news is that Apache allows you to make such a change pretty easily and to do this, you need to specify this new directory path as the document root.
    First create a folder for your web site files -
    C:/websites is what I use and is a nice choice. Find the DocumentRoot "C:/Apache/htdocs" in the Apache configuration file and change it to DocumentRoot "C:/websites" - [Slide 10].


  • Lastly, change <Directory "C:/Apache/htdocs"> to <Directory "C:/websites"> - [Slide 11].


Testing the PHP installation

Save the httpd.conf file - "File" -> "Save" [Slide 12] and restart your computer. You actually don't need to restart the machine; stopping and starting the Apache service would have probably worked but I needed a cup of tea.
It's now time to test whether PHP was properly installed on Windows 7. Open a Notepad window and type in the line below exactly as it appears - you can copy-paste if you want.
<?php phpinfo(); ?>
Save this file as phpinfo.php in the document root folder which should be C:/websites if you have followed by instructions above.

IMPORTANT: By default, Notepad will save the file as
.txt. So you need to select "All Files" from the "Save as type" drop down and enter the full file name in the "File name" field. Confused? Check the screenshot - [Slide 13].

Open a browser window and load http://localhost/phpinfo.php. A long page with details of the installed PHP version should display - please refer the screenshot in the slideshow - [Slide 14]. If you don't get this and see the PHP code instead, you've probably not saved the file with a .php extension.

This completes the instructions on how to install PHP on Windows 7. I also advice going through the PHP configuration file (php.ini) and making modifications as required.

How to install MySQL on Windows 7



This blog post is on how to install MySQL on Windows 7 is in continuation to the Apache and PHP installations on the same operating system. Before we begin, I like you to determine the system type - whether your computer is 32 bit or 64 bit. This is important as I had a horrendous time trying to troubleshoot PHP-MySQL connection problem - I have detailed this in a blog post - MySQL on a 64 bit Windows 7. You can know the system type from the "Control Panel" -> "System and Security" -> "System".

Download MySQL installer file
Be sure to choose the MySQL installer file that corresponds to your system type. For me, it was the mysql-essential-5.1.40-winx64.msi file from the MySQL.com web site. I chose the essentials file because it is sufficient for my needs. However, there is nothing stopping you from picking the bulky Windows MSI Installer if you want.

Instructions to install MySQL on Windows 7
The screenshots have been presented in a slideshow below - refer these if you have doubts. The process of installing MySQL is not very difficult, so don't be intimidated by the large number of slides; I just wanted to be thorough.



  • Start MySQL installation by double-clicking the .msi file - click "Run" when prompted - [Slide 1].

  • Click "Next" button in the introductory window - [Slide 2].

  • In the following screen, select Custom installation which will allow you to specify the folder to which MySQL will be installed. You can go ahead with a Typical MySQL setup but this will put MySQL deep down in the "Program Files" folder - [Slide 3].

  • Click the "Change" button and enter C:\MySQL in the Folder name field. Hit "OK" when done - [Slides 4 and 5].

  • The installer will change the MySQL installation folder to the one specified by you - [Slide 6].

  • You are now ready to install MySQL on Windows 7 operating system. Click "Install" - [Slide 7].

  • It would take some time for the progress bar to move ahead... be patient - [Slide 8].

  • You may also get messages along the way - simply click on "Next" to proceed - [Slide 9].

  • When the process finishes, you'll get to see the final screen. Congratulations - MySQL has been installed on your computer. You are now prompted to Configure the MySQL server and register the product. In the interest of time, I had unchecked the second box and clicked "Finish". You can do the same if you want - [Slide 10].

  • MySQL instance configuration is important - you cannot use the software until you do so. Click "Next" to proceed - [Slide 11].

  • Select "Detailed Configuration" option - [Slide 12].

  • Choose "Developer Machine" - [Slide 13].

  • I suggest going ahead with "Multifunctional Database" unless you know what you are doing - [Slide 14].

  • In the following screen, don't mess with the default values and click "Next" - [Slide 15].

  • The same goes for the subsequent screen - click "Next" - [Slide 16].

  • For the networking options configuration, put a check mark in front of "Enable Strict Mode" if it's not there - [Slide 17].

  • Yes, it's recommended to install MySQL as a Windows service and have the system include the MySQL bin directory in the Windows PATH variable - [Slide 18].

  • The password for the MySQL server instance has to be typed in twice. Remember to keep a note of it - Don't lose this MySQL password - [Slide 19].

  • The configuration wizard has received all the information it needs and is ready to create a MySQL server instance. Click "Execute" button - [Slide 20].

  • The instance should be configured without problems. If you do get a message from an anti-virus program or the Windows 7 operating system - choose the option to move ahead - [Slides 21 and 22].

Checking the MySQL installation

The easiest way to check MySQL installation and confirm that it's working properly is to use the MySQL Command Line Client. Fire it up from "All Programs" -> "MySQL" -> "MySQL Server 5.1" - [Slide 23].
Now enter the MySQL password - the characters you type will be replaced by the asterisk sign (the password is not shown for security reasons - obviously) - [Slide 24].
The MySQL client displays the mysql> prompt on successful login - [Slide 25]. Type show databases; (the semi-colon at the end is not a typo) and hit the enter key. This simple SQL command instructs MySQL to display the names of the installed databases, which should be three. Hurray - rejoice because you have been able to correctly install MySQL on Windows 7! [ Slide 26]

Configuring PHP to work with the MySQL installation

The PHP configuration file is php.ini located right in the install directory which should be C:/PHP if you have followed my instructions on how to install PHP on Windows 7 computer. We now have to modify this file so that all the three - Apache, PHP and MySQL - work together.

  • By default, PHP doesn't display error messages. This may be a good idea on a web server (security reasons) but for a developer machine (such as your local computer), you would like to see errors. The PHP error messages can point to the line which is causing your scripts to fail.
    [Slide 27] - Find the line
    error_reporting = E_ALL and change it to error_reporting = E_ALL & ~E_NOTICE
    [Slide 28] - Also change
    display_errors = Off to display_errors = On.

  • PHP also needs to be told the directory in which the extensions reside. Unearth the extension_dir = "./" line and change it to extension_dir = C:\PHP\ext. (I've assumed you've installed PHP in C:/PHP. If not, you have to specify the correct path.) - [Slide 29]

  • We need PHP to work with MySQL and, hence, have to load the required extensions. Locate the 'Extensions' section and uncomment (remove the semicolon in front of) the following lines - [Slide 30].extension=php_mysql.dll
    extension=php_mysqli.dll


  • [Slide 31] - Locate the register_globals = Off line and change it to register_globals = On. Experienced developers would tell you not to go ahead with this modification. I do this because a lot of my scripts won't work otherwise - I leave the decision to you.
Save the php.ini file and restart your computer - this will give you time to stretch your legs. By the way, as I had mentioned in the beginning, you have to a web server for PHP to work - read install Apache on Windows 7 for instructions.
Finally, if you have already been using MySQL on another computer you can quickly transfer the databases and tables using mysqldump and the mysql programs.

How to Install Apache on Windows 7


This blog provides detailed step by step instructions on how to install Apache on Windows 7 operating system. Chances are that you would follow the Apache installation with PHP and MySQL database.
Though not required for installing Apache, I suggest you check the system type - whether the Windows 7 your computer is running is 32 bit or 64 bit. This information is available from "Control Panel" -> "System and Security" -> "System" -> "System type". We'll need it when we come to installing MySQL.

Download the Apache Windows installer file
Point your browser to the Apache download page. Click on Win32 Binary without crypto (no mod_ssl) (MSI Installer) file; for instance, I downloaded apache_2.2.14-win32-x86-no_ssl.msi. Double-click on this file to start Apache installation. If you are shown a security warning, ignore it and click "Run" to continue - [Slide 1 in the slideshow below].



  • Click on "Next" in the introductory screen - [Slide 2].

  • Select the "I accept the terms in the license agreement" radio button and hit "Next" - [Slide 3].

  • Enter localhost for both "Network Domain" and "Server Name". In the "Administrator's Email Address" field I generally type in webmaster@localhost. Move to the next screen - [Slide 4].

  • Proceed with Typical installation type, unless you want to be adventurous! - [Slide 5]

  • As you can see from the screenshot, by default, Apache is installed in a folder deep under the "Program Files folder. I don't like this and would recommend that you change the installation directory too. I like to keep things slightly organized and prefer Apache to reside in its own folder on the C: drive. I entered C:\Apache as the destination folder and I suggest you do the same - [Slides 6 and 7].

  • To start installing Apache 2.2 on Windows 7, click on the "Install" button and sit back - [Slides 8 and 9].

  • By the way, if the installation process is interrupted by the anti-virus program on your computer, just provide permissions for it to continue - [Slide 10].

  • In a few minutes, the Apache web server would be installed on your Windows 7 computer - [Slide 11].

  • To test the installation, open a web browser window, enter http://localhost/ in the address bar and hit the "Enter" key - [Slide 12].

  • If you get a page with the words "It works!", celebrate, because you now have the Apache web server running on your Windows 7 computer. Didn't get this message? You may need to start Apache. Go to "All Programs" -> "Apache HTTP Server 2.2" -> "Control Apache Server" and select either "Start" or "Restart". The Apache server can also be started and stopped from "Services" under the Control Panel - [Slide 13 and 14].
For the newly initiated, the HTML file that is displayed when you load http://localhost/ is index.html located inside the htdocs folder in the Apache install directory. Now that Apache has been installed on your Windows 7 computer and is successfully running.

Digital Futures Project: Who Trusts Digital Information?


The Center for the Digital Future at the USC Annenberg School for Communication & Journalism created the World Internet Project, which includes the Digital Future Project and similar studies across the globe.
The recently released 2010 Digital Futures Project looks at a variety of trends, including the public's lack of "trust" in information online. Maybe that is the angle librarians need to take -- how they can teach students how to evaluate information so they can determine which sources of info they can trust. Here are highlights from "Media Use and Trust" section of the report:
  • Views about Sources of Information and Entertainment:In the current Digital Future Project, a large majority of respondents age 17 and older said that the Internet was an important or very important source of information for them -- higher than the figure reported for television, newspapers, or radio. Comparing the views of users about the importance of entertainment sources, television ranks highest, with 79% of users saying it is an important or very important entertainment source for them, compared to the Internet, radio, and newspapers. (Page 67)
  • Reliability of Information Online: Views of Internet Users: For the third year in a row, a declining percentage of Internet users said that most or all of the information online is reliable. (Page 71)
  • Online Information: Reliability and Accuracy of Frequently-Visited Web Sites: Internet users have much more faith in the Web sites they visit regularly than they do in information online overall, but that faith continues to decline. (Page 73)
  • Web Sites: Which Are Reliable and Accurate, and Which Are Not?:The percentage of Internet users who said that most or all of the information posted by individuals, governments, and established media is reliable and accurate rose slightly in the current Digital Future Study. (Page 75)
  • Social Networking Sites: Reliability and Accuracy: A new question for the Digital Future Project found that only 15% of users said that most or all of the information on social networking sites is reliable and accurate. (Page 81)
  • Search Engines: Reliability and Accuracy: A majority of Internet users said that most or all of the information provided by search engines such as Google is reliable and accurate. However, 12% of users said that only a small portion or none of the information provided by search engines is reliable and accurate, up slightly from 10% in 2008.(Page 82)
  • Trust in the Internet: Forty-two percent of respondents said they have some trust or a lot of trust in the Internet. Fourteen percent of respondents said they have no trust in the Internet. (Page 84)
  • TV Viewing and Time-Shifting: Time-shifting of video viewing is increasing, but only marginally. (Page 86)
  • Trends in Online Media Use:Internet users continue to report considerable time each week using a variety of online media, but in the current study, use of the two most popular online media declined. (Page 88)
  • Twitter, E-books, Internet Video, and Audio Podcasts: In several new questions for this year's Digital Future Study, Internet users were asked about their use of media that have been growing in popularity, including Twitter, e-books, and audio podcasts. Among other responses, the study found that 1/2 of those who go online have used free micro-blogs such as Twitter or Facebook. (Page 89)
  • Would You Miss The Print Edition of Your Newspaper? While Internet users report that they devote significant amounts of time to reading online newspapers, 62% of users who read newspapers offline said they would miss the print edition of their newspaper if it ceased to exist -- an increase for the second year in a row. However, 22% of users who read newspapers said they would not miss the print edition of their newspaper, down from 24% in 2008. Page 91)
  • Does Online Content Lead to Canceled Print Subscriptions? Even though large percentages of users who read newspapers would miss the print edition of the publication if it was no longer available (see the previous question), a notable percentage of Internet users – 18% -- said they stopped a subscription for a newspaper or magazine because they now get the same or related content online, a decline from 22% in 2008. (Page 91)
  • Cell Phones and Text Messages: Text messaging by cell phone users has more than doubled in only two years; overall, cell phone users who send text messages average 38 messages per day, compared to 16 in 2007. More specifically, text messaging is almost exclusively a medium for young cell phone users; the number of messages sent per day is by far the highest among those under 18 -- 81 per day in the current study, up from 33 per day in 2007. (Page 99)
  • Posting Information Online: Blogs, Photos, and Maintaining Personal Web Pages: Content creation and distribution by Internet users on a blog, through a display of photos, or on a personal Web page, continues to increase substantially, while the percentage of respondents maintaining a personal Web site has remained generally stable for three years. (Page 100)

Recommend this

Related Posts Plugin for WordPress, Blogger...