-
- zend_optimizer.optimization_level=15
- zend_extension_ts="d:php endoptimizer.dll"
- zendoptimizer.dll path must match
-
Copy code
Then look for extension_dir, and add the full name of your windirsystem32 directory at the end, for example: extension_dir = d:windowssystem32 (the last one must not be omitted!)
Find extension=php_exif.dll, extension=php_imap.dll, extension=php_ldap.dll, extension=php_zlib.dll and remove the preceding semicolon comments.
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 .dll files under the php4ts.dll, dlls and extensions directories in php to windowssystem32 (do not overwrite existing files)
5. Configure apache server
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
- maxkeepaliverequest s 100
- keepalivetimeout 15
- maxrequestsperchild 1024
- threadsperchild 50
- sendbuffersize 65536
- maxclients 150
- listen 80
- # Listen to port 80, default web server port
- bindaddress *
- # You can use web server at any IP
- loadmodule vhost_alias_module modules/mod_vhost_alias.so
- addmodule mod_v host_alias.c
- # Remove The # in front of these two lines turns on virtual domain name support
- port 80
- serveradmin me@localhost
- servername localhost
- # Port, administrator email, server domain name, modify according to actual situation
- 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
-
- # Settings 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 value is used directly here. Path
- # Note that the first line of the cgi and pl files to be run must be the same as here, otherwise it cannot be 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, 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
- Modify 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 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. 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 a must for 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 the running status of gzip
- # The above are the places that need to be added or modified in httpd.conf. Others do not need to be modified.
Copy the code
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
-
Copy code
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, the mysql management page of phpmyadmin will appear. Click show php information, or go to http://localhost/phpmyadmin/phpinfo.php. This displays the configuration and operation of web php mysql.
As long as the configuration is OK, 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
Configuration completed.
|