Win XP下全新安装Apache2,PHP5,MYSQL5,Zend的
看PHP,MYSQL,都出了新版本,想尝尝鲜,就试着安装了一下,然后把安装过程记了下来,希望能对学习PHP的新手有些帮助,斑竹可以考虑精一下了 Windows XP下全新安装Apache2,PHP5,MYSQL5,Zend的简单过程 一、下载地址: Apache2.0.50 :http://httpd.apache.org/download.cgi PHP5.0.2 :http://cn2.php.net/get/php-5.0.2-Win32.zip/from/a/mirror MYSQL5.0.2:http://dev.mysql.com/downloads/mysql/5.0.html Zend2.5.2 :http://www.zend.com/store/free_download.php?pid=13] 软件的安装偶就不说了,其中只有PHP下的是zip包,直接解压就可以了。 安装顺序就是上面列出来的顺序,Zend我是最后等所有的运行都没问题后才装的。
二、简单安装过程: (一)Apache: Apache2.0.50的安装很简单,我就直接把他装到了E盘根目录下(我C盘是系统盘,D盘是temp盘,偶发现在windows下单独拿个分区来做临时文件的存放地对系统的速度影响不小,这样做能提升系统运行的速度,感兴趣的朋友可以试试看),安装完后我的apache目录就是E:apache2 (二)PHP: 我是直接解压缩放到E盘php目录下了,这样查找文件会方便许多。 (三)Mysql: 直接装到E:mysql下,它的默认目录太长,是在C盘下的,偶的C盘是除windows的文件外别的一概不放的。 (四)Zend: 所有的调试都正常后我把Zend装到了E:program fileszend下 三、配置过程: (一)http.conf 这个文件我改了几个地方: 把PHP直接作为apache的一个模块运行,我在里面加了两句: CODE: [Copy to clipboard] LoadModule php5_module "E:/php/php5apache2.dll" AddType application/x-httpd-php .php 我在E:apache2目录下建立了一个www的目录用于存放我的站点文件,在http.conf里改了这样一句话: 把DocumentRoot "E:/Apache2/htdocs"改成了DocumentRoot "E:/Apache2/www" Apache2.0.x于1.3.x相比2.0.x默认不能直接列目录,偶感觉不爽,就改了: 把DocumentRoot "E:/Apache2/www"这句下的如下语句 CODE: [Copy to clipboard] Options FollowSymLinks AllowOverride None 改为: CODE: [Copy to clipboard] Options Indexes FollowSymLinks AllowOverride None 把apache的默认字符设置为中文简体: AddDefaultCharset GB2312 修改目录的默认首页: DirectoryIndex 后面写上你想设置为首页的文件名,如:index.html index.php等 别的就没再动什么地方 注意一点的是,要使这些配置生效需要重新启动apache (二)php.ini 以前用php4.x的时候觉得配置起来很简单,所以偶用PHP5也直接那么配了,谁知道完了mysql不能用,说是无法连接动态库,我仔细检查了一下 php_mysql.dll明明存在,可就说找不到,这点让我郁闷了N久,偶重新解压了php5也没用,后来在php的install文档里发现了这么一句话: php_mysql.dll MySQL functions PHP >= 5.0.0, requires libmysql.dll (bundled) 于是偶才找到了原因...... 配置php5.0.2是这样来过的: 把php.ini-dist复制到C:windows 下改名为 php.ini(装过php的都做过吧) 然后修改了几个地方: extension_dir = "E:phpext" (指定动态连接库的目录,php5和php4不同的地方就是它的动态连接库目录变了,这在它的文档结构里有详细的说明) 然后把下面几句前面的分号去掉 ;extension=php_dba.dll ;extension=php_dbase.dll ;extension=php_filepro.dll ;extension=php_gd2.dll ;extension=php_imap.dll ;extension=php_mysql.dll 接下来修改了一些文件上传以及内存使用最大限制: memory_limit = 20M post_max_size = 20M upload_max_filesize = 20M 别的就没改什么了,这里修改过php.ini以后也要重新启动apache 接下来一点很重要的就是把php目录下的 libmysql.dll 和 libmysqli.dll 复制到windows/system32下,如果不这样做,mysql动态连接库就无法正常加载。 (三)Mysql和Zend的配置 现在Apache和PHP都已经配置好了,在浏览器里输入localhost看看结果,运行成功,然后输入localhost/phpmyadmin看也成功。郁闷,Phpmyadmin提示错误信息: QUOTE: MySQL 返回: #1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client 奇怪了,偶明明装的是MYSQL最新版本怎么会客户端版本过低呢,真是郁闷啊 就此放了一下,经多次测试仍然不成功就先放弃了一下,玩了一把KOF97 然后在CCF.熊猫和IM286.ceo的帮助下,终于找到了原因: 落伍ceo:“升级客户端 新版本的mysql使用了新的密码验证方法 设置mysql密码时使用old_password可以解决这个问题” CCF.熊猫:“使用old_password”重新设定密码就可以了”。 感谢这两位朋友,具体解决办法如下: 由于偶不知道怎么升级client,因为在windows 下 server和client是捆绑安装的,我就用了old_password的方法: QUOTE: mysql> UPDATE mysql.user SET Password = OLD_PASSWORD(newpwd) -> WHERE Host = some_host AND User = some_user; mysql> FLUSH PRIVILEGES; 然后浏览“http://localhost/phpmyadmin”,OH YEAH! 测试成功!

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

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

Laravel is a PHP framework for easy building of web applications. It provides a range of powerful features including: Installation: Install the Laravel CLI globally with Composer and create applications in the project directory. Routing: Define the relationship between the URL and the handler in routes/web.php. View: Create a view in resources/views to render the application's interface. Database Integration: Provides out-of-the-box integration with databases such as MySQL and uses migration to create and modify tables. Model and Controller: The model represents the database entity and the controller processes HTTP requests.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

I encountered a tricky problem when developing a small application: the need to quickly integrate a lightweight database operation library. After trying multiple libraries, I found that they either have too much functionality or are not very compatible. Eventually, I found minii/db, a simplified version based on Yii2 that solved my problem perfectly.

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.

Article summary: This article provides detailed step-by-step instructions to guide readers on how to easily install the Laravel framework. Laravel is a powerful PHP framework that speeds up the development process of web applications. This tutorial covers the installation process from system requirements to configuring databases and setting up routing. By following these steps, readers can quickly and efficiently lay a solid foundation for their Laravel project.

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.
