Phpmysql server configuration instructions

Source: Internet
Author: User


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
Although Apache 1.x for Win32 is ** poor in performance (it is too far behind IIS compared to 2.x for Win32), it has fewer bugs and consumes less resources, moreover, its modular model makes it easier to add functions. The PHP-4 features fast execution and ** high efficiency, Perl provides support for Perl-CGI, Zend optimizer is accelerating PHP Program Mod_zip is used to compress the output data of the Web server. MySQL is the database. The following is based on Win2k/xp. It is too troublesome for Win9x to run these service software as a service.

I,
Software Download location:
Apache: http://www.apache.org/dist/httpd/binaries/win32/
PHP: http://www.php.net/downloads.php (download .zip)
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 Database Control Operations)

II,
Installation path (The following is an example, which can be installed at will, but it is best not to install it in a path with a long name)
Apache: D: \ apache
PHP: D: \ PHP
Perl: D: \ Perl
MySQL: D: \ mysql
Mod_gzip: Decompress the package in D: \ apache \ modules.
Zend optimizer: Decompress the package in D: \ PHP
Website file placement: D: \ myweb
PhpMyAdmin: Decompress the package in D: \ myweb \ phpMyAdmin.
Windows: D: \ WINDOWS

3. Configure MySQL
After installation, winmysqladmin runs automatically and prompts you to enter the user name and password, and enter the user name and password. By default, services that have been installed as NT are installed. If you need to be more secure, you can run winmysqladmin's my. on the page of INI setup, Port = Modify the default port, and change the user name and password below. After modification, click Save modiffication on the left to save the settings. Right-click the console form and choose winnt-> stop the service-> start the service. The new settings take effect.

4. Configure PHP
Rename PHP. ini-Dist to PhP. ini and enable the modification.
Add in the next line of [PHP]
Zend_optimizer.optimization_level = 15
Zend_extension_ts = "D: \ PHP \ zendoptimizer. dll"
The zendoptimizer. dll path must comply

Find extension_dir, and add the full name of your WinDir \ system32 \ directory to the end, 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 semicolon comment above
Find mysql. default_port and add your MySQL port after the equal sign, for example, MySQL. default_port = 3306 (3306 is the default port of MySQL)
Find mysql. default_host and add localhost after the equal sign, for example, MySQL. default_host = localhost
Save
Copy PHP. ini php.exe to the Windows directory, and copy all the. DLL files in the php4ts. dll, DLLs, and extensions directories in PHP to the windows \ system32 directory (do not overwrite existing files)

5. Configure Apache
Open the apache \ conf \ httpd. conf file. The main settings are as follows:
Servertype Standalone

Serverroot "D:/Apache"
# Apache installation directory

Pidfile logs/httpd. PID
Scoreboardfile logs/apache_runtime_status
Timeout 300
Keepalive on
Maxkeepaliverequests 100
Keepalivetimeout 15
Maxrequestsperchild 1024
Threadsperchild 50
Sendbuffersize is 65536
Maxclients 150
Listen 80
# Listen to port 80, default web server port
Bindaddress *
# Web server can be used on any IP Address

Loadmodule vhost_alias_module modules/mod_vhost_alias.so
Addmodule mod_vhost_alias.c
# Remove the first two rows # enable support for virtual domain names

Port 80
Serveradmin me @ localhost
Servername localhost
# Port, Administrator email, server domain name, according to actual Modification

DocumentRoot "D:/myweb /"
# Web file storage address. Here we use D:/myweb as an example.
<Directory "D:/myweb/">
Options followsymlinks Multiviews
AllowOverride all
Order allow, deny
Allow from all
</Directory>
# Set access options for D:/myweb
ScriptAlias/cgi-bin "E:/myweb/cgi"
<Directory "D:/myweb/cgi/">
AllowOverride none
Options none
Order allow, deny
Allow from all
</Directory>
# Set cgi-bin directory permissions

#! /Perl/bin/perl
# This line configures the running environment of Perl-CGI. Because Active Perl is installed in D: \ Perl, the relative path is directly used here.
# Note: the header line of the CGI and PL files to be run must be the same as that in this example. Otherwise, the CGI and PL files cannot be run. It can also be written here
##! D:/perl/bin/perl
# In addition, the first configuration # does not represent the meaning of the comment, so it cannot be omitted !!

Find directoryindex index.html and add
Directoryindex index.htm
Directoryindex default.htm
Directoryindex default.html
Directoryindex index. php
Directoryindex index. php3
Directoryindex index. cgi

Find addtype application/X-httpd-PHP
Change to addtype application/X-httpd-PHP. php. phtml. php3.

Find addhandler CGI-script
Change to addhandler CGI-script. cgi. pl

Loadmodule php4_module D:/PHP/SAPI/php4apache. dll
Loadmodule gzip_module D:/Apache/modules/apachemodulegzip. dll
# Load the PhP4 and gzip modules

### Set the gzip Module
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, and a 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 $
# This is required by 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_size} n :%{ mod_gzip_compression_ratio} npct. "mod_gzip_info
# Record gzip running status
# The above is where httpd. conf needs to be added or modified. You do not need to modify other items.

6. Configure phpMyAdmin
Open the config. Inc. php file and modify it.
$ Login servers [1] ['host'] = 'localhost'; // MySQL address
$ Export servers [1] ['Port'] = '000000'; // MySQL Port
$ Login servers [1] ['user'] = 'username'; // MySQL Username
$ Login servers [1] ['Password'] = 'passwd'; // MySQL password
$ Export defaultlang = 'zh '; // configure phpMyAdmin as a simplified Chinese interface

Because phpMyAdmin is configured in MySQL, you need to put it in a directory that someone else cannot guess or the directory requires user permission verification.

VII. Test
If you follow the default D: \ myweb \ phpMyAdmin, open the following URL in the browser: http: // localhost/PHPmyAdmin/
If the test succeeds, the MySQL Management page of phpMyAdmin appears. Click Show PHP information or go to http: // localhost/PHPmyAdmin/phpinfo. PHP, which shows the configuration and running status of Web PHP MySQL .........
As long as the configuration is correct, the 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 Alpha configuration is complete.

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.