以前写的Vista x64配置,Windows升级了,也升级一下,添加了必要的更改:
Cgi配置:
首先下载ActivePerl x64:http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.8.822-MSWin32-x64-280952.msi
双击安装,完毕后你的空间已经支持.pl了,环境变量,包括映射都为你做好了,若你还想支持.cgi,那么只需要打开Handler Mappings进行如下操作
Request path:*.cgi
Executable:F:/Perl64/bin/perl.exe "%s" %s
Name:AboMapperCustom-60185-CGI即可完成空间支持cgi操作
将以下代码保存为env.pl或env.cgi分别放入空间下,出现如图即成功
#!/usr/local/ActivePerl-5.6/bin/perl -w
#
# env.pl
#
# This script dumps the environment variables in HTML format
use strict;
use warnings;
$|=1;
print "Content-type:text/html/n/n";
foreach my $var (sort keys %ENV) {
print $var . "=" . $ENV{$var} . "<br>/n";
}
另外要说的是你的磁盘除了System/Adimnistrators外还应该给一个Users权限,不然不会成功
PHP配置:
首先让我们开启iis7.0,在命令符中输入下列命令:
start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;IIS-FTPPublishingService;IIS-FTPServer;IIS-FTPManagement;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI
下文中无意外,我将PHP、MySQL、Zend装在F盘:
打开我的电脑->属性->高级系统设置->环境变量里,添加上可执行文件的查找路径(PATH)和 php.ini 的查找路径(PHPRC):
F:/php;F:/php/ext;
接下来是PHP的配置,建议下载压缩包,随便解压到任何一个位置,比如我放在F:/php下,编辑文件夹里的php.ini-dist文件,
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mysql.dll
去掉前面的分号,至此已经支持gd库
将 extension_dir = "./"
改为 extension_dir = "F:/php/ext/"