Home php教程 php手册 Win XP下全新安装Apache2,PHP5,MYSQL5,Zend的

Win XP下全新安装Apache2,PHP5,MYSQL5,Zend的

Jun 13, 2016 am 10:26 AM
mysql php php5 win zend Down brand new Install new version of look

看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! 测试成功!

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

Video Face Swap

Video Face Swap

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

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)

PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

MySQL: An Introduction to the World's Most Popular Database MySQL: An Introduction to the World's Most Popular Database Apr 12, 2025 am 12:18 AM

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

PHP's Current Status: A Look at Web Development Trends PHP's Current Status: A Look at Web Development Trends Apr 13, 2025 am 12:20 AM

PHP remains important in modern web development, especially in content management and e-commerce platforms. 1) PHP has a rich ecosystem and strong framework support, such as Laravel and Symfony. 2) Performance optimization can be achieved through OPcache and Nginx. 3) PHP8.0 introduces JIT compiler to improve performance. 4) Cloud-native applications are deployed through Docker and Kubernetes to improve flexibility and scalability.

Why Use MySQL? Benefits and Advantages Why Use MySQL? Benefits and Advantages Apr 12, 2025 am 12:17 AM

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

PHP: The Foundation of Many Websites PHP: The Foundation of Many Websites Apr 13, 2025 am 12:07 AM

The reasons why PHP is the preferred technology stack for many websites include its ease of use, strong community support, and widespread use. 1) Easy to learn and use, suitable for beginners. 2) Have a huge developer community and rich resources. 3) Widely used in WordPress, Drupal and other platforms. 4) Integrate tightly with web servers to simplify development deployment.

PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

The Enduring Relevance of PHP: Is It Still Alive? The Enduring Relevance of PHP: Is It Still Alive? Apr 14, 2025 am 12:12 AM

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

MySQL's Place: Databases and Programming MySQL's Place: Databases and Programming Apr 13, 2025 am 12:18 AM

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

See all articles