PHP的安装,开发环境的搭建
近日对PHP产生了浓厚的兴趣,遂决定学习一下。首先是安装。
第一步,安装Apache
从apache下载Apache2.2安装包,安装,运行,浏览器输入地址127.0.0.1:8080,出现“It Works!”,安装成功。
第二步,安装PHP5
从cn2.php.net下载windows安装包,运行安装,看到选择扩展的界面,想当然的全部选择,安装OK。再运行Apache,报错,缺少DLL,不能启动PHP。看来扩展不是随便选择的,再次运行安装程序,取消所有扩展,再次运行Apache,OK。写一个页面,加入,浏览器打开,It‘s OK。
安装phpmyadmin吧,google了一个安装包下载,解压到apache htdocs目录,运行,提示没有安装MySQL扩展,Easy,再度运行安装程序,修改安装选项,加上MySQL扩展,然后再度运行phpmyadmin,还是提示没有MySQL扩展。嗯,没有任何事情是简单的。
查看PHP文档,说最好的安装方式是手动安装,怀疑是安装包的问题,卸载,下载PHP手动安装包,解压,按照文档说明,在httpd.conf中加入
# 配置 php.ini 的路径
PHPIniDir "C:/php5/"
# 对 PHP 5 用这两行:
LoadModule php5_module "c:/php5/php5apache2_2.dll"
AddType application/x-httpd-php .php
,然后复制php.ini-dist为php.ini,去掉GD2,MySQL扩展前面的分号,启动apache,运行phpmyadmin,还是提示没有MySQL扩展。仔细检查安装过程,C:/PHP5加到了环境变量Path中,php.ini中extension_path也更改了,httpd.conf中也加入了PHPIniDir,C:/PHP5/中也确实存在libmysql.dll文件,完全符合文档的描述,也没有什么疏漏,就是找不到。崩溃ing
参绕了好几天,google无数次,也没有搞定,后来病急乱投医,将libmysql.dll拷贝到Windowssystem32下面,MySQL扩展安装成功。晕倒,文档中说不建议拷贝php5ts.dll 到系统目录,将PHP目录加到PATH 环境变量就可以找到DLL,看来只是能找到php5ts.dll,找不到扩展所需的DLL?
三、搭建开发环境
我的首选当然是Eclipse了,下载PDT,代码提示、自动完成没什么问题,试一试Debug能力吧,打开Eclipse的帮助,找到PDT Debug一节,按照帮助提示试了试调试功能,

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.

Safely handle functions and regular expressions in JSON In front-end development, JavaScript is often required...

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.

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.

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.

Display and processing of percentage numbers in Java In Java programming, the need to process and display percentage numbers is very common, for example, when processing Excel tables...

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.
