Windows下搭建x64 PHP的开发测试环境
来源:互联网 发布:我的世界凋零风暴js 编辑:程序博客网 时间:2024/05/20 14:28
Windows下搭建x64 PHP的开发测试环境
由于测试zencart,需要在windows上搭建环境。我喜欢手工搭建开发环境,没有使用WampServer、PHPStudy等的集成开发环境。折腾一下也利于了解各组件使用,关键是自由度高,版本自选。
软件下载
由于官方基本都没有提供x64版本,所以软件都是其他第三方编译提供的,我选择的都是非安装包。
- Apache 下载 httpd-win64-2.2.19 msi安装版本
- MySQL 下载 MySQL-5.6.16-win64
- PHP 下载 php-5.4.12-Win32-VC9-x64
解压整合
将所有软件解压到C盘根目录。如C:\Apache22 , C:\mysql-5.6.15,C:\php-5.4.12-x64
安装httpd、mysql服务
cmd管理员模式进入Apache22\bin,执行:
httpd.exe -k install
进入mysql-5.6.15\bin,执行
mysqld.exe –install mysql –defaults-file=C:\mysql-5.6.15\my.ini
修改配置文件
修改httpd.conf:
- ServerRoot “/Apache22” 改为 ServerRoot “C:/Apache22”
- DocumentRoot “/Apache22/htdocs” 改为 DocumentRoot “D:/PHPWEB”
#“D:/PHPWEB” 为zencart的存放目录
紧跟的Deny from all 改为 Allow from all- Directory “/Apache22/htdocs” 改为 Directory “D:/PHPWEB”
- DirectoryIndex index.html 改为 DirectoryIndex index.php index.html
- ScriptAlias /cgi-bin/ “/Apache22/cgi-bin/” 改为 ScriptAlias /cgi-bin/ “C:/Apache22/cgi-bin/”
- Directory “/Apache22/cgi-bin” 改为 Directory “C:/Apache22/cgi-bin”
- 屏蔽 Include conf/extra/httpd-ahssl.conf,httpd-ahssl.conf文件内的路径都有问题,没有ssl需求可以屏蔽
- 在LoadModule的最后增加:
- LoadModule php5_module “C:/php-5.4.12-x64/php5apache2_2.dll”
- PHPIniDir “C:/php-5.4.12-x64”
- AddType application/x-httpd-php .php
启动Apache服务:
httpd.exe -k start
修改my.ini:
- 增加 :
- basedir = C:/mysql-5.6.15
- datadir = C:/mysql-5.6.15/data
- character_set_server = utf8
- [mysql] 的default-character-set也保持默认值,改成utf8时,zencart进入后台管理时会报:
- WARNING: An Error occurred, please refresh the page and try again.
启动MySQL服务:
net start mysql
增加一个名为zencart的库。
修改php.ini
- 启用extension_dir =ext” ,并将ext改为”C:/php-5.4.12-x64/ext”
- 启用几个扩展:
- extension=php_curl.dll
- extension=php_gd2.dll
- extension=php_mbstring.dll
- extension=php_mysql.dll
- extension=php_mysqli.dll
#zencart需要用此来连接MySQL数据库
- extension=php_xmlrpc.dll
配置文件修改完成,重启Apache服务:
httpd.exe -k restart
测试验证
我借用了phpStudy的l.php作为测试用例。
最后是zencart的安装检查页面:
环境搭建完成!!
1 0
- Windows下搭建x64 PHP的开发测试环境
- windows下php开发环境的搭建
- 搭建windows下的php开发环境
- windows下PHP开发环境的搭建
- 基于Windows环境下的PHP开发环境搭建
- 基于Windows环境下的PHP开发环境搭建
- 基于Windows环境下的PHP开发环境搭建
- Windows环境下搭建PHP开发环境
- Windows下搭建appium+python的测试开发环境
- Windows下搭建appium+python的测试开发环境
- Windows x64 Android开发环境搭建
- 搭建Windows下基于Eclipse的PHP开发环境
- 搭建Windows下基于Eclipse的PHP开发环境
- 搭建Windows下基于Eclipse的PHP开发环境
- 搭建Windows下基于Eclipse 的 PHP 开发环境
- 搭建Windows下基于Eclipse 的 PHP 开发环境
- 搭建 Windows 下基于 Eclipse 的 PHP 开发环境
- Windows平台下PHP开发环境的快速搭建
- django函数HttpResponse
- ubuntu11.10下编译openwrt的环境配置
- 创建及删除索引
- RTSP协议分析-3
- UVA - 818 Cutting Chains 暴力
- Windows下搭建x64 PHP的开发测试环境
- 剑指offer-4 替换空格
- UICollectionView入门--使用系统UICollectionViewFlowLayout布局类
- 利用Selenium Webdriver 2.0 实现通过Web上传文件
- 利用Selenium Webdriver 2.0 实现从Web自动保存文件到本地
- IE下javascript获取文件大小
- ActiveAndroid 源码阅读笔记 (2)
- spring 邮件发送
- 操作系统网关的设置不会影响到11.2 RAC