Win2000+apache+mysql+php4+perl Installation Use summary _php tutorial

Source: Internet
Author: User
Tags perl interpreter
Windows 2000+apache+mysql+php3+php4+perl Installation Usage Summary
Www. 1000script.com 2002-9-3 1000script Pro Script
Windows 2000+apache+mysql+php3+php4+perl Installation Usage summary (i)
There must be a lot of friends here who like to try new things as I do, especially when they hear
A new version of a software must also be eager to download a copy to use again.
Here I would like to discuss with you the following popular software applications, intended to stimulate.

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 Fast Installation ★"

1. Run Apache_1_3_12_win32.exe, follow the prompts to install, the installation directory may be:
C:\apache
2. Modify the c:\apache\httpd.conf, remove the "#" number before the ServerName, behind
With the IP address of this machine
3. Run c:\apache\apache-i to install Apache as a service for Windows 2000
4. Run net start Apache to launch Apache
5. Rename C:\apache\htdocs\index.html.en to index.html, then
In the browser address bar, type: http://localhost

"★★★mysql Fast Installation ★"

1. Unzip the mysql-shareware-3.22.34-win.zip into a temporary directory,
Then run Setup.exe to start the installation, everything is installed with default values
2. Run C:\mysql\bin\mysqld-shareware--install
Installing MySQL as a service for Windows 2000
3. Run net start MySQL to start MySQL service

"★★★PHP3 Fast Installation ★"

1. Unzip the php-3.0.15-win32.zip into a directory, for example
C:\apache\php3
2. Copy the c:\apache\php3\php3.ini-dist to the C:\Winnt directory,
and changed its name to Php3.ini.
3. Modify the 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 run, create a file c:\apache\htdocs\info.php3,
The content is only one line:
  
Then enter it in the browser address bar: http://localhost/info.php3
5. In order to add support for MySQL, you need to edit the C:\winnt\php3.ini,
Locate the Extension_dir and change the line to:
Extension_dir = "C:\apache\php3\"
Find it again.
; Extension=php3_mysql.dll
Remove the preceding semicolon to

"★★★PHP4 Fast Installation ★"

1. Unzip the php-4.0.0-win32.zip into a directory, for example
c:\apache\php
2. Copy the c:\apache\php\php.ini-dist to the C:\Winnt directory,
and changed its name to PHP.ini.
3. Copy the C:\apache\php\php4ts.dll to the C:\Winnt\System32 directory
4. Modify the 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 run, create a file c:\apache\htdocs\info.php,
The content is only one line:
  
Then enter it in the browser address bar: http://localhost/info.php
PHP4 built-in support for MySQL, no additional setup required

"★★★zend Optimizer for PHP4 Quick Install ★"

1. Unzip 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 the info.php in the browser, you can see a number of such a 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 can be 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 be able to identify the *.CGI program, add it in srm.conf:
AddHandler Cgi-script. CGI
This allows the local Perl CGI program to be fully consistent with the UNIX host.
In order for Apache to be able to handle the server Side include, add in srm.conf:
AddType text/html. shtml
AddHandler server-parsed. shtml
This allows the CGI program to run in an SSI way.
5. In order for the above changes to take effect, you will need to restart Apache (net stop Apache, net start
Apache


Follow the steps above, and you'll have it without error.
Apache+mysql+php3+php4+perl's operating Environment! In fact
The above method is as feasible in WinDOS nt4.0+sp3+.

"☆☆☆apache Outline ☆☆☆"

The default installation directory for Apache is C:\Program Files\apache Group\apache,
But for the sake of convenience, it may be necessary to install it into the C:\apache directory. Configuration file is
C:\apache\conf\httpd.conf, it is usually necessary to modify at least servername this
One, the annotation symbol "#" is removed, the simplest is the following IP address, for WINS
LAN users can use the machine name, for the network users with DNS can use the domain name. In
ServerName is not set under Windows 2000 this will cause Apache to not start.
Another effect is when you use alias in the following ways:
Alias/userdir "c:/userdir/"
If this is called:
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 httpd.conf or srm.conf.
All configuration items are placed in httpd.conf, which only requires modification of the maintenance
Configuration files are convenient and avoid conflicts (this is what the srm.conf file says!). )。
But httpd.conf is really big, and 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 very small, easy to see the changes, I prefer the latter.
In httpd.conf, other commonly used settings for Apache that may need to be modified are:
ServerAdmin your@email.address #管理员的e-mail Address

DocumentRoot "C:/apache/htdocs" #默认的根路径
Note that the paths are all delimited by slashes instead of 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 #目录访问的配置文件名
The Explorer will find it impossible to rename a file to ". htaccess", but
In the command line mode, you can save the file name with Notepad.

"☆☆☆mysql Outline ☆☆☆"
MySQL's default installation directory is C:\mysql, after the installation is complete without any hint that the installation is over, please click the Finish button and so on, just quit. If you need to install to a different directory, it is recommended to install to C:\mysql, and then the entire directory move to where you want, for example, after moving to D:\mysql, you need to edit d:\mysql\my-example.cnf (*.cnf files in the Windows 2000 will be registered as a SpeedDial file, in the Explorer can not operate, to use the command line to start Notepad editing, such as running NOTEPADD:\MYSQL\MY-EXAMPLE.CNF, but this file is a UNIX system text file format, You cannot wrap the line correctly in Notepad, you can open the edit with write,
Or you can use write to save it once, and then use Notepad to edit it. Find Basedir Line, remove the previous "#" comment, change the following path to the moved directory (the directory delimiter to use a slash instead of a backslash), and then save as: c:\my.cnf
Service-initiated MySQL if you stop with net stop MySQL, you get an error message, for example:
C:\>net stop MySQL
The MYSQL service is stopping.
System error.
The system has a 1067 error.
The process terminated unexpectedly.
The MYSQL service has stopped successfully.
It doesn't matter, and MySQL really has 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 prompt, MySQL has stopped successfully.
It is important to note that MySQL is a simple and easy-to-use installation, but it is a SQL-based database management system, so if you are not very proficient with SQL, I'm afraid I can't do anything about it. There are many tools on the web that manage MySQL, such as PHP3-based Phpmyadmin,map, Windows-based mysqlwinadmin,myadmin, and so on. Since PHP3 and PHP4 have a lot of incompatibilities with MySQL functionality, I recommend installing both PHP3 and PHP4 in Apache. These two small programs can be downloaded here:
http://www.nease.net/~yzwang/php/
are only dozens of K, and the phpMyAdmin contains hints for Simplified Chinese, unzip the phpmyadmin_2.0.5.zip with the directory name to the C:\apache\htdocs directory, or the other directory where alias is set, and then edit the file: \ C Apache\htdocs\phpmyadmin\config.inc.php3 found in the inside:
Require ("english.inc.php3");
One line, replace it with: require ("chinese_gb.inc.php3");
and then save. One more thing to do before you start it is to edit C:\winnt\php3.ini,
Find the Include_path line inside and change 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 above mentioned two sections to be modified:
include_path = "C:\apache\htdocs\phpmyadmin;c:\apache\htdocs"


If you use include or require in PHP3, the files you want to include must be
One of the paths set by Include_path is good, but it 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 Php3.ini is case-sensitive! However, the path name capitalization of Windows does not matter.

"☆☆☆php4 Outline ☆☆☆"

PHP4 and PHP3 A lot of differences, the size of php.ini is much larger than the php3.ini almost one times.
The item you want to modify is the same as the two items in Php3.ini, Include_path and Extension_dir.


However, due to the built-in MySQL support, if only with MySQL, then even Extension_dir
Without modification, keep the default values. PHP4 offers a choice of two php.ini versions available:
Php.ini-dist
Php.ini-optimized
If you use Php.ini-dist, then there's nothing wrong with using it. But there may be
Discourage like me, with php.ini-optimized, you will encounter major problems.
As you know, PHP is very convenient for processing forms, for forms that use the Post method,
PHP automatically generates variables of the same name based on the name of the form, and almost all PHP programs are
This uses auto-generated form variables, however if you copy the php.ini-optimized
To the C:\Winnt directory and renamed to PHP.ini, there will be no automatic form variable generation!
Take a closer look at php.ini-optimized, there's this:
Register_globals = OFF; Whether or not to register the EGP

CS variables as Global
; Variables. 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

_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 others, it is recommended to change to:
Register_globals = On

In fact, my experience with PHP is not much, but I still notice the following issues:
1. You can use include when you need to include another file, or you can use require.
However, a path setting is required 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 get the file name of this file, many people use $PHP _self, but I think
Getenv ("Path_info");
Better. The scenarios used for example:
">
3. To read into the entire file, simply use:
$contents =file ("filename");
Yes, $contents becomes 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 is important to note 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 PHP4.0.0 for WIN32 above.
"☆☆☆active Perl Summary Description ☆☆☆"
Active State ActivePerl 5.6 is currently the most popular version of the Perl interpreter, do not understand why 8174K so big? Almost the size of Apache and MySQL added up. But this is the full version of Perl, which contains the various modules with PERL5. It is recommended to install to the C:\USR directory, because Perl CGI programs can be used with the same shabang as in Unix:
#!/usr/bin/perl
Of course, it can also be used in Windows format:
#!c:\usr\bin\perl.exe
In this way, debugging a good Perl program on your own machine without modification can be uploaded to Unix host to use, a lot of convenience. Programming questions about Perl are beyond the scope of this article.
The purpose of this article is to exchange ideas with friends from all over the world. Also hope that you use PHP and its related environment in the experience of writing to share with netizens, and common progress.



Original Author: 1000script
Source: 1000script.com

http://www.bkjia.com/PHPjc/314828.html www.bkjia.com true http://www.bkjia.com/PHPjc/314828.html techarticle Windows 2000+apache+mysql+php3+php4+perl installation uses a summary www. 1000script.com 2002-9-3 1000script Professional script Windows 2000+apache+mysql+php3+php4+perl installation use summary (a) this ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.