SlideShare une entreprise Scribd logo
1  sur  10
Télécharger pour lire hors ligne
Installing Stuff
                                          Alex S.∗



1         Introduction
This document will help/guide you to install Apache, MySQL, PHP, and Perl. The assump-
tion is that you’re running Windows2000 (or WindowsXP). If you’re on Linux, you likely
have all these things already installed (they’re pretty easy to install anyway; just read the
documentation)
    I tried to use the latest version at the time of writing this document. Later versions
shouldn’t be that much different to install. You are encouraged to repeat this installation
several times (and possibly on different systems—try setting up a Linux machine with all
these things) to get a good hang of how things work.


2         Apache
Apache is a Web Server, which you can download from:

http://www.apache.org/

For this tutorial, we will use Apache2, but the procedures are the similar (or exactly the
same) as previous versions.

2.1        Installation
Installation of Apache under Windows involves double clicking on the:

apache_2.0.54-win32-x86-no_ssl.msi

The version you have may be different, but the process is the same. Follow the screens and
accept all defaults until the dialog that asks you for location where to install Apache. The
default is:

C:Program FilesApache Group
    ∗
        alex@theparticle.com


                                             1
2.2 Testing                                                                      3 MYSQL


You don’t want this. You want to set it to:

C:

This will create directory C:Apache2, which is nice and short, compared to the alternative.
   After the installation, the “Installation Completed” dialog box should come up with a
“Finish” button; congratulations, you have just installed Apache Web Server.

2.2    Testing
You can test your install of Apache by going to:

http://localhost/

Or

http://127.0.0.1/

You should see a “Test Page for Apache Installation.”

2.3    Troubleshooting
The installation or instantiation might fail if you have other web-server running on the
computer—like a previous version of Apache, or more likely, MicrosoftTM Internet Informa-
tion Server (IIS). You should disable or remove that before installing Apache. A way to
disable these things should be somewhere in the Control Panel.

2.4    Starting & Stopping
You can start/stop the server from command prompt (a.k.a. The DOS Box) by typing:

net start apache2

Or

net stop apache2


3     MySQL
MySQL is a Database Server, which you can download from:

http://www.mysql.com/

For this tutorial, we will use MySQL 5. This latest version makes installing much simpler
compared to previous versions.

                                              2
3.1 Installation                                                                    3 MYSQL


3.1       Installation
Installation of MySQL5 under Windows involves double clicking on the:

mysql-5.0.6-beta-win32.exe

The version you have may be different, but the process is the same. Follow the screens and
accept all defaults. You can skip the sign-up process.
   After the installation, you are asked to configure the server. Select that option, and
proceed to the configuration wizard.

3.1.1      Configuration
In the configuration wizard, select “Standard Configuration.” In the following screen, you
should “Install as Windows Service,” and “Include Bin Directory to Windows PATH,”—this
will make it much easier to work with MySQL.
    You will also be asked to provide the “root” (the MySQL administrator) password. Spec-
ify something easy to remember. While you’re getting started, I recommend using “12345”;
that way you won’t get locked out of your own server1 .
    At the end of the configuration wizard, you are asked to “Execute” all the configurations
that you’ve specified. Do that now.
    Congratulations, your server is now installed and configured (and hopefully running).

3.2       Testing
You can test the MySQL server by logging in. Start a Command Prompt (DOS Box), and
type:

C:>mysql -uroot -p mysql

This will ask you to enter the password (do that), at which point it should display a screen
that looks something like this:

Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 5 to server version: 5.0.6-beta-nt

Type ’help;’ or ’h’ for help. Type ’c’ to clear the buffer.

mysql>

This is the MySQL prompt, where you can type in any commands, including SQL statements.
A simple list of commands to create a test database, and try it out is:
  1
      Note that for a production server, you should use a more creative password.




                                                      3
3.2 Testing                                                                  3 MYSQL


mysql> create database blah;
Query OK, 1 row affected (0.01 sec)

mysql> grant all on blah.* to blah identified by ’12345’;
Query OK, 0 rows affected (0.11 sec)

mysql> use blah;
Database changed
mysql> create table glah (
    ->     id int unsigned auto_increment,
    ->     name varchar(20),
    ->     primary key(id)
    -> );
Query OK, 0 rows affected (0.34 sec)

mysql> insert into glah(name) values (’meh’);
Query OK, 1 row affected (0.12 sec)

mysql> insert into glah(name) values (’beh’);
Query OK, 1 row affected (0.08 sec)

mysql> select * from glah;
+----+------+
| id | name |
+----+------+
| 1 | meh |
| 2 | beh |
+----+------+
2 rows in set (0.04 sec)

mysql> exit
Bye

The grant command above gives the user blah all privileges on the blah database, and sets
the password for user blah to “12345”. To login as that user:

C:>mysql -ublah -p blah

and type in that “12345” as the password. You can do anything you want on that blah
database, but not any other database.




                                           4
3.3 Troubleshooting                                                                   4 PHP


3.3    Troubleshooting
The first thing to check is whether your MySQL server is running. Check out Section 3.4
for information on starting/stopping the service.
    Another thing that could be wrong is that MySQL didn’t setup the PATH environment
variable. In Command Prompt, try going to:

C:Program FilesMySQLMySQL Server 5.0bin

and running all the commands from there.

3.4    Starting & Stopping
You can start/stop the server from command prompt (a.k.a. The DOS Box) by typing:

net start mysql

Or

net stop mysql


4     PHP
PHP is PHP Hypertext Processor, which you can download from:

http://www.php.net/

For this tutorial, we will use PHP 5. Installing previous versions is very similar.

4.1    Basic Installation
Installation of PHP 5 under Windows involves unzipping:

php-5.0.4-Win32.zip

Into some nice convenient place, like:

C:php

   Inside the c:php directory, you will find install.txt file, that describes exactly, step by
step, what you need to do to properly install and configure PHP with any number of servers.
For this tutorial, we are using Apache2 (installed in Section 2), and MySQL5 (installed in
Section 3).




                                              5
4.2 Basic Testing                                                                4 PHP


4.1.1      php.ini
In the C:php directory, make a copy of php.ini-dist, and name the copy php.ini. Open
php.ini in your favorite text editor2 .
    You need to set doc_root to Apache’s htdocs directory. In other words:

doc_root = "C:Apache2htdocs"

      You need to set extension_dir to:

extension_dir = "C:phpext"

      You’ll also need to setup session support. You need to create directory:

C:Tempphp_session

And then you need to look for session.save_path line, and set it to:

session.save_path = "C:Tempphp_session"

4.1.2      httpd.conf
We also need to configure Apache2 to work with PHP. This involves editing:

C:Apache2confhttpd.conf

At the end of the “Loading Modules” section, you need to add:

# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"

4.2       Basic Testing
PHP and Apache should now be configured. You should restart Apache, at Command
Prompt run:

net stop apache2
net start apache2

If everything goes ok, open your web browser to:

http://localhost/asdf
  2
      If you don’t have a favorite editor, just open it in Notepad.

                                                        6
4.3 Configuration                                                                  4 PHP


This should give you an Apache error message, but it should also give you the server signa-
ture, which should include PHP. Ie:
Apache/2.0.54 (Win32) PHP/5.0.4 Server at localhost Port 80
   A more involved test requires you to write a simple PHP script. Take the following and
place it in:
C:Apache2htdocsphpinfo.php
The contents of the script is just one line:
<?php phpinfo(); ?>
Now, going to:
http://localhost/phpinfo.php
should provide a much better view of what you just installed.

4.3    Configuration
Yes, we’re not done with configuration just yet. We need to ensure MySQL module (and
library) are properly setup and running. For this, we need to update the php.ini file again.
You’ll need to find the line:
;extension=php_mysql.dll
and change it to:
extension=php_mysql.dll
In other words, remove the ; character that comments out that line.
    Also, now that we installed MySQL 5, we don’t need the MySQL client library that PHP
ships with (which I think is “Client API version: 4.1.7”—we have MySQL5, might as well
use the proper client libraries).
    Stop Apache2, and erase file:
C:phplibmysql.dll
And start Apache2 once again.
  Once done, if you go to that phpinfo.php page, under MySQL, it should display:
Client API version: 5.0.6-beta
(or the version of MySQL that you installed.
    The reason the above works is because when we installed MySQL, we put its bin
directory into the PATH. Without that, those MySQL libraries would not be found. If having
problems getting this to work, you can try moving the:
C:Program FilesMySQLMySQL Server 5.0binlibmySQL.dll
To some place like:
C:WindowsSystem32
Do not do this unless you’re having problems starting Apache.

                                               7
5 PERL


5     Perl
Perl is a Scripting Language, which you can download from:

http://www.activeperl.com/

For this tutorial, we will use ActivePerl 5.8.7.813, but the procedures are the similar (or
exactly the same) as previous versions.
    ActivePerl is a pretty good Windows version of Perl. Since Perl is open source, there
are many distributions. ActivePerl is a Microsoft sponsored port of the generally UNIX Perl
version to Windows.

5.1    Installation
Installation of Perl under Windows involves double clicking on the:

ActivePerl-5.8.7.813-MSWin32-x86-148120.msi

The version you have may be different, but the process is the same. Follow the screens and
accept all defaults.

5.2    Testing
You can test Perl by opening the Command Prompt, and typing:

C:>echo print qq{Hello World $_n} for(1..5) |perl

Which should display something like:

C:>echo print qq{Hello World $_n} for(1..5) |perl
Hello World 1
Hello World 2
Hello World 3
Hello World 4
Hello World 5

Or you could just type:

C:>perl --version

But that’s not as fun :-)




                                             8
6 TESTING EVERYTHING


6    Testing Everything
You can test everything (well, except Perl) by simply using a simple MySQL example from
the PHP documentation:
http://us3.php.net/manual/en/ref.mysql.php
The modified example should be saved in file:
C:Apache2htdocsglah.php
This particular example, will display the contents of the glah table created in Section 3.2.
The code follows:
<?php
// Connecting, selecting database
$link = mysql_connect(’localhost’, ’blah’, ’12345’)
   or die(’Could not connect: ’ . mysql_error());
echo ’Connected successfully’;
mysql_select_db(’blah’) or die(’Could not select database’);

// Performing SQL query
$query = ’SELECT * FROM glah’;
$result = mysql_query($query) or die(’Query failed: ’
                                     . mysql_error());

// Printing results in HTML
echo "<table>n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
   echo "t<tr>n";
   foreach ($line as $col_value) {
       echo "tt<td>$col_value</td>n";
   }
   echo "t</tr>n";
}
echo "</table>n";

// Free resultset
mysql_free_result($result);

// Closing connection
mysql_close($link);
?>
After saving the above in glah.php file, you can see it work by going to:

                                             9
7 CONCLUSION


http://localhost/glah.php

The page displays:

Connected successfully
1    meh
2    beh

This is exactly what’s in those tables :-)


7    Conclusion
If everything in these pages worked, then you’re ready to move onto the next round. Other-
wise, I suggest re-installing things until things start to work.
    Everything in these pages was tested as I write this (on a fresh install); so things should
work if you follow the exact steps. Good luck.
    If things still don’t work, you can try installing:

http://sourceforge.net/projects/quickeasyphp/

This is an all-in-one installer for Apache/PHP/MySQL. This may seems like a quick time-
saver, but I still highly recommend that you install things separately.




                                              10

Contenu connexe

Tendances

How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7VCP Muthukrishna
 
Complete Wordpress Security By CHETAN SONI - Cyber Security Expert
Complete Wordpress Security By CHETAN SONI - Cyber Security ExpertComplete Wordpress Security By CHETAN SONI - Cyber Security Expert
Complete Wordpress Security By CHETAN SONI - Cyber Security ExpertChetan Soni
 
How to Install LAMP in Ubuntu 14.04
How to Install LAMP in Ubuntu 14.04How to Install LAMP in Ubuntu 14.04
How to Install LAMP in Ubuntu 14.04Sanjary Edu
 
Diva23
Diva23Diva23
Diva23diva23
 
Deploy agent in em12c
Deploy agent in em12cDeploy agent in em12c
Deploy agent in em12cOsama Mustafa
 
How To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load BalancerHow To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load BalancerVCP Muthukrishna
 
How to install and configure LEMP stack
How to install and configure LEMP stackHow to install and configure LEMP stack
How to install and configure LEMP stackRootGate
 
Integration of apache with tomcat
Integration of apache with tomcatIntegration of apache with tomcat
Integration of apache with tomcatCognizant
 
EMC Networker installation Document
EMC Networker installation DocumentEMC Networker installation Document
EMC Networker installation Documentuzzal basak
 
How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7VCP Muthukrishna
 
Drupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on WindowsDrupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on WindowsAlessandro Pilotti
 
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7VCP Muthukrishna
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11guzzal basak
 
A Complete Installation Guide for Orangescrum
A Complete Installation Guide for OrangescrumA Complete Installation Guide for Orangescrum
A Complete Installation Guide for OrangescrumOrangescrum
 
Integrating Tomcat And Apache On Windows
Integrating Tomcat And Apache On WindowsIntegrating Tomcat And Apache On Windows
Integrating Tomcat And Apache On WindowsMohanraj Nagasamy
 
Oracle olap-installation
Oracle olap-installationOracle olap-installation
Oracle olap-installationAmit Sharma
 
Mysql administration
Mysql administrationMysql administration
Mysql administrationbeben benzy
 

Tendances (18)

How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
 
Complete Wordpress Security By CHETAN SONI - Cyber Security Expert
Complete Wordpress Security By CHETAN SONI - Cyber Security ExpertComplete Wordpress Security By CHETAN SONI - Cyber Security Expert
Complete Wordpress Security By CHETAN SONI - Cyber Security Expert
 
How to Install LAMP in Ubuntu 14.04
How to Install LAMP in Ubuntu 14.04How to Install LAMP in Ubuntu 14.04
How to Install LAMP in Ubuntu 14.04
 
Diva23
Diva23Diva23
Diva23
 
Deploy agent in em12c
Deploy agent in em12cDeploy agent in em12c
Deploy agent in em12c
 
How To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load BalancerHow To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load Balancer
 
How to install and configure LEMP stack
How to install and configure LEMP stackHow to install and configure LEMP stack
How to install and configure LEMP stack
 
Integration of apache with tomcat
Integration of apache with tomcatIntegration of apache with tomcat
Integration of apache with tomcat
 
EMC Networker installation Document
EMC Networker installation DocumentEMC Networker installation Document
EMC Networker installation Document
 
How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7
 
Drupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on WindowsDrupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on Windows
 
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
 
PowerShell-2
PowerShell-2PowerShell-2
PowerShell-2
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11g
 
A Complete Installation Guide for Orangescrum
A Complete Installation Guide for OrangescrumA Complete Installation Guide for Orangescrum
A Complete Installation Guide for Orangescrum
 
Integrating Tomcat And Apache On Windows
Integrating Tomcat And Apache On WindowsIntegrating Tomcat And Apache On Windows
Integrating Tomcat And Apache On Windows
 
Oracle olap-installation
Oracle olap-installationOracle olap-installation
Oracle olap-installation
 
Mysql administration
Mysql administrationMysql administration
Mysql administration
 

En vedette

En vedette (7)

skintutorial
skintutorialskintutorial
skintutorial
 
Jonny_Martin-Asterisk
Jonny_Martin-AsteriskJonny_Martin-Asterisk
Jonny_Martin-Asterisk
 
How States Can Support Transformation in Tough Times
How States Can Support Transformation in Tough TimesHow States Can Support Transformation in Tough Times
How States Can Support Transformation in Tough Times
 
CombustionREFlexMorphing
CombustionREFlexMorphingCombustionREFlexMorphing
CombustionREFlexMorphing
 
web%20design-08-fall
web%20design-08-fallweb%20design-08-fall
web%20design-08-fall
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
Rennie Center Presentation
Rennie Center PresentationRennie Center Presentation
Rennie Center Presentation
 

Similaire à instaling

Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Boxguest34a3a419
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows BoxJayanta Dash
 
Installing Hortonworks Hadoop for Windows
Installing Hortonworks Hadoop for WindowsInstalling Hortonworks Hadoop for Windows
Installing Hortonworks Hadoop for WindowsJonathan Bloom
 
Bugzilla Installation Process
Bugzilla Installation ProcessBugzilla Installation Process
Bugzilla Installation ProcessVino Harikrishnan
 
How to export import a mysql database via ssh in aws lightsail wordpress rizw...
How to export import a mysql database via ssh in aws lightsail wordpress rizw...How to export import a mysql database via ssh in aws lightsail wordpress rizw...
How to export import a mysql database via ssh in aws lightsail wordpress rizw...AlexRobert25
 
How to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on WindowsHow to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on WindowsRizban Ahmad
 
Working with Apache Web ServerTime Required 35 minutesObjective.pdf
Working with Apache Web ServerTime Required 35 minutesObjective.pdfWorking with Apache Web ServerTime Required 35 minutesObjective.pdf
Working with Apache Web ServerTime Required 35 minutesObjective.pdfamikoenterprises
 
R hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing HadoopR hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing HadoopAiden Seonghak Hong
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011Alfred Ayache
 
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...CloudMinister Technologies Pvt. Ltd
 
Installation of Drupal on Windows XP
Installation of Drupal on Windows XPInstallation of Drupal on Windows XP
Installation of Drupal on Windows XPRupesh Kumar
 
Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2benjaminwootton
 
How to install oracle ops center 12c
How to install oracle ops center 12cHow to install oracle ops center 12c
How to install oracle ops center 12cMuqthiyar Pasha
 

Similaire à instaling (20)

Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Box
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Box
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
Installing Hortonworks Hadoop for Windows
Installing Hortonworks Hadoop for WindowsInstalling Hortonworks Hadoop for Windows
Installing Hortonworks Hadoop for Windows
 
Apache - Quick reference guide
Apache - Quick reference guideApache - Quick reference guide
Apache - Quick reference guide
 
Bugzilla Installation Process
Bugzilla Installation ProcessBugzilla Installation Process
Bugzilla Installation Process
 
Jones_Lamp_Tutorial
Jones_Lamp_TutorialJones_Lamp_Tutorial
Jones_Lamp_Tutorial
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Network Manual
Network ManualNetwork Manual
Network Manual
 
How to export import a mysql database via ssh in aws lightsail wordpress rizw...
How to export import a mysql database via ssh in aws lightsail wordpress rizw...How to export import a mysql database via ssh in aws lightsail wordpress rizw...
How to export import a mysql database via ssh in aws lightsail wordpress rizw...
 
How to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on WindowsHow to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on Windows
 
Working with Apache Web ServerTime Required 35 minutesObjective.pdf
Working with Apache Web ServerTime Required 35 minutesObjective.pdfWorking with Apache Web ServerTime Required 35 minutesObjective.pdf
Working with Apache Web ServerTime Required 35 minutesObjective.pdf
 
R hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing HadoopR hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing Hadoop
 
zLAMP
zLAMPzLAMP
zLAMP
 
Lampstack (1)
Lampstack (1)Lampstack (1)
Lampstack (1)
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011
 
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
 
Installation of Drupal on Windows XP
Installation of Drupal on Windows XPInstallation of Drupal on Windows XP
Installation of Drupal on Windows XP
 
Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2
 
How to install oracle ops center 12c
How to install oracle ops center 12cHow to install oracle ops center 12c
How to install oracle ops center 12c
 

Plus de tutorialsruby

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>tutorialsruby
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascripttutorialsruby
 

Plus de tutorialsruby (20)

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
 

Dernier

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Dernier (20)

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

instaling

  • 1. Installing Stuff Alex S.∗ 1 Introduction This document will help/guide you to install Apache, MySQL, PHP, and Perl. The assump- tion is that you’re running Windows2000 (or WindowsXP). If you’re on Linux, you likely have all these things already installed (they’re pretty easy to install anyway; just read the documentation) I tried to use the latest version at the time of writing this document. Later versions shouldn’t be that much different to install. You are encouraged to repeat this installation several times (and possibly on different systems—try setting up a Linux machine with all these things) to get a good hang of how things work. 2 Apache Apache is a Web Server, which you can download from: http://www.apache.org/ For this tutorial, we will use Apache2, but the procedures are the similar (or exactly the same) as previous versions. 2.1 Installation Installation of Apache under Windows involves double clicking on the: apache_2.0.54-win32-x86-no_ssl.msi The version you have may be different, but the process is the same. Follow the screens and accept all defaults until the dialog that asks you for location where to install Apache. The default is: C:Program FilesApache Group ∗ alex@theparticle.com 1
  • 2. 2.2 Testing 3 MYSQL You don’t want this. You want to set it to: C: This will create directory C:Apache2, which is nice and short, compared to the alternative. After the installation, the “Installation Completed” dialog box should come up with a “Finish” button; congratulations, you have just installed Apache Web Server. 2.2 Testing You can test your install of Apache by going to: http://localhost/ Or http://127.0.0.1/ You should see a “Test Page for Apache Installation.” 2.3 Troubleshooting The installation or instantiation might fail if you have other web-server running on the computer—like a previous version of Apache, or more likely, MicrosoftTM Internet Informa- tion Server (IIS). You should disable or remove that before installing Apache. A way to disable these things should be somewhere in the Control Panel. 2.4 Starting & Stopping You can start/stop the server from command prompt (a.k.a. The DOS Box) by typing: net start apache2 Or net stop apache2 3 MySQL MySQL is a Database Server, which you can download from: http://www.mysql.com/ For this tutorial, we will use MySQL 5. This latest version makes installing much simpler compared to previous versions. 2
  • 3. 3.1 Installation 3 MYSQL 3.1 Installation Installation of MySQL5 under Windows involves double clicking on the: mysql-5.0.6-beta-win32.exe The version you have may be different, but the process is the same. Follow the screens and accept all defaults. You can skip the sign-up process. After the installation, you are asked to configure the server. Select that option, and proceed to the configuration wizard. 3.1.1 Configuration In the configuration wizard, select “Standard Configuration.” In the following screen, you should “Install as Windows Service,” and “Include Bin Directory to Windows PATH,”—this will make it much easier to work with MySQL. You will also be asked to provide the “root” (the MySQL administrator) password. Spec- ify something easy to remember. While you’re getting started, I recommend using “12345”; that way you won’t get locked out of your own server1 . At the end of the configuration wizard, you are asked to “Execute” all the configurations that you’ve specified. Do that now. Congratulations, your server is now installed and configured (and hopefully running). 3.2 Testing You can test the MySQL server by logging in. Start a Command Prompt (DOS Box), and type: C:>mysql -uroot -p mysql This will ask you to enter the password (do that), at which point it should display a screen that looks something like this: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 5 to server version: 5.0.6-beta-nt Type ’help;’ or ’h’ for help. Type ’c’ to clear the buffer. mysql> This is the MySQL prompt, where you can type in any commands, including SQL statements. A simple list of commands to create a test database, and try it out is: 1 Note that for a production server, you should use a more creative password. 3
  • 4. 3.2 Testing 3 MYSQL mysql> create database blah; Query OK, 1 row affected (0.01 sec) mysql> grant all on blah.* to blah identified by ’12345’; Query OK, 0 rows affected (0.11 sec) mysql> use blah; Database changed mysql> create table glah ( -> id int unsigned auto_increment, -> name varchar(20), -> primary key(id) -> ); Query OK, 0 rows affected (0.34 sec) mysql> insert into glah(name) values (’meh’); Query OK, 1 row affected (0.12 sec) mysql> insert into glah(name) values (’beh’); Query OK, 1 row affected (0.08 sec) mysql> select * from glah; +----+------+ | id | name | +----+------+ | 1 | meh | | 2 | beh | +----+------+ 2 rows in set (0.04 sec) mysql> exit Bye The grant command above gives the user blah all privileges on the blah database, and sets the password for user blah to “12345”. To login as that user: C:>mysql -ublah -p blah and type in that “12345” as the password. You can do anything you want on that blah database, but not any other database. 4
  • 5. 3.3 Troubleshooting 4 PHP 3.3 Troubleshooting The first thing to check is whether your MySQL server is running. Check out Section 3.4 for information on starting/stopping the service. Another thing that could be wrong is that MySQL didn’t setup the PATH environment variable. In Command Prompt, try going to: C:Program FilesMySQLMySQL Server 5.0bin and running all the commands from there. 3.4 Starting & Stopping You can start/stop the server from command prompt (a.k.a. The DOS Box) by typing: net start mysql Or net stop mysql 4 PHP PHP is PHP Hypertext Processor, which you can download from: http://www.php.net/ For this tutorial, we will use PHP 5. Installing previous versions is very similar. 4.1 Basic Installation Installation of PHP 5 under Windows involves unzipping: php-5.0.4-Win32.zip Into some nice convenient place, like: C:php Inside the c:php directory, you will find install.txt file, that describes exactly, step by step, what you need to do to properly install and configure PHP with any number of servers. For this tutorial, we are using Apache2 (installed in Section 2), and MySQL5 (installed in Section 3). 5
  • 6. 4.2 Basic Testing 4 PHP 4.1.1 php.ini In the C:php directory, make a copy of php.ini-dist, and name the copy php.ini. Open php.ini in your favorite text editor2 . You need to set doc_root to Apache’s htdocs directory. In other words: doc_root = "C:Apache2htdocs" You need to set extension_dir to: extension_dir = "C:phpext" You’ll also need to setup session support. You need to create directory: C:Tempphp_session And then you need to look for session.save_path line, and set it to: session.save_path = "C:Tempphp_session" 4.1.2 httpd.conf We also need to configure Apache2 to work with PHP. This involves editing: C:Apache2confhttpd.conf At the end of the “Loading Modules” section, you need to add: # For PHP 5 do something like this: LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php # configure the path to php.ini PHPIniDir "C:/php" 4.2 Basic Testing PHP and Apache should now be configured. You should restart Apache, at Command Prompt run: net stop apache2 net start apache2 If everything goes ok, open your web browser to: http://localhost/asdf 2 If you don’t have a favorite editor, just open it in Notepad. 6
  • 7. 4.3 Configuration 4 PHP This should give you an Apache error message, but it should also give you the server signa- ture, which should include PHP. Ie: Apache/2.0.54 (Win32) PHP/5.0.4 Server at localhost Port 80 A more involved test requires you to write a simple PHP script. Take the following and place it in: C:Apache2htdocsphpinfo.php The contents of the script is just one line: <?php phpinfo(); ?> Now, going to: http://localhost/phpinfo.php should provide a much better view of what you just installed. 4.3 Configuration Yes, we’re not done with configuration just yet. We need to ensure MySQL module (and library) are properly setup and running. For this, we need to update the php.ini file again. You’ll need to find the line: ;extension=php_mysql.dll and change it to: extension=php_mysql.dll In other words, remove the ; character that comments out that line. Also, now that we installed MySQL 5, we don’t need the MySQL client library that PHP ships with (which I think is “Client API version: 4.1.7”—we have MySQL5, might as well use the proper client libraries). Stop Apache2, and erase file: C:phplibmysql.dll And start Apache2 once again. Once done, if you go to that phpinfo.php page, under MySQL, it should display: Client API version: 5.0.6-beta (or the version of MySQL that you installed. The reason the above works is because when we installed MySQL, we put its bin directory into the PATH. Without that, those MySQL libraries would not be found. If having problems getting this to work, you can try moving the: C:Program FilesMySQLMySQL Server 5.0binlibmySQL.dll To some place like: C:WindowsSystem32 Do not do this unless you’re having problems starting Apache. 7
  • 8. 5 PERL 5 Perl Perl is a Scripting Language, which you can download from: http://www.activeperl.com/ For this tutorial, we will use ActivePerl 5.8.7.813, but the procedures are the similar (or exactly the same) as previous versions. ActivePerl is a pretty good Windows version of Perl. Since Perl is open source, there are many distributions. ActivePerl is a Microsoft sponsored port of the generally UNIX Perl version to Windows. 5.1 Installation Installation of Perl under Windows involves double clicking on the: ActivePerl-5.8.7.813-MSWin32-x86-148120.msi The version you have may be different, but the process is the same. Follow the screens and accept all defaults. 5.2 Testing You can test Perl by opening the Command Prompt, and typing: C:>echo print qq{Hello World $_n} for(1..5) |perl Which should display something like: C:>echo print qq{Hello World $_n} for(1..5) |perl Hello World 1 Hello World 2 Hello World 3 Hello World 4 Hello World 5 Or you could just type: C:>perl --version But that’s not as fun :-) 8
  • 9. 6 TESTING EVERYTHING 6 Testing Everything You can test everything (well, except Perl) by simply using a simple MySQL example from the PHP documentation: http://us3.php.net/manual/en/ref.mysql.php The modified example should be saved in file: C:Apache2htdocsglah.php This particular example, will display the contents of the glah table created in Section 3.2. The code follows: <?php // Connecting, selecting database $link = mysql_connect(’localhost’, ’blah’, ’12345’) or die(’Could not connect: ’ . mysql_error()); echo ’Connected successfully’; mysql_select_db(’blah’) or die(’Could not select database’); // Performing SQL query $query = ’SELECT * FROM glah’; $result = mysql_query($query) or die(’Query failed: ’ . mysql_error()); // Printing results in HTML echo "<table>n"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "t<tr>n"; foreach ($line as $col_value) { echo "tt<td>$col_value</td>n"; } echo "t</tr>n"; } echo "</table>n"; // Free resultset mysql_free_result($result); // Closing connection mysql_close($link); ?> After saving the above in glah.php file, you can see it work by going to: 9
  • 10. 7 CONCLUSION http://localhost/glah.php The page displays: Connected successfully 1 meh 2 beh This is exactly what’s in those tables :-) 7 Conclusion If everything in these pages worked, then you’re ready to move onto the next round. Other- wise, I suggest re-installing things until things start to work. Everything in these pages was tested as I write this (on a fresh install); so things should work if you follow the exact steps. Good luck. If things still don’t work, you can try installing: http://sourceforge.net/projects/quickeasyphp/ This is an all-in-one installer for Apache/PHP/MySQL. This may seems like a quick time- saver, but I still highly recommend that you install things separately. 10