PHP and MySQL server configuration instructions

Source: Internet
Author: User
Tags php and mysql php mysql
    1. Zend_optimizer.optimization_level=15
    2. Zend_extension_ts= "D:phpendoptimizer.dll"
    3. The path of the Zendoptimizer.dll must conform to
Copy Code

Then find Extension_dir, at the back = Add your Windirsystem32 directory full name, for example: Extension_dir = D:windowssystem32 (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 previous semicolon comment Find Mysql.default_port, add your MySQL port after the equals sign, for example: Mysql.default_port = 3306 (3306 is the default port for MySQL) to find Mysql.default_host, Add localhost after the equals sign, for example: Mysql.default_host = localhost save php.ini php.exe copied to the Windows directory, PHP inside Php4ts.dll, Copy all the. dll files below the DLLs and extensions directories to windowssystem32 (do not overwrite existing files)

Five, configure the Apache server to open the Apacheconfhttpd.conf file, the following are the main settings

  1. ServerType Standalone
  2. ServerRoot "D:/apache"
  3. # Apache installed directory
  4. Pidfile Logs/httpd.pid
  5. Scoreboardfile Logs/apache_runtime_status
  6. Timeout 300
  7. KeepAlive on
  8. Maxkeepaliverequests 100
  9. KeepAliveTimeout 15
  10. Maxrequestsperchild 1024
  11. Threadsperchild 50
  12. Sendbuffersize 65536
  13. MaxClients 150
  14. Listen 80
  15. # Listening on port 80, default Web server port
  16. Bindaddress *
  17. # Web server can be used on any IP
  18. LoadModule Vhost_alias_module modules/mod_vhost_alias.so
  19. Addmodule MOD_VHOST_ALIAS.C
  20. # get rid of the previous # of these two lines, turn on the support of the virtual domain
  21. Port 80
  22. ServerAdmin Me@localhost
  23. ServerName localhost
  24. # port, admin email, server domain name, by actual modification
  25. DocumentRoot "d:/myweb/"
  26. # Web File Save address, here is d:/myweb as an example
  27. Options FollowSymLinks MultiViews
  28. AllowOverride All
  29. Order Allow,deny
  30. Allow from all
  31. # Set 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 PERL-CGI's running environment, because active Perl is installed in D:perl, so the relative path is used directly
  40. Note that the first line of CGI, PL files to run will be the same as here, otherwise it will not work. This can also be written
  41. # #!d:/perl/bin/perl
  42. # In addition this configuration of the first # does not mean the meaning of comments, so can not 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. Modified to AddType application/x-httpd-php. php. phtml. php3
  52. Find AddHandler Cgi-script
  53. Modified 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. # # # Below is the Gzip module setup
  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, no new
  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. #上面这个是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 gzip operation status
  92. # The above for httpd.conf need to add or modify the place, the other can not be modified
Copy Code

Vi. Configuration phpMyAdmin Open config.inc.php file modification

    1. $cfgservers [1][' host '] = ' localhost '; MySQL Address
    2. $cfgservers [1][' port '] = ' 3306 '; MySQL Port
    3. $cfgservers [1][' user '] = ' username '; MySQL User name
    4. $cfgservers [1][' password '] = ' passwd '; MySQL Password
    5. $cfgdefaultlang = ' zh '; Configure phpMyAdmin for Simplified Chinese interface
Copy Code

Because phpMyAdmin this is a MySQL configuration, you need to put him in a directory that no one else can guess, or the directory requires User rights verification

Vii. Test If you follow the default d:mywebphpmyadmin, then open the following address with your browser http://localhost/phpmyadmin/if the test succeeds, the phpMyAdmin MySQL Administration page appears, click Show PHP Information, or go to http://localhost/phpmyadmin/phpinfo.php, this shows the configuration of the web PHP MySQL and the operation of the situation.

As long as the configuration is not a problem, then 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 A Lpha 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.