最近开始玩php,把配置步骤写下来,以免以后忘记

首先去官网下载php5.5,apache2.4,mysql5.6,注意要下载windows环境64位的免安装版,

然后把3个文件夹都解压到c盘,即c:/Apache24,c:/php,c:/mysql-5.6.25-winx64

之所以解压到c盘,是因为这样可以少修改很多配置,避免出错

打开c:/Apache24,搜索“Listen 80”,去掉双引号,修改端口为8090,然后再最后加上如下配置关联php

# php5 support
LoadModule php5_module c:/php/php5apache2_4.dll
AddType application/x-httpd-php .php .html .htm
# configure thepath to php.ini
PHPIniDir "c:/php"
登录后复制

找到c:/php/php.ini-development,复制一份更名为php.ini,打开php.ini
登录后复制

找到

; extension_dir = "ext"

把前面的;去了

找到

;extension=php_mysql.dll
;extension=php_mysqli.dll

把前面的;分别去了

然后再最后添加对xdebug的支持

[Xdebug]
zend_extension="C:/php/ext/php_xdebug-2.3.3-5.5-vc11-x86_64.dll"
xdebug.idekey="PhpStorm"
xdebug.remote_enable =1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_mode = "req"
xdebug.remote_port = 9000

php_xdebug-2.3.3-5.5-vc11-x86_64.dll需要另外下载,下载完后放到这个目录下

下载安装phpstorm,运行后,找到file->settings->language&frameworks->php

先配置interpreter,就是选择php的根目录

然后进入dubug->gbgp proxy,

ide key填PhpStorm

Host填localhost

prot填9001

最后如果你是用chrome来debug,下载xdebug hepler

如果你是用firefox,下载easy xdebug

下载完后需要配置他们的ide key 为PhpStorm

以上就介绍了php55+apache24+mysql56+xdebug配置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

09-18 01:19