Beruflich Dokumente
Kultur Dokumente
Page 1
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Search for the following msi( windows installer) apache_2.2.4-win32-x86-no_ssl.msi
Page 2
11/6/2008
Step 3: Accept the License agreement and click the next button
Page 3
11/6/2008
Step 4: Provide the Server information details in the window. Domain Name : i3v.COM Server Name : The computer name Administrators Email id: Provide administrator email id. (If any error or problem in application you will get the information asking the user to contact the administrator For Ex: Please contact usha.kannappan@gmail.com
Page 4
11/6/2008
Step 6: On the following screen you will see the default path of Apache to installs. Click the "Change..." , and choose the D:\ProgramFiles folder (or whatever other name you chose) you made when you created the directory structure above. Click "Next". Created by: Usha Kannappan Page 5 11/6/2008
Step 7: Continuation
Step 8: Create a folder Apache Software Foundation\Apache2.2.The directory structure is like this: D:\ProgramFiles\Apache Software Foundation\Apache2.2\
Page 6
11/6/2008
Step 9: Click the install button and proceed further for installation.
Step 10: You can see the status of Installation status in the Installation wizard. Created by: Usha Kannappan Page 7 11/6/2008
Step 11: Once the installation has been completed, you will be getting the following window. Click finish. Congratulation, apache 2.2.4 installation has been successfully finished.
Step 12:
Page 8
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Let's make sure it worked. Go to your programs folder in the Start menu and find the Apache HTTP Server folder. Go to the Control Apache Server folder, and start Apache
If you installed Apache as a service, you can also start it by double-clicking on the Apache Service Monitor tray icon (which looks like: ) and pressing the "Start" button in the window that appears. If you did not install it as a service, you will see a blank command prompt window appear while Apache is running. This is normal. The first time you run Apache, you will probably see a security warning pop up:
Page 9
11/6/2008
This is because windows has detected that Apache is opening a port on your computer, and it is checking with you about whether it should let Apache continue. Click the "Unblock" button to allow Apache to function. Now, let's open up a web browser and make sure Apache is running. Type in the name of your server (e.g. local host, or your domain name or IP address) in the location bar of the browser. http://localhost/ or http://localhost:8080/
Page 10
11/6/2008
If so, you're ready to move on. If not, something is wrong. It is hard to be sure what, but it might help to ask for assistance in the ERT forum. Otherwise, your best bet is to uninstall Apache and try again. Before proceeding to forum, check whether the following fields are having correct data and also these are the lines where user can modify. Listen 80 Port 80 ServerType standalone ServerName i3v.COM:80 ServerAdmin Usha.Kannappan@gmail.com
The PHP documentation is very good; I encourage you to read it over a bit before proceeding, or if you get stuck/confused below. It may seem easier to use the installer, but as you work with PHP, you will probably want to enable several extensions that are not enabled by default, and this is much simpler if you have installed PHP manually. Created by: Usha Kannappan Page 11 11/6/2008
After the zip file downloads, place it in your D:\ProgramFiles directory, and unzip it there. When it is done decompressing all the files, you can delete the zip file. Now your PHP is in D:\ProgramFiles\php-5.2.4-Win32 For PHP to work with Apache and to make the CLI available from any command prompt window, we need to add the PHP folder to the PATH environment variable. To do this, right click on your "My Computer" icon (either on your desktop or the start menu) and select "Properties." In the window that pops up, select the advanced tab, and click on the "Environment Variables" button.
Page 12
11/6/2008
In the window that appears, select the "Path" variable line from the "System Variables" menu, and click edit:
Page 13
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) At the end of the "Variable Value" field, type a semicolon (;) and the type in the full path to your PHP folder. For me, this means typing the following at the end of the "Variable Value" field: ; D:\ProgramFiles\php-5.2.4-Win32
Hit OK in each window until they have all closed, and restart your computer. Pick up back here when you've restarted. OK, you restarted and you're back. Let's make sure PHP is working. Go to Start->Run and type cmd and press OK to bring up a command window. At the command prompt, type php -v and press Enter. If you updated the PATH varaible correctly, you should see something like:
Page 14
11/6/2008
If you get an error message like, "php is not recognized as an internal or external command, operable program or batch file" go back and check to make sure you completed all the steps of adding your PHP folder to your PATH variable, and that you typed the file path correctly. Now open you PHP folder, and change the name of the file php.ini-recommended to php.ini. The settings in this file are all pretty much exactly as they should be. If you are installing Apache and PHP on your own system for testing purposes, it is probably a good idea to open your php.ini file in a text editor, and change the setting on or about line 357 from display_errors = Off to display_errors = On so that you will see any errors generated by your scripts and will be able to easily debug them. If you are planning on making your server public, it is best to leave this setting Off, because displaying errors can expose information about your file system, databases, and server configuration that should be kept private. Either way, the setting on line 367, log_errors = On will ensure that you will have a log of errors that you can review. Make the following changes to the file: doc_root =D:\ProgramFiles\Apache Software Foundation\Apache2.2\htdocs extension_dir = "D:\ProgramFiles\php-5.2.4-Win32\ext" Save the php.ini file and close it. You can find more information about configuring PHP in the Runtime Configuration section of the PHP manual.
4. Configuring Apache
Now that we've got PHP and Apache working separately, we need to get them to work together. Go to your Apache2.2/conf folder, and open up the httpd.conf file in a text editor. You can get Apache to run PHP as either a CGI binary, or an Apache Module. Generally speaking, it is faster and more secure to do the latter, which you do by adding the following to your httpd.conf file: 1. At the top of the LoadModule section, starting around line 130, adds the line LoadModule php5_module "D:/ProgramFiles/php-5.2.4Win32/php5apache2_2.dll" Created by: Usha Kannappan Page 15 11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) (Note those are forward slashes, not backslashes, in the path) where you replace "D:/ProgramFiles/php-5.2.4-Win32/php5apache2.dll" with the path to php5apache2.dll on your computer. You can actually add settings anywhere you would like, but putting the similar ones together helps keep things organized.
2. In the AddType section around line 754, add the following line: AddType application/x-httpd-php .php You can add other extensions besides .php if you want PHP to parse other file types as well. For example, if you want to be able to include PHP in .html documents: I recommend everyone to add the following line in their httpd file. AddType application/x-httpd-php .php .html .phtml .pwml .php3 .php4 .inc
3. In Testlink application, we are going to open an index.php file not index.html. So add the following line, so that when you click the Testlink folder, it will automatically point to the index.php.
Page 16
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) DirectoryIndex index.html index.shtml index.wml index.pwml index.php index.php3 index.php4
4. Finally, add the following line, somewhere that seems sensible to you: PHPIniDir "D:/ProgramFiles/php-5.2.4-Win32/" (Again, replace the path I used with the one you chose on your computer). Note: If Apache does not seem to recognize your PHPIniDir directive, make sure you have the trailing slash (i.e. not PHPIniDir "PHPIniDir D:/ProgramFiles/php-5.2.4-Win32/"), as mentioned in the user comments in the PHP manual Save the httpd.conf file, and start Apache as discussed above (or restart it if it is running). Open your Apache2.2htdocs folder. This is the root folder for all of your web server documents that you will view in your web browser. Start by erasing all the default files currently in there. Next, make a file called phpinfo.php that contains the following: <?php phpinfo(); ?> and save it in your htdocs folder. Now open a web browser and go to http://localhost/phpinfo.php. You should see a page that looks like
If not, make sure that all the lines that you added to your httpd.conf file are exactly as they appear above (including the trailing slashes where applicable), and that all paths are correct. Created by: Usha Kannappan Page 17 11/6/2008
Make a MySQL folder in your ProgramFiles directory. Run Setup.exe. Click "Next" at the first screen.
Page 18
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Step 1: Double click the mysql-essential-5.0.45-win32.msi. It will start the windows installer.
Page 19
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Step 3: Choose custom radio button then choose the directory where you want to download the mysql. (D:\ProgramFiles\MySQL5.0). After choosing the directories click back and choose custom. Click next and proceed for installation
Page 20
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Step 5: You can see the installation process in the next window.
Page 21
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Step 7: Click finish Now you finished installation but you need to configure mysql.
Step 8: MySQL Configuration file wizard will open after your setup wizard. Click Next to proceed
Page 22
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Step 9: Select Detailed Configuration and click Next button.
Step 10: Next you will be getting a server type wizard. Choose Developer machine then click Next button.
Page 23
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Step 11: Choose Multifunctional Database and click Next
Page 24
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Step 13: Click if the no. of concurrent connection is less than 20 then go for Decision support (DSS)/OLAP. If the no. of concurrent connection is 500 at a time (load is heavy) then go for Online Transaction Processing (OLTP) If the no. of concurrent connection is neither 20 or else not heavy like 500 then go for manual testing. In this documentation, I had chosen Decision support (DSS)/OLAP.
Step 14: Now you have to set the network port. By default MySQL you will be having 3306 port, if in your machine some other Database server is using 3306 port then go for different PORT(3307, 3308,3309). In this documentation, I am using 3308.
Page 25
11/6/2008
Page 26
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Step 16: Now you will be getting Windows option window, where you can set the name for mysql service (By default MySQL). Click next to proceed.
Note that you can use the Apache Service monitor to start and stop MySQL (and other services). On the next screen, pick a root password. This is the main "superuser" password for your server: I gave root as the password. Now your mysql is having the following information UserName : root Password : root Port : 3308
Page 27
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Step: 17: Continuation
Step 18: Finally, click the "Execute" button to configure your MySQL server:
Page 28
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Its not a big deal if you do not configure your server right at first, you can always run the config wizard again later. It is in your MySQLbin folder, MySQLInstanceConfig.exe. If MySQL has been successfully installed, you will get mysql directory in Start Menu programs.
In order to verify whether MySQL is working fine or not. Click the MySQL Command Line Client in the Start Menu program Enter the password of MYSQL (Password is root), you will getting details of MYSQL.
Page 29
11/6/2008
1. Restart (this is so your PATH variable gets updated). 2. Uncomment the line extension=php_mysql.dll (around line 650) in your php.ini and (re)start Apache. [php.ini is in D:\ProgramFiles\php-5.2.4Win32\php.ini] 3. Copy libmysql.dll from D:\ProgramFiles\php-5.2.4-Win32\ext and paste it in C:\WINDOWS\system32 4. Have a look at your phpinfo.php file. If you sucessfully set up MySQL, it should have a section that looks like this:
Page 30
11/6/2008
That's all. Remember to use MySQL with PHP, it has to be running, and you need to create users, tables etc. for PHP to work with. Once MySQL is running, you can access it via the command line by typing mysql -u root -p and entering your root password (which you set during the MySQL installation) when prompted. You can also access the mysqladmin command this way to add other users to your databases (there is also a command line connection option in the MySQL section of your program list in the Start menu). Note: Some time, you cannot able to include mysql in PHP , the problem will be either the php_mysql.dll is a corrupted one. Try to download php_mysql.dll for php-5.2.4-Win32 or else delete all php_mysql.dll from your system completely except from the following location D:/ProgramFiles/php-5.2.4-Win32/ext.
Download Testlink :
Page 31
11/6/2008
Unzip and paste the testlink in root directory(ie. Paste the Testlilnk in D:\ProgramFiles\ Apache Software Foundation\Apache2.2\htdocs\Testlink) Now open any browser (ex: Internet explorer , mozilla firefox) and type the following to access Testlink http://localhost/Testlink/ http://ipaddress/Testlink/
Page 32
11/6/2008
Enter all the required information in the field. Especially Database username and password(root, admin) and enter the Database name. The testlink will create a database in mysql for the testlink and give connection to the testlilnk.
Page 33
11/6/2008
Page 34
11/6/2008
Page 35
11/6/2008
Page 36
11/6/2008
Page 37
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Congratulation!!!! Testlink has been successfully installed and now you can start exploring the Testlink in your application.
Additional Information:
Some user they are little difficult in using mysql in command prompt. For those user, Sqlyog is a very good tool. SQL yog is nothing but an editor for Mysql. The following is the way to install and start using sql yog.
Page 38
11/6/2008
Step 1: Double click the SQLyog40.exe which will start the installer. Click Next to proceed.
Page 39
11/6/2008
Step 3:
Page 40
11/6/2008
Testlink-Installation Instruction (Configuring Apache, MySQL and PHP) Choose the location to install the sqlyog. As per the document, I installed the sqlyog in D:\ProgramFiles\ and create a folder SQLYOG then click install.
Step 5: After the installation has been completed, you can see the sqlyog shortcut in desktop and also in start menu. Click the sqylog. Now you will be getting the following screen. Click ok and proceed to make connection to the database. Created by: Usha Kannappan Page 41 11/6/2008
Step 6: Click New button and give some name for Server Connections. The second step is give the host address value (i.e) If you are planning to open the sqlyog in the installed server machine, then you can give localhost. Suppose if you want to connect to the server machine then give the IPaddress of the server machine. UserName is root(default value). Password is the value which you gave while installing the mysql. In this document , we gave root and mysql port is 3306.
Page 42
11/6/2008
Now the user can able to view the testlink database and the tables present in the Database. 2 . Common Errors and how to avoid it: 1. Sometimes you will be getting an error message, Fatal error, your maximum execution time of 30 seconds exceeded the limit. In that case check you have to modify your php.ini file which is located in the following location. D:/ProgramFiles/php-5.2.4-Win32/php.ini. Search for max_execution time=30 seconds
Page 43
11/6/2008