爱程序网

Drupal7网站+IIS7.0+PHP+MySql

来源: 阅读:

1.服务器系统环境Windows Server 2008 R2 Enterprise 64位操作系统2.所需软件IIS7PHPManager      http://phpmanager.codeplex.com/releases/view/69115php-5.5.25-Win32-VC11-x64    下载地址:http://windows.php.net/download/mysql-installer-community-5.5.28.3.msi        下载地址:http://dev.mysql.com/downloads/installer/Navicat_for_MySQL_10.0.11.0_XiaZaiBa.exe    下载地址:vcredist_x64.exe(msvcr110.dll)备注:安装IIS+PHPManager+PHP教程步骤地址:http://jingyan.baidu.com/article/f0e83a25a86cb022e59101be.html   http://blog.csdn.net/zevin/article/details/69289733.配置PHP环境    1).下载的包(php-5.5.25-Win32-VC11-x64)直接解压缩到c:。复制其中的php-development.ini为php.ini    2).打开php.ini文件    3).修改扩展路径:extension_dir = "c:php-5.5.25-Win32-VC11-x64ext" (这里写自己的实际路径,注意:去掉前面的;分号)    4).开启以下模块(php_curl.dll  php_mysql.dll   php_mysqli.dll php_pdo_mysql.dll  php_xmlrpc.dll   php_curl.dll)    5)修改date.timezone = "Asia/Shanghai"4.配置MySql环境    1).找到你的mysql目录下的my.ini配置文件(文件路径:C:ProgramDataMySQLMySQL Server 5.5my.ini),加入或者修改以下代码(还原时mysql出错:Msg] 2006 - MySQL server has gone away)        max_allowed_packet=500M; wait_timeout=288000; interactive_timeout = 288000;        自己看情况更改数值,最后记得重启你的mysql服务5.IIS上发布网站6.通过Navicat_for_MySQL_10软件创建数据库,并导入网站数据(通过备份、还原的方式导入数据)7.修改网站的数据库链接配置    打开,网站根目录sitesdefaultsettings.php找到下面代码        $databases = array (          'default' =>           array (            'default' =>             array (              'database' => '第6步创建的数据库名称',              'username' => 'root',              'password' => '****',              'host' => 'localhost',              'port' => '',              'driver' => 'mysql',              'prefix' => '',            ),          ),        );8.浏览器中访问发布的网站9.常见问题(参考网址:http://blog.sina.com.cn/s/blog_5093fd500102vkob.html)HTTP 错误 500.0 - Internal Server Error E:Program Filesphpphp-cgi.exe - FastCGI 进程超过了配置的活动超时时限网上一搜,解决方案如下:使用%WINDIR%system32inetsrvappcmd.exe list config /section:fastcgi /text:*获得当前配置CONFIG   CONFIG.SECTION:"system.webServer/fastCgi"   path:"MACHINE/WEBROOT/APPHOST"   overrideMode:"Inherit"   locked:"false"   [system.webServer/fastCgi]     [application]       fullPath:"E:Program Filesphpphp-cgi.exe"       arguments:""       maxInstances:"4"       idleTimeout:"300"       activityTimeout:"30"       requestTimeout:"90"       instanceMaxRequests:"200"       protocol:"NamedPipe"       queueLength:"1000"       flushNamedPipe:"false"       rapidFailsPerMinute:"10"       [environmentVariables]使用appcmd set config -section:system.webServer/fastCgi /[fullPath='E:Program Filesphpphp-cgi.exe'].activityTimeout:600将超时时限改成10分钟(最大可以设到1小时)可是报错:ERROR ( message:找不到带有标识符“Filesphpphp-cgi.exe'].activityTimeout:600”的 SITE 对象。 )所有搜到的中文网站php-cgi.exe的路径都没有空格,但是我的偏偏就有,执行不了。最后跑到老外的网上找到了解决办法:%windir%system32inetsrvappcmd set config /section:system.webServer/fastCGI "/[fullPath='E:Program Filesphpphp-cgi.exe'].activityTimeout:600"二、%windir%system32inetsrvappcmd set config -section:system.webServer/fastCgi /[fullPath='C:phpphp-cgi.exe'].activityTimeout:600如果还是不行,请查看IIS应用程序池,可以改为默认(DefaultAppPool)。三、%windir%system32inetsrvappcmd set config -section:system.webServer/fastCgi /[fullPath='C:phpphp-cgi.exe'].activityTimeout:600  查看当前配置%windir%system32inetsrvappcmd list config -section:system.webServer/fastCgi都是在cmd下运行也可以在C:WindowsSystem32inetsrvconfigapplicationHost.config 进行编辑

 

相关文章列表:
关于爱程序网 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助