Home php教程 php手册 PHP5.3.1安装教程[基于Windows下Apache]

PHP5.3.1安装教程[基于Windows下Apache]

Jun 13, 2016 am 10:37 AM
apache php wamp windows Down Discover based on study Install Tutorial yesterday

  学习PHP这么久了,昨天发现WAMP已经更新了好几个版本了,我的版本已经很旧了,当然版本并不重要,为

  了复习一下WAMP的配置方法,我在虚拟机中手动和自动配置了下,都是下载最新的推荐版本,原来并没想到

  发到坛子来,所以并没有截图,后来总结到记事本的时候发现还是有蛮多问题的,所以就共享出来,希望对大家

  有所帮助。在做实验的时候,我也参考了坛子里其他的前辈写的教程,在此多谢了。步骤写得比较简略,但重要

  的东西基本都写出来了,有不明白的可以借助搜索引擎,如果我在线,我也会尽力解答的。

       PHP5.3.1 安装配置视频教程

  安装过程如下:

  ①手动安装:

  (1)按提示安装Apache 2.2.14,有两种版本(具体有什么区别网上有答案),都行的,安装在C:WAMPApache2.2.14。

  (2)解压php-5.3.1-Win32-VC6-x86.zip(选择VC6,Thread Safe版本)到C:WAMPPHP5.3.1中。

  (3)打开httpd.conf,添加以下三行:

  LoadModule php5_module C:/WAMP/PHP5.3.1/php5apache2_2.dll

  PHPIniDir "C:/WAMP/PHP5.3.1"

  AddType application/x-httpd-php .php .phtml

  找到

  

  DirectoryIndex index.html

  

  改为:

  

  DirectoryIndex index.html index.php

  

  (4)设置环境变量:C:WAMPPHP5.3.1;C:WAMPPHP5.3.1ext;

  还可以把C:WAMPApache2.2.14in也添加进去,这样如果Apache出错就可以

  直接在命令控制台中打命令调试。

  (5)修改php.ini:

  找到extension_dir,设置为extension_dir = "C:/WAMP/PHP5.3.1/ext"

  找到以下extension:

  ;extension=php_gd2.dll

  ;extension=php_mbstring.dll

  ;extension=php_mysql.dll

  ;extension=php_mysqli.dll

  去掉之前的分号。这个根据需要去掉前面的分号。

  (6)重启Apache,写个有PHP语句的php网页测试。

  (7)解压mysql-noinstall-5.1.41-win32.zip到C:WAMPMySQL5.1.41中

  (8)把my-large.ini改名为my.ini,找到[mysqld]添加如下语句:

  #set default language

  default-character-set=gbk

  #set basedir to your installation path

  basedir=C:/WAMP/MySQL5.1.41

  #set datadir to the location of your data directory

  datadir=C:/WAMP/MySQL5.1.41/data

  (9)先设置环境变量:C:WAMPMySQL5.1.41in,然后打开命令窗口,输入:

  mysqld --install MySQL --defaults-file=C:WAMPMySQL5.1.41my.ini

  安装完成后在命令窗口输入:mysql -u root

  设置root帐户密码:set password for root@localhost = password(123456);

  这样之后就可以使用mysql了,重启Apache,写个php网页测试。

  (10)根据提示安装ZendOptimizer-3.3.0a-Windows-i386.exe。

  (11)解压phpMyAdmin-3.2.4到C:WAMPApachehtdocsphpMyAdmin中。

  (12)打开文件config.sample.inc.php,寻找到代码行:

  // $cfg[Servers][$i][controluser] = pma;

  // $cfg[Servers][$i][controlpass] = pmapass;

  改为:

  $cfg[Servers][$i][controluser] = root;

  $cfg[Servers][$i][controlpass] = 123456;

  注意:如果需要通过远程服务器调试使用phpMyAdmin,不能让blowfish_secret内容为空。

  可以随便设置一个字符串。

  (13)以config.inc.php保存在同一目录下,现在可以在浏览器中使用phpMyAdmin了。

  至此,手动安装完毕。

  ************************************************************************************

  #####################################################################

  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

  ②自动安装:

  (1)按提示安装Apache 2.2.14,有两种版本(具体有什么区别网上有答案),都行的,安装在C:WAMPApache2.2.14。

  (2)运行php-5.3.1-Win32-VC6-x86.msi(选择VC6,Thread Safe版本),安装在C:WAMPPHP5.3.1中。

  (3)安装完后在网上找到ntwdblib.dll这个文件,放在C:WAMPPHP5.3.1目录中(不推荐这种做法)。

  或者打开php.ini,注释掉下面的一句(就是在前面加个分号,如果已经被注释了那更好):

  extension=php_mssql.dll

  然后重启Apache,这时应该就可以了(如果直接重启Apache,有可能出错)。

  写个php网页测试下。

  (4)运行mysql-5.1.41-win32.msi,安装在C:WAMPMySQL5.1.41中。

  (5)重启Apache,新建一个php网页,连接一下MySQL以验证是否安装成功。

  (6)解压phpMyAdmin-3.2.4到C:WAMPApachehtdocsphpMyAdmin中。

  (7)打开文件config.sample.inc.php,寻找到代码行:

  // $cfg[Servers][$i][controluser] = pma;

  // $cfg[Servers][$i][controlpass] = pmapass;

  改为:

  $cfg[Servers][$i][controluser] = root;

  $cfg[Servers][$i][controlpass] = 123456;

  注意:如果需要通过远程服务器调试使用phpMyAdmin,不能让blowfish_secret内容为空。

  可以随便设置一个字符串,最好是设置一个字符串。

  (8)以config.inc.php保存在同一目录下,现在可以在浏览器中使用phpMyAdmin了。

  至此,自动安装完毕。

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)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks 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 late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

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,

What are PHP magic methods (__construct, __destruct, __call, __get, __set, etc.) and provide use cases? What are PHP magic methods (__construct, __destruct, __call, __get, __set, etc.) and provide use cases? Apr 03, 2025 am 12:03 AM

What are the magic methods of PHP? PHP's magic methods include: 1.\_\_construct, used to initialize objects; 2.\_\_destruct, used to clean up resources; 3.\_\_call, handle non-existent method calls; 4.\_\_get, implement dynamic attribute access; 5.\_\_set, implement dynamic attribute settings. These methods are automatically called in certain situations, improving code flexibility and efficiency.

Four ways to implement multithreading in C language Four ways to implement multithreading in C language Apr 03, 2025 pm 03:00 PM

Multithreading in the language can greatly improve program efficiency. There are four main ways to implement multithreading in C language: Create independent processes: Create multiple independently running processes, each process has its own memory space. Pseudo-multithreading: Create multiple execution streams in a process that share the same memory space and execute alternately. Multi-threaded library: Use multi-threaded libraries such as pthreads to create and manage threads, providing rich thread operation functions. Coroutine: A lightweight multi-threaded implementation that divides tasks into small subtasks and executes them in turn.

Explain the match expression (PHP 8 ) and how it differs from switch. Explain the match expression (PHP 8 ) and how it differs from switch. Apr 06, 2025 am 12:03 AM

In PHP8, match expressions are a new control structure that returns different results based on the value of the expression. 1) It is similar to a switch statement, but returns a value instead of an execution statement block. 2) The match expression is strictly compared (===), which improves security. 3) It avoids possible break omissions in switch statements and enhances the simplicity and readability of the code.

How to run the h5 project How to run the h5 project Apr 06, 2025 pm 12:21 PM

Running the H5 project requires the following steps: installing necessary tools such as web server, Node.js, development tools, etc. Build a development environment, create project folders, initialize projects, and write code. Start the development server and run the command using the command line. Preview the project in your browser and enter the development server URL. Publish projects, optimize code, deploy projects, and set up web server configuration.

Describe the purpose and usage of the ... (splat) operator in PHP function arguments and array unpacking. Describe the purpose and usage of the ... (splat) operator in PHP function arguments and array unpacking. Apr 06, 2025 am 12:07 AM

The... (splat) operator in PHP is used to unpack function parameters and arrays, improving code simplicity and efficiency. 1) Function parameter unpacking: Pass the array element as a parameter to the function. 2) Array unpacking: Unpack an array into another array or as a function parameter.

Apache Troubleshooting: Diagnosing & Resolving Common Errors Apache Troubleshooting: Diagnosing & Resolving Common Errors Apr 03, 2025 am 12:07 AM

Apache errors can be diagnosed and resolved by viewing log files. 1) View the error.log file, 2) Use the grep command to filter errors in specific domain names, 3) Clean the log files regularly and optimize the configuration, 4) Use monitoring tools to monitor and alert in real time. Through these steps, Apache errors can be effectively diagnosed and resolved.

See all articles