Php&mysql Server Configuration Instructions _php Tutorial

Source: Internet
Author: User
Tags php mysql server port zend
Apache 1.3.22 for win32+php 4.0.6+active Perl 5.006001+zend Optimizer v1.1.0+mod_gzip 1.3.19.1a+mysql 4.0.0 Alpha
Apache 1.X for Win32 Although poor (and IIS far worse than, Hope 2. X for Win32 out early), but it has fewer bugs, less resource footprint, and its modular style is more convenient to add functionality. PHP-4 has the performance of fast, * * can be high efficiency features, Perl provides perl-cgi support, Zend Optimizer is accelerated PHP program, Mod_zip used to compress Web server output data, MySQL for the database. The following is a blueprint for WIN2K/XP, Win9x running these services software is too troublesome, no way to run as a service.

One
Download locations for each software:
apache:http://www.apache.org/dist/httpd/binaries/win32/
php:http://www.php.net/downloads.php (download. zip version)
Active Perl:http://www.activestate.com/products...l/download.plex (Download Win32)
Zend optimizer:http://www.zend.com/store/getfreefi...pid=13&zbid=198
mod_gzip:http://www.remotecommunications.com/apache/mod_gzip/(download. dll)
Mysql:http://www.mysql.com/downloads/index.html
Other software:
phpmyadmin:http://sourceforge.net/project/show...elease_id=44593 (for control operations on the database)

Two
Installation path (example below, can be installed casually, but preferably not installed on a path with a long name)
Apache:d:\apache
php:d:\php
Perl:d:\perl
Mysql:d:\mysql
Mod_gzip: Unzip in D:\apache\modules
Zend Optimizer: Decompression in d:\php
Site File Placement: D:\myweb
PhpMyAdmin: Unzip in D:\myweb\phpmyadmin
Windows:d:\windows

Third, configure MySQL
After installation will automatically run Winmysqladmin, and prompted to enter a user name password, enter a user name, password, by default, has been installed as NT service, if need more secure point, then winmysqladmin my.ini setup that page port= The port modifies the default port, and the user name password is modified below. After the modification, click Save Modiffication on the left, then right click on the console form and select Winnt->stop the Service->start the Service, so the new settings will take effect.

Iv. Configuration of PHP
Rename Php.ini-dist to php.ini and open the Modify.
Add in the next line of [PHP]
Zend_optimizer.optimization_level=15
Zend_extension_ts= "D:\php\ZendOptimizer.dll"
The path of the Zendoptimizer.dll must conform to

Then find Extension_dir, at the back = Add your windir\system32\ directory full name, for example: Extension_dir = d:\windows\system32\ (the last \ must not be omitted!) )
Find Extension=php_exif.dll, Extension=php_imap.dll, Extension=php_ldap.dll, Extension=php_zlib.dll, and remove the previous semicolon comment
Find Mysql.default_port, add your MySQL port after the equals sign, for example: Mysql.default_port = 3306 (3306 is the default port for MySQL)
Find Mysql.default_host, add localhost after the equals sign, for example: Mysql.default_host = localhost
Save
Copy the php.ini Php.exe to the Windows directory and copy all the. dll files under PHP Php4ts.dll, DLLs, and extensions directories to Windows\System32 (do not overwrite existing files)

V. Configuration of Apache
Open the apache\conf\httpd.conf file, and the following are the main settings
ServerType Standalone

ServerRoot "D:/apache"
# Apache installed directory

Pidfile Logs/httpd.pid
Scoreboardfile Logs/apache_runtime_status
Timeout 300
KeepAlive on
Maxkeepaliverequests 100
KeepAliveTimeout 15
Maxrequestsperchild 1024
Threadsperchild 50
Sendbuffersize 65536
MaxClients 150
Listen 80
# Listening on port 80, default Web server port
Bindaddress *
# Web server can be used on any IP

LoadModule Vhost_alias_module modules/mod_vhost_alias.so
Addmodule MOD_VHOST_ALIAS.C
# get rid of the previous # of these two lines, turn on the support of the virtual domain

Port 80
ServerAdmin Me@localhost
ServerName localhost
# port, admin email, server domain name, by actual modification

DocumentRoot "d:/myweb/"
# Web File Save address, here is d:/myweb as an example

Options FollowSymLinks MultiViews
AllowOverride All
Order Allow,deny
Allow from all

# Set access options for D:/myweb
Scriptalias/cgi-bin "e:/myweb/cgi"

AllowOverride None
Options None
Order Allow,deny
Allow from all

# Set Cgi-bin directory permissions

#!/perl/bin/perl
# This line configures PERL-CGI's running environment, because active Perl is installed in D:\perl, so the relative path is used directly
Note that the first line of CGI, PL files to run will be the same as here, otherwise it will not work. This can also be written
# #!d:/perl/bin/perl
# In addition this configuration of the first # does not mean the meaning of comments, so can not be omitted!!

Find DirectoryIndex index.html, add below
DirectoryIndex index.htm
DirectoryIndex default.htm
DirectoryIndex default.html
DirectoryIndex index.php
DirectoryIndex index.php3
DirectoryIndex index.cgi

Find AddType application/x-httpd-php
Modified to AddType application/x-httpd-php. php. phtml. php3

Find AddHandler Cgi-script
Modified to AddHandler cgi-script. CGI. pl

LoadModule Php4_module D:/php/sapi/php4apache.dll
LoadModule Gzip_module D:/apache/modules/apachemodulegzip.dll
# load Php4,gzip Module

# # # Below is the Gzip module setup
mod_gzip_on Yes
Mod_gzip_minimum_file_size 300
Mod_gzip_maximum_file_size 0
Mod_gzip_maximum_inmem_size 100000
Mod_gzip_keep_workfiles No
Mod_gzip_dechunk Yes
Mod_gzip_can_negotiate Yes
Mod_gzip_temp_dir d:/apache/temp
# There must be a temp directory under the Apache directory, no new
Mod_gzip_item_include file \.html$
Mod_gzip_item_include file \.htm$
Mod_gzip_item_include file \.shtml$
Mod_gzip_item_include file \.shtm$
Mod_gzip_item_include file \.pl$
Mod_gzip_item_include file \.cgi$
Mod_gzip_item_include MIME ^text/.*
Mod_gzip_item_include Handler ^perl-script$
Mod_gzip_item_include MIME ^httpd/unix-directory$
Mod_gzip_item_include Handler ^server-status$
Mod_gzip_item_include Handler ^server-info$
Mod_gzip_item_include MIME ^application/x-httpd-php
Mod_gzip_item_include file \.php$
Mod_gzip_item_include file \.php3$
Mod_gzip_item_include file \.mht$
Mod_gzip_item_exclude file \.css$
Mod_gzip_item_exclude file \.js$
Mod_gzip_item_exclude MIME ^image/.*
Mod_gzip_item_exclude Reqheader Content-type:multipart/form-data
Mod_gzip_item_exclude Reqheader content-type:application/x-www-form-urlencoded

Mod_gzip_item_exclude file \attachment.php$
#上面这个是VBB必须要的
# # # End of Mod_gzip sample Config
Logformat "%h%l%u%t \"%r\ "%>s%b mod_gzip:%{mod_gzip_result}n in:%{mod_gzip_input_size}n out:%{mod_gzip_output_si ze}n:%{mod_gzip_compression_ratio}npct. "Mod_gzip_info
# Record gzip operation status
# The above for httpd.conf need to add or modify the place, the other can not be modified

Six, configuration phpMyAdmin
Open config.inc.php File modification
$cfgServers [1][' host '] = ' localhost '; MySQL Address
$cfgServers [1][' port '] = ' 3306 '; MySQL Port
$cfgServers [1][' user '] = ' username '; MySQL User name
$cfgServers [1][' password '] = ' passwd '; MySQL Password
$cfgDefaultLang = ' zh '; Configure phpMyAdmin for Simplified Chinese interface

Because phpMyAdmin this is a MySQL configuration, you need to put him in a directory that no one else can guess, or the directory requires User rights verification

Seven, testing
If you follow the default d:\myweb\phpmyadmin, open the following address in your browser http://localhost/phpmyadmin/
If the test is successful, the phpMyAdmin MySQL Administration page appears, click Show php information, or go to http://localhost/phpmyadmin/phpinfo.php, which shows the Web PHP MySQL configuration and operating conditions .....
As long as the configuration is not a problem, then above Apache 1.3.22 for win32+php 4.0.6+active Perl 5.006001+zend Optimizer v1.1.0+mod_gzip 1.3.19.1a+mysql 4.0.0 A Lpha Configuration Complete

http://www.bkjia.com/PHPjc/314753.html www.bkjia.com true http://www.bkjia.com/PHPjc/314753.html techarticle Apache1.3.22forwin32+php4.0.6+activeperl5.006001+zendoptimizerv1.1.0+mod_gzip1.3.19.1a+mysql4.0.0alpha Apache1.xforwin32 Although poor (and IIS far worse than, Hope 2. Xforw ...

  • 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.