Home php教程 php手册 PHP环境搭建工具

PHP环境搭建工具

Jun 13, 2016 am 11:34 AM
php word xampp introduce use Install tool Jianhe build local environment

  一直使用XAMPP搭建本地PHP环境,之前还介绍过本地XAMPP搭建和安装Wordpress和如何让本地XAMPP支持Rewrite重 定向,但最近我的XAMPP出现很多灵异现象,先是每次安装后用上一两天页面就会变成500,卸载重装甚至重装系统又全新安装都无法启动Apache和 Mysql(非端口问题)。于是寻找一些其它PHP本地环境搭建工具。

  7款本地PHP环境搭建工具

  1. XAMPP

  XAMPP是一款比较强大的本地测试平台,它集成了必须的三个功能,还带有 FileZilla,软件带有一个控制面板,在里面可以把Apache、MySql和FileZilla三者注册为系统服务或者卸载服务,有服务启动的控 制按钮,而且在窗口下部还能看到服务的运行信息。虽说面板是英文的,但清楚易懂。注册为系统服务有个好处就是开机能够自动运行,但是会消耗一定的系统资 源,怎么取舍用户自己来定。安装成功,服务也启动成功后,就可以把浏览器打开输入http://localhost/,试试是否成功。在XAMPP的网页 选项里,有中文支持。

  2. Wamp Server

  它的官方网站没有中文,但是程序支持中文。启动安装程序后,它会提示你请先卸载旧版,不支持 覆盖式的升级,然后一路NEXT就能安装成功。它在任务托盘里有个图标,如果服务启动异常,它就是红色的;如果部分异常,它就变成黄色;如果是一切正常, 那么它就变成了白色。这些不同的颜色警示,你很容易判断当前你的localhost能不能打开。它还能切换在线和离线状态,选项中的文语言项中也有简体中 文可选,很不错。

  3. Vertrigo Server

  这是一个轻量级的WAMP环境,但是你下载它的时候,迅雷自带的安全组件居然说它带有病毒。 经过我的扫描(ESS3.0)和使用来看,这完全是个误报,所以大家可以放心使用。安装一路NEXT就行,其中PhpMyAdmin中居然还有原始密码, 是vertrigo,感觉在本地测试的话,这种默认没有必要。它带有一个简单的控制面板,运行状态也一目了然。

  在它的localhost页面中带有常用链接,很方便。

  4. PHPNow

  PHPNow真的很简单,简单到安装程序就是用RAR做的一个自解压程序。自释放后快捷方式 也没有,你必须自己找到那个文件存放的文件夹,然后运行Init.cmd这个程序来初始化。初始化过程中提示设置密码,因为是在CMD命令行中,只设计了 一次密码输入,没有密码确认项,所以请设置的时候千万小心,不要忘了。它也把式Apache和MySql注册为服务,开机自启动。

  在程序文件夹中,它也带有控制面板,只不过是CMD的,但很好用。

  卸载就更容易了,在软件自带的控制面板中卸载服务,然后关把整个文件夹删掉就行。这么方便,图简便的可以试试。

  5. PHPStudy

  PHPStudy不一样,它含有IIS+PHP和Apache+PHP,软件推荐设置是后者。在任务托盘里也有图标,可以打开面板来看服务运行状态,也很简洁。

  打开localhost,出现的是标准的PHP信息界面。

  6. AppServ

  程序安装过程中它提示你可以改变默认的80端口为服务端口,这样可以避免端口共享产生的冲 突。可有密码设置提示,但是做得比PHPNow好多了,软件还可以设置字符集,默认为UTF-8。虽然软件没有控制面板,但一切操作都在开始菜单中加入了 快捷方式,使用当然很方便。软件还带有MySql命令行终端。

  7. EasyPHP

  软件如其名,真的很EASY!安装一路NEXT,但是不会把Apache和MySql加载为服务,所以每次使用都要手工来启动。软件也带简单的控制面板,其他的没什么要说的了。

  注:以上介绍原文出自linxo.cn,不过该网站已不在,就不列出原文地址了。

  常见的两个问题

  其实我只使用过XAMPP和EasyPHP,但一般都大同小异,最常碰到的两个问题就是由于端口问题无法启动Apache,和无法在本地实现Rewrite。

  1. 由于端口问题无法启动Apache

  如果是由于端口问题无法启动Apache, 那就关闭其它程序,一个一个的试,确定是哪个占用了80端口,最常见的就是迅雷。

  2. 本地开启Rewrite模块

  其它是否适用我不知道。XAMPP和EasyPHP, 找到httpd.conf这个文件,打开编辑,把所有的AllowOverride None换成AllowOverride All, 再把#LoadModule rewrite_module modules/mod_rewrite.so前面的”#”号去掉即可。

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

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)

Explain the match expression (PHP 8 ) and how it differs from switch. Explain the match expression (PHP 8 ) and how it differs from switch. Apr 06, 2025 am 12:03 AM

In PHP8, match expressions are a new control structure that returns different results based on the value of the expression. 1) It is similar to a switch statement, but returns a value instead of an execution statement block. 2) The match expression is strictly compared (===), which improves security. 3) It avoids possible break omissions in switch statements and enhances the simplicity and readability of the code.

Does H5 page production require continuous maintenance? Does H5 page production require continuous maintenance? Apr 05, 2025 pm 11:27 PM

The H5 page needs to be maintained continuously, because of factors such as code vulnerabilities, browser compatibility, performance optimization, security updates and user experience improvements. Effective maintenance methods include establishing a complete testing system, using version control tools, regularly monitoring page performance, collecting user feedback and formulating maintenance plans.

Why are the purple slashed areas in the Flex layout mistakenly considered 'overflow space'? Why are the purple slashed areas in the Flex layout mistakenly considered 'overflow space'? Apr 05, 2025 pm 05:51 PM

Questions about purple slash areas in Flex layouts When using Flex layouts, you may encounter some confusing phenomena, such as in the developer tools (d...

What is Cross-Site Request Forgery (CSRF) and how do you implement CSRF protection in PHP? What is Cross-Site Request Forgery (CSRF) and how do you implement CSRF protection in PHP? Apr 07, 2025 am 12:02 AM

In PHP, you can effectively prevent CSRF attacks by using unpredictable tokens. Specific methods include: 1. Generate and embed CSRF tokens in the form; 2. Verify the validity of the token when processing the request.

Describe the purpose and usage of the ... (splat) operator in PHP function arguments and array unpacking. Describe the purpose and usage of the ... (splat) operator in PHP function arguments and array unpacking. Apr 06, 2025 am 12:07 AM

The... (splat) operator in PHP is used to unpack function parameters and arrays, improving code simplicity and efficiency. 1) Function parameter unpacking: Pass the array element as a parameter to the function. 2) Array unpacking: Unpack an array into another array or as a function parameter.

How can you prevent a class from being extended or a method from being overridden in PHP? (final keyword) How can you prevent a class from being extended or a method from being overridden in PHP? (final keyword) Apr 08, 2025 am 12:03 AM

In PHP, the final keyword is used to prevent classes from being inherited and methods being overwritten. 1) When marking the class as final, the class cannot be inherited. 2) When marking the method as final, the method cannot be rewritten by the subclass. Using final keywords ensures the stability and security of your code.

Why does negative margins not take effect in some cases? How to solve this problem? Why does negative margins not take effect in some cases? How to solve this problem? Apr 05, 2025 pm 10:18 PM

Why do negative margins not take effect in some cases? During programming, negative margins in CSS (negative...

Why do negative margins not take effect in some cases? Why do negative margins not take effect in some cases? Apr 05, 2025 pm 04:09 PM

Why do negative margins not take effect in some cases? When using CSS to layout web pages, you often encounter negative margins (negative...

See all articles