PHP and mysql server configuration instructions

WBOY
Release: 2016-07-25 08:54:10
Original
931 people have browsed it
  1. zend_optimizer.optimization_level=15
  2. zend_extension_ts="d:php endoptimizer.dll"
  3. 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

  1. servertype standalone
  2. serverroot "d:/apache"
  3. # apache installation directory
  4. pidfile logs/httpd.pid
  5. scoreboardfile logs/apache_runtime_status
  6. timeout 300
  7. keepalive on
  8. maxkeepaliverequest s 100
  9. keepalivetimeout 15
  10. maxrequestsperchild 1024
  11. threadsperchild 50
  12. sendbuffersize 65536
  13. maxclients 150
  14. listen 80
  15. # Listen to port 80, default web server port
  16. bindaddress *
  17. # You can use web server at any IP
  18. loadmodule vhost_alias_module modules/mod_vhost_alias.so
  19. addmodule mod_v host_alias.c
  20. # Remove The # in front of these two lines turns on virtual domain name support
  21. port 80
  22. serveradmin me@localhost
  23. servername localhost
  24. # Port, administrator email, server domain name, modify according to actual situation
  25. documentroot "d:/myweb/"
  26. # web file Save the address, here is d:/myweb as an example
  27. options followsymlinks multiviews
  28. allowoverride all
  29. order allow,deny
  30. allow from all
  31. # Settings Access options for d:/myweb
  32. scriptalias /cgi-bin "e:/myweb/cgi"
  33. allowoverride none
  34. options none
  35. order allow,deny
  36. allow from all
  37. # Set cgi-bin directory permissions
  38. #!/perl/bin/perl
  39. # 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
  40. # 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
  41. # #!d:/perl/bin/perl
  42. # In addition, the first # in this configuration does not mean a comment, so it cannot be omitted! !
  43. Find directoryindex index.html, add below
  44. directoryindex index.htm
  45. directoryindex default.htm
  46. directoryindex default.html
  47. directoryindex index.php
  48. directoryindex index.php3
  49. directoryindex index.cgi
  50. Find addtype application/x-httpd-php
  51. Modify to addtype application/x-httpd-php .php .phtml .php3
  52. Find addhandler cgi-script
  53. Modify to addhandler cgi-script .cgi .pl
  54. loadmodule php4_module d:/php/sapi/php4apache.dll
  55. loadmodule gzip_module d:/apache/modules/apachemodulegzip.dll
  56. # Load php4, gzip module
  57. ### The following are gzip module settings
  58. mod_gzip_on yes
  59. mod_gzip_minimum_file_size 300
  60. mod_gzip_maximum_file_size 0
  61. mod_gzip_maximum_inmem_size 100000
  62. mod_gzip_keep_workfiles no
  63. mod_gzip_dechunk yes
  64. mod_gzip_can_negotiate yes
  65. mod_gzip_temp_dir d :/apache/temp
  66. # There must be a temp directory under the apache directory. If not, create a new one
  67. mod_gzip_item_include file .html$
  68. mod_gzip_item_include file .htm$
  69. mod_gzip_item_include file .shtml$
  70. mod_gzip_item_include file .shtm$
  71. mod_ gzip_item_include file .pl $
  72. mod_gzip_item_include file .cgi$
  73. mod_gzip_item_include mime ^text/.*
  74. mod_gzip_item_include handler ^perl-script$
  75. mod_gzip_item_include mime ^httpd/unix-directory$
  76. mod_gzip_item_include handler ^server -status$
  77. mod_gzip_item_include handler ^server-info$
  78. mod_gzip_item_include mime ^application/x-httpd-php
  79. mod_gzip_item_include file .php$
  80. mod_gzip_item_include file .php3$
  81. mod_gzip_item_include file .mht$
  82. mod_gzip_item_exclude file .css$
  83. mod_gzip _item_exclude file .js$
  84. mod_gzip_item_exclude mime ^image/.*
  85. mod_gzip_item_exclude reqheader content-type:multipart/form-data
  86. mod_gzip_item_exclude reqheader content-type:application/x-www-form-urlencoded
  87. mod_gzip_item_exclude file attachment.php$
  88. #The above is a must for vbb
  89. ### end of mod_gzip sample config
  90. 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
  91. # Record the running status of gzip
  92. # 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

  1. $cfgservers[1][''host''] = ''localhost''; //mysql address
  2. $cfgservers[1][''port''] = ''3306''; / /mysql port
  3. $cfgservers[1][''user''] = ''username''; //mysql username
  4. $cfgservers[1][''password''] = ''passwd''; // mysql password
  5. $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.



source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template