Home Backend Development PHP Tutorial PHP and mysql server configuration instructions

PHP and mysql server configuration instructions

Jul 25, 2016 am 08:54 AM

  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.



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 Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

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)

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Explain the concept of late static binding in PHP. Explain the concept of late static binding in PHP. Mar 21, 2025 pm 01:33 PM

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

Framework Security Features: Protecting against vulnerabilities. Framework Security Features: Protecting against vulnerabilities. Mar 28, 2025 pm 05:11 PM

Article discusses essential security features in frameworks to protect against vulnerabilities, including input validation, authentication, and regular updates.

Customizing/Extending Frameworks: How to add custom functionality. Customizing/Extending Frameworks: How to add custom functionality. Mar 28, 2025 pm 05:12 PM

The article discusses adding custom functionality to frameworks, focusing on understanding architecture, identifying extension points, and best practices for integration and debugging.

How to send a POST request containing JSON data using PHP's cURL library? How to send a POST request containing JSON data using PHP's cURL library? Apr 01, 2025 pm 03:12 PM

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...

Describe the SOLID principles and how they apply to PHP development. Describe the SOLID principles and how they apply to PHP development. Apr 03, 2025 am 12:04 AM

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

What exactly is the non-blocking feature of ReactPHP? How to handle its blocking I/O operations? What exactly is the non-blocking feature of ReactPHP? How to handle its blocking I/O operations? Apr 01, 2025 pm 03:09 PM

An official introduction to the non-blocking feature of ReactPHP in-depth interpretation of ReactPHP's non-blocking feature has aroused many developers' questions: "ReactPHPisnon-blockingbydefault...

See all articles