Home Backend Development PHP Tutorial PHP&MYSQL server configuration instructions_PHP tutorial

PHP&MYSQL server configuration instructions_PHP tutorial

Jul 21, 2016 pm 04:08 PM
amp mysql php server illustrate Configuration


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 the performance is poor (and IIS It's too far behind, I hope 2. PHP-4 has the characteristics of fast execution and high performance efficiency. PERL provides perl-cgi support, Zend Optimizer accelerates PHP programs, mod_zip is used to compress web server output data, and MySql is the database. The following is based on win2k/xp. It is too troublesome to run these service software on win9x and cannot be run as a service.

1.
Download location of 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...release_id=44593 (for database control operations)

2.
Installation path (the following is an example, you can install it casually, 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: Unzip in d:apachemodules
Zend Optimizer: Unzip in d:php
Website file placement: d:myweb
phpMyAdmin: Unzip in d:mywebphpmyadmin
Windows: d:windows

3. Configure mysql
After installation, winmysqladmin will automatically run and prompt for username and password. Enter username and password. Default In this case, it has been installed as NT Service. If you need to be more secure, then modify the default port on the my.ini Setup page of winmysqladmin under port=port, and modify the username and password below. After modification, click Save Modification on the left to save the settings, then right-click on the console form and select WinNT->Stop The Service->Start The Service, so that the new settings will take effect.

4. Configure php
Rename php.ini-dist to php.ini and open the modification.
Add
zend_optimizer.optimization_level=15 in the next line of [php]
zend_extension_ts="d:phpZendOptimizer.dll"
The path to zendoptimizer.dll must match

Then search extension_dir, add the full name of your windirsystem32 directory at the end, for example: extension_dir = d:windowssystem32 (the last one must not be omitted!)
Look for extension=php_exif.dll, extension=php_imap.dll, extension=php_ldap.dll, extension=php_zlib.dll, remove the previous semicolon comment
Look for mysql.default_port, add your mysql port after the equal sign, for example: mysql.default_port = 3306 (3306 is the default port of mysql)
Look mysql.default_host, add localhost after the equal sign, for example: mysql.default_host = localhost
Save
Copy php.ini php.exe to the windows directory, and copy php4ts.dll, dlls and extensions under the directory in php Copy all .dll files to windowssystem32 (do not overwrite existing files)

5. Configure Apache
Open the apacheconfhttpd.conf file, the following are the main settings
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 65536
MaxClients 150
Listen 80
# Listen on port 80, default web server port
BindAd dress *
# is Any IP can use web server

LoadModule vhost_alias_module modules/mod_vhost_alias.so
AddModule mod_vhost_alias.c
# Remove the # in front of these two lines to enable virtual domain name support

Port 80
ServerAdmin me@localhost
ServerName localhost
# Port, administrator email, server domain name, modify according to actual conditions

DocumentRoot "d:/myweb/"
# web file Save the 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 the running environment of perl-cgi. Since Active Perl is installed in d:perl, the relative path is used directly here
# Note that the cgi and pl to be run The first line of the file must be the same as here, otherwise it will not run.It can also be written here as
# #!d:/perl/bin/perl
# In addition, the first # in this configuration does not mean a comment, so it cannot be omitted! !

Find DirectoryIndex index.html and 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
Change to AddType application/x-httpd-php .php .phtml .php3

Find AddHandler cgi -script
Modify 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

### The following are gzip module settings
mod_gzip_on Yes
mod_gzip_minimum_file_size 300
mod_gzip_maximum_file_size 0
mod_gzip_maximum_inmem_size 1 00000
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, if not, create a new one
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$
#The above is required for VBB Required
### 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 operation status
# The above are the places that need to be added or modified in httpd.conf. Others do not need to be modified

6. Configure phpmyadmin
Open the config.inc.php file and modify it
$cfgServers[1]['host'] = 'localhost'; //mysql address
$cfgServers[1]['port' ] = '3306'; //mysql port
$cfgServers[1]['user'] = 'username'; //mysql username
$cfgServers[1]['password'] = 'passwd' ; //mysql password
$cfgDefaultLang = 'zh'; //Configure phpmyadmin as a simplified Chinese interface

Since phpmyadmin is a mysql configuration, it needs to be placed in a directory that others cannot guess or This directory requires user permission verification

7. Test
If you follow the default d:mywebphpmyadmin, then use a browser to open the following address http://localhost/phpmyadmin/
If the test is successful, phpmyadmin will appear On the mysql management page, click Show PHP information, or go to http://localhost/phpmyadmin/phpinfo.php. This shows the configuration and operation of web php mysql...
As long as you configure No problem, then 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 is configured

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/314753.htmlTechArticleApache1.3.22forWin32+PHP4.0.6+ActivePerl5.006001+ZendOptimizerv1.1.0+mod_gzip1.3.19.1a+MySQL4 .0.0Alpha Apache1.
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MySQL: An Introduction to the World's Most Popular Database MySQL: An Introduction to the World's Most Popular Database Apr 12, 2025 am 12:18 AM

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP's Current Status: A Look at Web Development Trends PHP's Current Status: A Look at Web Development Trends Apr 13, 2025 am 12:20 AM

PHP remains important in modern web development, especially in content management and e-commerce platforms. 1) PHP has a rich ecosystem and strong framework support, such as Laravel and Symfony. 2) Performance optimization can be achieved through OPcache and Nginx. 3) PHP8.0 introduces JIT compiler to improve performance. 4) Cloud-native applications are deployed through Docker and Kubernetes to improve flexibility and scalability.

Why Use MySQL? Benefits and Advantages Why Use MySQL? Benefits and Advantages Apr 12, 2025 am 12:17 AM

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

PHP: The Foundation of Many Websites PHP: The Foundation of Many Websites Apr 13, 2025 am 12:07 AM

The reasons why PHP is the preferred technology stack for many websites include its ease of use, strong community support, and widespread use. 1) Easy to learn and use, suitable for beginners. 2) Have a huge developer community and rich resources. 3) Widely used in WordPress, Drupal and other platforms. 4) Integrate tightly with web servers to simplify development deployment.

MySQL's Place: Databases and Programming MySQL's Place: Databases and Programming Apr 13, 2025 am 12:18 AM

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP vs. Python: Core Features and Functionality PHP vs. Python: Core Features and Functionality Apr 13, 2025 am 12:16 AM

PHP and Python each have their own advantages and are suitable for different scenarios. 1.PHP is suitable for web development and provides built-in web servers and rich function libraries. 2. Python is suitable for data science and machine learning, with concise syntax and a powerful standard library. When choosing, it should be decided based on project requirements.

See all articles