在Windows XP下安装Apache+MySQL+PHP环境,apachemysql
在Windows XP下安装Apache+MySQL+PHP环境,apachemysql
在整个wamp环境搭建中,本质的工作如下:
1,配置系统对php中dll文件能默认处于调用状态。
在windos下,对dll文件系统默认处于调用状态的,有两种采用的方式。
第一种是:把需要调用dll文件复制到C:\windows\ system32\(如果是Windows 2000操作系统,则为C:\WINNT\ system32\)目录下。
第二种是:把.dll后缀文件所在的文件夹的地址,追加到系统的path变量中去,这样的话,系统启动的时候,也会默认把dll文件自动载入内存中。
第三种是:把php.ini中; extension_dir = "./" 修改为 extension_dir = "D:/php5/ext"
注意,要重新启动Apacche服务器才能生效。
2,apache配置,本质是让apache服务器软件,能够解析.php文件。
分别在httpd.conf与php.ini中配置。
httpd.conf中修改:
2-1,配置根目录
复制代码 代码如下:
DocumentRoot D:/wwwroot-----这是第一处,把红字部分,修改成 本地apache的网站代码主文件夹,即存放项目代码的主文件夹。
2-2,配置目录索引
复制代码 代码如下:
DirectoryIndex index.html index.html.var index.php index.html
2-3,组合php与Apache2
复制代码 代码如下:
LoadModule php5_module D:/php5/php5apache2.dll----------以module方式加载php
PHPIniDir "D:/php"--------------------指定php的配置文件php.ini位置
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html--------------添加可以执行php的文件类型
DirectoryIndex index.php index.html index.html.var-----配置索引目录默认文件
php.ini修改:
1,设置PHP传递参数的方式
复制代码 代码如下:
register_globals=Off/On
设为Off,就是只能用$_post['变量名']、$_GET['变量名']来传递参数
设为On,可以直接使用$变量名来获取传递的参数值
2,设置需要加载的dll模块,以下几个必须要配置。
复制代码 代码如下:
;extension=php_gd2.dll---------GD库扩展文件,用户处理图片,如生成图片,图片裁剪压缩,给图片打水印等等操作
;extension=php_mbstring.dll--------大字符集,支持多字符集之间的转换
;extension=php_mcrypt.dll
;extension= php_mysql.dll
;extension=php_mysqli.dll
去掉分号,设置好需要加载的dll模块.以上几个是基本要去掉的。
wamp与lamp环境搭建的区别,就在于系统对php中的dll文件加载的方式的不同,
而对apahce与php的组合,window下与linux/unix下,基本相同的,都是修改httpd.conf与php.ini来实现。
因此,在实际的工作过程中,最快速的手动配置服务器的方法是:
1,手动安装apache服务器,手动安装配置php。
2,在以前配置好的php.ini与httpd.conf文件的基础,两文件直接copy到相关目录。
而对httpd.conf需修改其中的关键目录,主要是:
配置根目录
复制代码 代码如下:
DocumentRoot D:/wwwroot-----这是第一处,把红字部分,修改成 本地apache的网站代码主文件夹,即存放项目代码的主文件夹。
把这两处修改就基本搞定。
以上配置完,环境就基本搭建完毕了,希望小伙伴们能够喜欢。

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











MySQL and phpMyAdmin are powerful database management tools. 1) MySQL is used to create databases and tables, and to execute DML and SQL queries. 2) phpMyAdmin provides an intuitive interface for database management, table structure management, data operations and user permission management.

IIS and PHP are compatible and are implemented through FastCGI. 1.IIS forwards the .php file request to the FastCGI module through the configuration file. 2. The FastCGI module starts the PHP process to process requests to improve performance and stability. 3. In actual applications, you need to pay attention to configuration details, error debugging and performance optimization.

In MySQL, the function of foreign keys is to establish the relationship between tables and ensure the consistency and integrity of the data. Foreign keys maintain the effectiveness of data through reference integrity checks and cascading operations. Pay attention to performance optimization and avoid common errors when using them.

The main difference between MySQL and MariaDB is performance, functionality and license: 1. MySQL is developed by Oracle, and MariaDB is its fork. 2. MariaDB may perform better in high load environments. 3.MariaDB provides more storage engines and functions. 4.MySQL adopts a dual license, and MariaDB is completely open source. The existing infrastructure, performance requirements, functional requirements and license costs should be taken into account when choosing.

SQL is a standard language for managing relational databases, while MySQL is a database management system that uses SQL. SQL defines ways to interact with a database, including CRUD operations, while MySQL implements the SQL standard and provides additional features such as stored procedures and triggers.

Apache remains important in today's technology ecosystem. 1) In the fields of web services and big data processing, ApacheHTTPServer, Kafka and Hadoop are still the first choice. 2) In the future, we need to pay attention to cloud nativeization, performance optimization and ecosystem simplification to maintain competitiveness.

MySQL is suitable for rapid development and small and medium-sized applications, while Oracle is suitable for large enterprises and high availability needs. 1) MySQL is open source and easy to use, suitable for web applications and small and medium-sized enterprises. 2) Oracle is powerful and suitable for large enterprises and government agencies. 3) MySQL supports a variety of storage engines, and Oracle provides rich enterprise-level functions.

NGINX and Apache each have their own advantages and disadvantages, and the choice should be based on specific needs. 1.NGINX is suitable for high concurrency scenarios because of its asynchronous non-blocking architecture. 2. Apache is suitable for low-concurrency scenarios that require complex configurations, because of its modular design.
