进行正确的搭建
搭建PHP环境一、安装Apache 2.2.x
下载地址:http://httpd.apache.org/
一路回车即可安装。 注意安装完成后要执行:D:Apache2.2bin>httpd -k install
假设,安装在D:盘下。
Installing the Apache2.2 service
The Apache2.2 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
httpd: Could not reliably determine the server's fully qualified domain name, us
ing 192.168.28.100 for ServerName
执行后,在桌面右下脚打开Monitor Apache Servers 并启动Apache 2.2服务
搭建PHP环境二、安装PHP
下载地址:http://cn2.php.net/get/php-4.4.9-Win32.zip/from/a/mirror
下载 php-5.2.6-Win32.zip
(1)将PHP文件解压到一个目录下,目录地址为 "D:php"。
(2)将PHP目录(D:php)下的php.ini-dist复制到windows(有的系统是winnt目录)目录下,并改名为php.ini。
(3)复制D:php目录下的所有dll文件到windows的系统文件夹里,即:C:windowssystem32。
注意:如果不想复制(3)的文件,可以把 D:php 目录加入系统PATH变量中
搭建PHP环境三、Apache 与 PHP 的整合
开始菜单的程序的Apache HTTP Server 2.2.4,再进入下一级的Configure Apache Server,这时可以看到那个Edit the Apache httpd.conf Configuration File。点一下。
查找:
#LoadModule ssl_module modules/mod_ssl.so
在下面添加:
LoadModule php5_module "d:/local/php/php5apache2_2.dll"
查找:
DirectoryIndex index.html
替换:
DirectoryIndex index.html index.htm index.php default.php
查找:
AddType application/x-gzip .gz .tgz
在下面添加:
AddType application/x-httpd-php .php
Apache配置结束,现在开始进行PHP配置,用Notepad打开C:windowsphp.ini。
查找:
extension_dir = "./"
替换:
extension_dir = "d:/local/php/ext/"
查找:
upload_max_filesize = 2M
这里的意思为修改上传文件的最大限制,默认为2M,可以改为6M。
查找:
;extension=php_mbstring.dll
将前面的;号去掉。
查找:
;extension=php_gd2.dll
将前面的;号去掉。
查找:
;extension=mysql.dll
将前面的;号去掉。
查找:
;date.timezone =
替换:
date.timezone = PRC
文件修改完毕,此时,双击右下角任务栏的Apache图标,弹出的窗口中,点Stop停止服务,等停止后再点Start启动服务,此时,可以看到其窗口的状态栏中会显示:"Apache/2.2.4 (Win32) PHP/5.2.0"。搭建PHP环境的配置全部完成。

Golang(Go编程语言)是一种基于C语言的编程语言,被广泛用于Web开发、网络编程、操作系统等领域。然而,在编写Golang程序时经常会遇到一个常见的问题,就是“undeclaredname”(未声明名称)错误。下面将介绍如何解决这个问题。了解错误信息在编译和运行Golang程序时,如果遇到了未声明名称错误,会在控制台输出相应的错误信

Java中的ClassNotFoundException是一种常见的编译错误。当我们尝试使用Java虚拟机(JVM)加载某个类时,如果JVM找不到该类,就会抛出ClassNotFoundException。这个错误可能出现在程序运行时,也可能出现在编译时。在本文中,我们将讨论什么是ClassNotFoundException,它为什么会发生以及如何解决它。C

Go语言是一门越来越受欢迎的编程语言,它的简洁、高效、易于编写的特点已经被越来越多的开发者所认可。而在Go语言开发中,遇到编译错误是不可避免的。其中一个常见的错误就是“undefined:json.Marshal”。这个错误通常发生在你使用了Go标准库的“encoding/json”包时,编译器提示找不到“json.Marshal”的定义。这个问题的根本原

随着Java的广泛应用,Java程序在连接数据库时经常会出现JDBC错误。JDBC(JavaDatabaseConnectivity)是Java中用于连接数据库的编程接口,因此,JDBC错误是在Java程序与数据库交互时遇到的一种错误。下面将介绍一些最常见的JDBC错误及如何解决和避免它们。ClassNotFoundException这是最常见的JDBC

Go语言作为一门快速发展的编程语言,被广泛应用于各种项目和领域。然而,在使用golang编写程序时,你有可能会遇到一些报错,其中一个常见的报错是“undefinedvariableorfunction”。那么,这个错误是什么意思?它是如何产生的?又该如何解决呢?本文将会对这些问题进行探讨。首先,我们需要了解一些基本概念。在golang中,变量和函数是两

在Vue应用中遇到“SyntaxError:Unexpectedtoken”怎么解决?Vue是前端开发中广泛使用的一个JavaScript框架,它可以让我们更轻松地管理页面的状态、渲染和交互。但是在编写Vue应用时,有时会遇到“SyntaxError:Unexpectedtoken”报错,这个错误提示意味着代码中存在语法错误,JavaScript引擎

Java作为目前最受欢迎的编程语言之一,在开发过程中常常会遇到各种各样的错误,其中Gradle错误是比较常见的一种。本文将介绍如何解决和避免Gradle错误。一、Gradle错误的原因Gradle为构建工具,其主要作用是将代码、资源文件、第三方库等打包并生成可执行的应用程序。在实际开发中,如果不注意一些细节,很容易出现Gradle错误,主要原因通常有以下几种

近年来,Golang一直受到越来越多开发者的青睐。但是,即使是最有经验的开发人员也会遇到一些挫折,比如一些报错。其中,一种常见的报错是:“invaliduseof,operator”。在这篇文章中,我将为大家介绍这个报错的原因,以及解决方法。首先,我们需要了解什么是","操作符。在Golang中,","操作符通常被用来在数组、参数列表或结构体中分隔不


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.
