Windows 2000+apache+mysql+php3+php4+perl Installation Usage Summary
Www. 1000script.com 2002-9-3 1000script Professional Script
Windows 2000+apache+mysql+php3+php4+perl Installation Usage summary (i)
There must be a lot of friends like me who want to try something new, especially when they hear
So-and-So software has a new version must also be eager to download a copy back for use.
Here I would like to discuss with you the following popular software applications, intended to introduce.
Os:microsoft Windows Professional Simplified Chinese version
WEB Server:apache 1.3.12 for WIN32
Mysql:mysql Shareware 3.22.34 for WIN32
php3:php 3.0.15 for WIN32
php4:php 4.0.0 for WIN32
Zend:zend Optimizer beta4 for PHP 4.0.0 for WIN32
"★★★apache Quick Install ★★★"
1. Run Apache_1_3_12_win32.exe, follow the prompts to install, installation directory may be as follows:
C:\apache
2. Modify the c:\apache\httpd.conf, remove the "#" before the ServerName, behind
IP address with this computer
3. Run c:\apache\apache-i to install Apache as a service for Windows 2000
4. Run net start Apache start Apache
5. Rename C:\apache\htdocs\index.html.en to index.html, then
In the browser address bar, enter:http://localhost
"★★★mysql Quick Install ★★★"
1. Extract the Mysql-shareware-3.22.34-win.zip into a temporary directory,
Then run Setup.exe to start the installation, all with the default values installed can
2. Run C:\mysql\bin\mysqld-shareware--install
Install MySQL as a service in Windows 2000
3. Run net start MySQL start MySQL service
"★★★php3 Quick Install ★★★"
1. Extract the php-3.0.15-win32.zip into a directory, such as
C:\apache\php3
2. Copy the c:\apache\php3\php3.ini-dist to the C:\Winnt directory,
and changed it to Php3.ini.
3. Modify c:\apache\conf\srm.conf and add the following lines:
scriptalias/php3/"c:/apache/php3/"
AddType application/x-httpd-php3. php3
Action application/x-httpd-php3 "/php3/php.exe"
4. Restart Apache (net stop Apache, net start Apache)
PHP3 can be run, create a file c:\apache\htdocs\info.php3,
Only one line of content:
Then in the browser address bar, enter:http://localhost/info.php3
5. To add support for MySQL, you need to edit C:\winnt\php3.ini,
Locate the Extension_dir and change the line to:
Extension_dir = "C:\apache\php3\"
and find
; Extension=php3_mysql.dll
Remove the semicolon before you can
"★★★php4 Quick Install ★★★"
1. Extract the php-4.0.0-win32.zip into a directory, such as
c:\apache\php
2. Copy the c:\apache\php\php.ini-dist to the C:\Winnt directory,
and changed it to PHP.ini.
3. Copy the C:\apache\php\php4ts.dll to the C:\Winnt\System32 directory
4. Modify c:\apache\conf\srm.conf and add the following lines:
scriptalias/php/"c:/apache/php/"
AddType application/x-httpd-php. php
Action application/x-httpd-php "/php/php.exe"
5. Restart Apache (net stop Apache, net start Apache)
PHP4 can be run, create a file c:\apache\htdocs\info.php,
Only one line of content:
Then in the browser address bar, enter:http://localhost/info.php
PHP4 built-in MySQL support, no additional setup required
"★★★zend Optimizer for PHP4 quick Install ★★★"
1. Extract the zendoptimizer-beta4-windowsnt.zip into a directory,
such as C:\apache\zend
2. Modify the C:\winnt\php.ini and add the following two lines anywhere:
Zend_optimizer.optimization_level=7
Zend_extension_ts= "C:\apache\zend\ZendOptimizer.dll"
3. Refresh info.php in the browser, you can see more of this line:
With Zend Optimizer v0.98, Copyright (c) 1998-2000, by Zend Techno
Logies
"★★★active perl Quick Install ★★★"
1. Mouse Double-click Activeperl-5.6.0.613.msi Run, this is a Windows
Installer packge Format installation package, under Windows 2000, you can directly
Run, follow the prompts to install, the default installation path is C:\perl, it may be changed to
C:\usr
2. Modify c:\apache\srm.conf and add the following line:
AddHandler cgi-script. pl
3. In the first line of the Perl program, add:
#!/usr/bin/perl
4. In order for Apache to also be able to identify the *.CGI program, add in the srm.conf:
AddHandler Cgi-script. CGI
This allows local Perl CGI programs to be fully aligned with UNIX hosts.
In order for Apache to be able to handle server Side include, add in srm.conf:
AddType text/html. shtml
AddHandler server-parsed. shtml
So the CGI program can operate in SSI mode.
5. In order for the above modifications to take effect, you need to restart Apache (net stop Apache, net start
Apache
Just follow the steps above, and you'll have it without making a mistake.
Apache+mysql+php3+php4+perl's operating Environment! In fact
The above methods are as feasible in WinDOS nt4.0+sp3+.
"☆☆☆apache Outline ☆☆☆"
The default installation directory for Apache is C:\Program Files\apache Group\apache,
For convenience, however, it may be installed in the C:\apache directory. Configuration file is
C:\apache\conf\httpd.conf, it is usually at least necessary to modify the ServerName this
One, the annotation symbol "#" removed, the simplest is followed by the IP address, for WINS
LAN users can use the machine name, for DNS network users can use the domain name. In
Not setting servername under Windows 2000 will cause Apache to not start.
Another effect is when you use the alias in the following way:
Alias/userdir "c:/userdir/"
If you call this:
http://localhost/userdir/
does not cause any problems, but if this is called:
Http://localhost/userdir
Then localhost will be replaced with the value specified by servername If this value cannot be
is parsed correctly and cannot be accessed.
The user's configuration item can be added in either httpd.conf or srm.conf, and one says it will
All of the configuration items are placed in httpd.conf so that you only need to modify the maintenance of this
The configuration file is convenient and avoids conflicts (this is what srm.conf file says!). )。
But httpd.conf is really too big, it's not easy to search for specific items inside.
It is also said that all the users to add their own modified configuration items are placed in the srm.conf,
This document is small and easy to see and revise, I prefer the latter.
In httpd.conf, other commonly used settings for Apache that might need to be modified are:
ServerAdminyour@email.addrESS #E-mail Address of the administrator
DocumentRoot "C: / apache / htdocs" #default root path
Note that the paths are all delimited by slashes rather than backslashes.
DirectoryIndex index.html index.php index.php3 index.htm index.shtml
This item indicates the default document and its order in each directory
Accessfilename.htaccess #Configuration file name for directory access
Using Resource Manager, you will find that you cannot rename a file to ". htaccess", but
You can save it as a file name in Notepad or in the command line.
"☆☆☆mysql Outline ☆☆☆"
MySQL's default installation directory is C:\mysql, after the installation of the end without any hint that the installation is over, please click the Finish button and so on, directly out of the. If you need to install to a different directory, it is recommended that you first install to C:\mysql, and then move the entire directory to where you want, for example, after moving to D:\mysql, you need to edit d:\mysql\my-example.cnf (*.cnf files in Windows 2000 will be registered as a SpeedDial file, unable to operate in the explorer, to start Notepad editing with the command line, such as running NOTEPADD:\MYSQL\MY-EXAMPLE.CNF, but this file is a text file format under the UNIX system. In Notepad, you can't wrap the line correctly, you can open the edit with write,
or save it once with write open, then use Notepad to edit it. Locate the Basedir row, remove the previous "#" comment, change the following path to the moved directory (the directory delimiter should be slash instead of backslash), and save as: c:\my.cnf
MySQL started with service if you stop with net stop MySQL, you get an error message, such as:
C:\>net stop MySQL
The MYSQL service is stopping.
System error.
The system has 1067 errors.
The process terminated unexpectedly.
The MYSQL service has stopped successfully.
It doesn't matter, MySQL has really stopped. But if you don't want to see any error messages,
, you can use the following command to stop:
C:\>mysql\bin\mysqladmin-u Root shutdown
If there is no hint, MySQL has successfully stopped.
What needs to be said is that MySQL, although known as simple installation, easy to use, but this is based on SQL database management system, so if not very proficient in SQL, I am afraid I can not take it to do anything. There are many tools for managing MySQL on the web, such as PHP3 based Phpmyadmin,map, Windows based mysqlwinadmin,myadmin, and so on. Because of the PHP3 and PHP4 MySQL features are a lot of incompatibilities, so I suggest in Apache to install both PHP3 and PHP4. These two small programs can be downloaded here:
http://www.nease.net/~yzwang/php/
are only dozens of K, and phpMyAdmin also contains tips for Simplified Chinese, phpmyadmin_2.0.5.zip the directory name to the C:\apache\htdocs directory, or other alias-setting directories, and then edit the file: C:\ Apache\htdocs\phpmyadmin\config.inc.php3 found in the inside:
Require ("english.inc.php3");
Line, replace it with: require ("chinese_gb.inc.php3");
and then save. One more thing to do before starting it is to edit C:\winnt\php3.ini,
Find the Include_path line inside and modify it to:
include_path = "C:\apache\htdocs\phpmyadmin"
After saving, enter in the browser address bar:
http://localhost/phpmyadmin/index.php3
Do you see it? It says--〉 "Welcome to use phpMyAdmin 2.0.5"!
"☆☆☆php3 Outline ☆☆☆"
PHP3 there seems to be nothing else that needs special settings, the only file that needs to be modified is php3.in.
I
The two parts to be modified are mentioned above:
include_path = "C:\apache\htdocs\phpmyadmin;c:\apache\htdocs"
Where include or require is used in the PHP3, the file to be included must be
One of the paths set by the include_path, which will take effect immediately after modifying the Php3.ini,
You do not need to restart Apache.
Extension_dir = "C:\Program files\apache\php3\"
This is also required, otherwise the extension module cannot be loaded.
The content in the Php3.ini is case-sensitive! However, there is no correlation between the case of Windows pathname.
"☆☆☆php4 Outline ☆☆☆"
PHP4 and PHP3 are quite different, the size of php.ini is almost one times larger than Php3.ini.
The item to be modified is the same as the two items in Php3.ini, Include_path and Extension_dir.
However, because of the built-in MySQL support, if only with MySQL, then even Extension_dir
Also do not have to modify, keep the default value. PHP4 offers a choice of two php.ini versions available:
Php.ini-dist
Php.ini-optimized
If you use Php.ini-dist, then there is no problem with using it. But there might be.
Embarrass like me, with the php.ini-optimized, then there will be major problems.
As you know, PHP is extremely handy for form processing, and for forms that use the Post method,
PHP automatically generates variables of the same name based on the form's name, and almost all PHP programs are
This uses automatically generated form variables, however, if the php.ini-optimized copy
To the C:\Winnt directory and renamed to php.ini words, there will be no automatic form variable generation!
Take a closer look at php.ini-optimized, there's this paragraph:
Register_globals = off; Whether or not to register the EGP
CS variables as Global
; Variables. You may want to turn t
He off if you don ' t want
; To clutter your scripts ' global SC
Ope with user data. This makes
; Most sense when coupled with track
_vars-in which case can
; Access all of the GPC variables th
Rough the $HTTP _*_vars[],
; Variables.
In order to be able to correctly run the PHP sample program written by other people, it is recommended to change to:
Register_globals = On
In fact, my experience with PHP is not much, but I still notice the following questions:
1. You can use include or require when you need to include another file.
However, it requires a path setting in the php.ini. If the purpose of containing the file is simply to
Display the output in the browser, you can use the
ReadFile ("filename");
The parameters can also be HTTP or FTP URLs.
2. To obtain the file name of this document, many people use $PHP _self, but I think with
Getenv ("Path_info");
Better. Scenarios used for example:
">
3. To read the entire file, simply use:
$contents =file ("filename");
On it, $contents will become an array variable, and each row of the file becomes
Each item in the $contents. Array subscript from 0 to count ($contents).
"☆☆☆zend Optimizer for PHP4 summary description ☆☆☆"
The software can also be downloaded from the following address, only 41K:
http://www.nease.net/~yzwang/php/
It should be noted that this version is
Zend Optimizer Beta4 for PHP4.0.0 for WindowsNT, the version number is 0.98.
Can only be used on this version of the PHP4.0.0 for WIN32.
"☆☆☆active Perl Overview ☆☆☆"
The Active state's ActivePerl 5.6 is the most popular and latest version of the Perl interpreter, do not understand why 8174K so large? Almost the size of Apache and MySQL combined. But this is a full version of Perl that contains PERL5 modules. It is recommended that you install to the C:\USR directory because Perl CGI programs can be used in the same shabang as under Unix:
#!/usr/bin/perl
Of course, you can also use the Windows format:
#!c:\usr\bin\perl.exe
In this way, the debugging of the Perl program on their own machine can be uploaded to the UNIX host to use without modification, a lot of convenience. Programming questions about Perl are not covered in this article.
This article aims to initiate and hope to communicate with friends all over the world. Also hope that we use PHP and its related environment in writing to share with netizens, and common progress.
Original Author: 1000script
Source: 1000script.com