PHP&MYSQL server configuration instructions_PHP tutorial
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

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











In MySQL, the function of foreign keys is to establish the relationship between tables and ensure the consistency and integrity of the data. Foreign keys maintain the effectiveness of data through reference integrity checks and cascading operations. Pay attention to performance optimization and avoid common errors when using them.

The main difference between MySQL and MariaDB is performance, functionality and license: 1. MySQL is developed by Oracle, and MariaDB is its fork. 2. MariaDB may perform better in high load environments. 3.MariaDB provides more storage engines and functions. 4.MySQL adopts a dual license, and MariaDB is completely open source. The existing infrastructure, performance requirements, functional requirements and license costs should be taken into account when choosing.

MySQL and phpMyAdmin can be effectively managed through the following steps: 1. Create and delete database: Just click in phpMyAdmin to complete. 2. Manage tables: You can create tables, modify structures, and add indexes. 3. Data operation: Supports inserting, updating, deleting data and executing SQL queries. 4. Import and export data: Supports SQL, CSV, XML and other formats. 5. Optimization and monitoring: Use the OPTIMIZETABLE command to optimize tables and use query analyzers and monitoring tools to solve performance problems.

AI can help optimize the use of Composer. Specific methods include: 1. Dependency management optimization: AI analyzes dependencies, recommends the best version combination, and reduces conflicts. 2. Automated code generation: AI generates composer.json files that conform to best practices. 3. Improve code quality: AI detects potential problems, provides optimization suggestions, and improves code quality. These methods are implemented through machine learning and natural language processing technologies to help developers improve efficiency and code quality.

In MySQL, add fields using ALTERTABLEtable_nameADDCOLUMNnew_columnVARCHAR(255)AFTERexisting_column, delete fields using ALTERTABLEtable_nameDROPCOLUMNcolumn_to_drop. When adding fields, you need to specify a location to optimize query performance and data structure; before deleting fields, you need to confirm that the operation is irreversible; modifying table structure using online DDL, backup data, test environment, and low-load time periods is performance optimization and best practice.

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.

To safely and thoroughly uninstall MySQL and clean all residual files, follow the following steps: 1. Stop MySQL service; 2. Uninstall MySQL packages; 3. Clean configuration files and data directories; 4. Verify that the uninstallation is thorough.

HTML5 brings five key improvements: 1. Semantic tags improve code clarity and SEO effects; 2. Multimedia support simplifies video and audio embedding; 3. Form enhancement simplifies verification; 4. Offline and local storage improves user experience; 5. Canvas and graphics functions enhance the visualization of web pages.
