帝王谷资源网 Design By www.wdxyy.com
I finally got this to work, so I will post my findings here.
//PHP 5 : Windows build needs a MySQL DLL
//PHP 5.0 doesn't come with mysql support... You have to get the librariesyourself...
//I think u can get them from mysql.com
// PHP 5 Beta 2
//The file php_mysql.dll comes with these snapshots, as well as a new version of libmySQL.dll,
//so I suggest a full upgrade to Beta 2 instead of just extracting php_mysql.dll for use with Beta 1.
--------------------------------------------------------
到 www.jetdown.com 下载下面三种软件,做好安装准备
apache_2.0.47-win32-x86-no_ssl.msi
mysql-4.0.14-win.zip
phpMyAdmin-2.5.3-rc1-php.zip
----------------------------------------------------------------------------------------------
PHP 5 Beta 2 http://snaps.php.net/win32/php5-win32-latest.zip size:5.87 MB (6,162,835 bytes)
----------------------------------------------------------------------------------------------
<1>安装配置PHP
1.解压缩PHP压缩包到C:\php\
2.复制C:\php\目录下的php4ts.dll及C:\php\dlls目录下的所有文件到windows安装目录的系统文件夹里
(win9x/me是system目录,winNT,2k/winXP,2003是system32目录)
复制C:\php\php.ini-dist到windows安装目录下(如:c:\windows),并将其改名为php.ini。用记事本打开,修改一下信息:
搜索extension_dir = ./ 这行,并将其路径指到你的PHP目录下的extensions目录,比如:
extension_dir = C:\php\extensions
如若想支持更多模块,,搜索:
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
下面都用分号在前面注释掉了支持的扩展模块,如果你想PHP支持某个模块,请将前面的“;”去掉即可
修改完成后,保存php.ini,到此完成PHP的安装和配置。
我们在下面加入一行
extension=php_mysql.dll
//Note 1: The extension dir need not be ".\", as Hermawan mentioned. It works fine for me with the extensions subdir where the other extensions are located.
//Note 2: The php.ini file need not be in the Apache root, as lars mentioned. It works fine for me in the Windows dir.
<2>安装Apach2
1.备份 C:\Program Files\Apache Group\Apache2\conf\httpd.conf 文件。
2.用记事本打开C:\Program Files\Apache Group\Apache2\conf\httpd.conf
找到:
#NameVirtualHost *
修改为:
NameVirtualHost 127.0.0.1 //或localhost
找到:
<VirtualHost 127.0.0.1>
修改下面几行:
ServerAdmin (你刚才安装时候输入的管理员信箱)
DocumentRoot C:\Program Files\Apache Group\Apache2\htdocs
ServerName Apache2
ErrorLog C:\Program Files\Apache Group\Apache2\logs\error_log
CustomLog C:\Program Files\Apache Group\Apache2\logs\access_log common
</VirtualHost>
找到:
AddType application/x-tar .tgz
在下面添加以下两行:
AddType application/x-httpd-php .php
AddType image/x-icon .ico
找到:
#LoadModule ssl_module modules/mod_ssl.so
在下面添加一行:
LoadModule php5_module C:\php\sapi\php4apache2.dll //这里php5_module是关键,如果php4_module apache就无法启动了
增加默认文件:
找到DirectoryIndex * 这行,可以这样修改,添加默认的文件名:
DirectoryIndex index.php default.php index.htm index.html default.htm default.html
保存文件,重起apache服务器。
最后,在该文件末尾加上下面两行
ScriptAlias /php/ "c:/php/"
Action application/x-httpd-php "/php/php.exe“
到此Apache的PHP环境已经完全建立了。
<3>测试:
用记事本新建个文件,写下下面几行,保存到C:\Program Files\Apache Group\Apache2\htdocs目录下,这个目录就是你的站点跟目录,命名为phpinfo.php.然后在浏览器中输入http://localhost/phpinfo.php 就可以看到想尽的关于PHP的信息了。
phpinfo.php代码如下:
<?php
phpinfo();
?>
<4>安装mysql
1.按默认安装在C:\mysql
Copy the following files to the Apache modules directory:
php\php4ts.dll
php\sapi\php4apache2.dll
php\dlls\iconv.dll
If any of these files are missing in the modules directory, Apache will fail to start.
Be sure the extension can find the following files:
php_mysql.dll
iconv.dll
libmySQL.dll
If any of them can't be found, Apache will start but will issue a warning like this: "Unknown(): Unable to load dynamic library 'c\php\extensions\php_mysql.dll" - The specified module could not be found."
php_mysql.dll should be in the extensions directory.
iconv.dll should be in the Apache modules directory.
libmySQL.dll must be either in the Apache root directory or the Windows system directory. I prefer the former because it's cleaner, as other applications don't necessarily use this MySQL library version.
Note 3: Be sure to use the libmySQL.dll file bundled with PHP. In my case, trying to use the libmySQL.dll from the MySQL 4.1 alpha package resulted in this error message: "Unknown(): Unable to load dynamic library 'c:\php\extensions\php_mysql.dll" - The specified procedure could not be found."
Start Apache and everything should be fine.
2.运行C:\mysql\bin\winmysqladmin.exe 设定user 和password
3.运行mysql,测试一下
mysql> show databases;
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+
如果出现以上画面,表明mysql已经安装成功;
2.更改MySQL系統之管理者密碼(新密碼的地方,換成您要設定的密碼)
mysql> UPDATE user SET password=password('新密碼') where user='root';
3.编辑php5中的启动文件php.ini,将mysql和php5连接起来.
mysql.default_port=
mysql.default_host=
mysql.default_user=
mysql.default_password=
改为:
mysql.default_port=3306 说明的是mysql的缺省端口一般为3306
mysql.default_host=localhost 说明的是mysql的缺省主机名称
mysql.default_user=jinchao 说明的是mysql的缺省的用户名(root是最高级用户)
mysql.default_password=666666 设置管理员的口令
修改完后将apache重启,查看phpinfo页面.
<5>安装phpmyadmin
修改 C:\Program Files\Apache Group\Apache2\htdocs\phpMyAdmin\config.inc.php
查找以下这么一段:
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
在这段之后再继续查找:
找到 $cfg['Servers'][$i]['auth_type'] = 'cookie'; 將 『 config 』改為 『 cookie 』或 『 http 』
找到$cfg['Servers'][$i]['host'] = 'localhost'; 视情况做相应修改
找到$cfg['Servers'][$i]['user'] = 'root'; 视情况做相应修改
找到$cfg['Servers'][$i]['password'] = ''; 视情况做相应修改
找到$cfg['Servers'][$i]['port'] = '3306'; 视情况做相应修改
//PHP 5 : Windows build needs a MySQL DLL
//PHP 5.0 doesn't come with mysql support... You have to get the librariesyourself...
//I think u can get them from mysql.com
// PHP 5 Beta 2
//The file php_mysql.dll comes with these snapshots, as well as a new version of libmySQL.dll,
//so I suggest a full upgrade to Beta 2 instead of just extracting php_mysql.dll for use with Beta 1.
--------------------------------------------------------
到 www.jetdown.com 下载下面三种软件,做好安装准备
apache_2.0.47-win32-x86-no_ssl.msi
mysql-4.0.14-win.zip
phpMyAdmin-2.5.3-rc1-php.zip
----------------------------------------------------------------------------------------------
PHP 5 Beta 2 http://snaps.php.net/win32/php5-win32-latest.zip size:5.87 MB (6,162,835 bytes)
----------------------------------------------------------------------------------------------
<1>安装配置PHP
1.解压缩PHP压缩包到C:\php\
2.复制C:\php\目录下的php4ts.dll及C:\php\dlls目录下的所有文件到windows安装目录的系统文件夹里
(win9x/me是system目录,winNT,2k/winXP,2003是system32目录)
复制C:\php\php.ini-dist到windows安装目录下(如:c:\windows),并将其改名为php.ini。用记事本打开,修改一下信息:
搜索extension_dir = ./ 这行,并将其路径指到你的PHP目录下的extensions目录,比如:
extension_dir = C:\php\extensions
如若想支持更多模块,,搜索:
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
下面都用分号在前面注释掉了支持的扩展模块,如果你想PHP支持某个模块,请将前面的“;”去掉即可
修改完成后,保存php.ini,到此完成PHP的安装和配置。
我们在下面加入一行
extension=php_mysql.dll
//Note 1: The extension dir need not be ".\", as Hermawan mentioned. It works fine for me with the extensions subdir where the other extensions are located.
//Note 2: The php.ini file need not be in the Apache root, as lars mentioned. It works fine for me in the Windows dir.
<2>安装Apach2
1.备份 C:\Program Files\Apache Group\Apache2\conf\httpd.conf 文件。
2.用记事本打开C:\Program Files\Apache Group\Apache2\conf\httpd.conf
找到:
#NameVirtualHost *
修改为:
NameVirtualHost 127.0.0.1 //或localhost
找到:
<VirtualHost 127.0.0.1>
修改下面几行:
ServerAdmin (你刚才安装时候输入的管理员信箱)
DocumentRoot C:\Program Files\Apache Group\Apache2\htdocs
ServerName Apache2
ErrorLog C:\Program Files\Apache Group\Apache2\logs\error_log
CustomLog C:\Program Files\Apache Group\Apache2\logs\access_log common
</VirtualHost>
找到:
AddType application/x-tar .tgz
在下面添加以下两行:
AddType application/x-httpd-php .php
AddType image/x-icon .ico
找到:
#LoadModule ssl_module modules/mod_ssl.so
在下面添加一行:
LoadModule php5_module C:\php\sapi\php4apache2.dll //这里php5_module是关键,如果php4_module apache就无法启动了
增加默认文件:
找到DirectoryIndex * 这行,可以这样修改,添加默认的文件名:
DirectoryIndex index.php default.php index.htm index.html default.htm default.html
保存文件,重起apache服务器。
最后,在该文件末尾加上下面两行
ScriptAlias /php/ "c:/php/"
Action application/x-httpd-php "/php/php.exe“
到此Apache的PHP环境已经完全建立了。
<3>测试:
用记事本新建个文件,写下下面几行,保存到C:\Program Files\Apache Group\Apache2\htdocs目录下,这个目录就是你的站点跟目录,命名为phpinfo.php.然后在浏览器中输入http://localhost/phpinfo.php 就可以看到想尽的关于PHP的信息了。
phpinfo.php代码如下:
<?php
phpinfo();
?>
<4>安装mysql
1.按默认安装在C:\mysql
Copy the following files to the Apache modules directory:
php\php4ts.dll
php\sapi\php4apache2.dll
php\dlls\iconv.dll
If any of these files are missing in the modules directory, Apache will fail to start.
Be sure the extension can find the following files:
php_mysql.dll
iconv.dll
libmySQL.dll
If any of them can't be found, Apache will start but will issue a warning like this: "Unknown(): Unable to load dynamic library 'c\php\extensions\php_mysql.dll" - The specified module could not be found."
php_mysql.dll should be in the extensions directory.
iconv.dll should be in the Apache modules directory.
libmySQL.dll must be either in the Apache root directory or the Windows system directory. I prefer the former because it's cleaner, as other applications don't necessarily use this MySQL library version.
Note 3: Be sure to use the libmySQL.dll file bundled with PHP. In my case, trying to use the libmySQL.dll from the MySQL 4.1 alpha package resulted in this error message: "Unknown(): Unable to load dynamic library 'c:\php\extensions\php_mysql.dll" - The specified procedure could not be found."
Start Apache and everything should be fine.
2.运行C:\mysql\bin\winmysqladmin.exe 设定user 和password
3.运行mysql,测试一下
mysql> show databases;
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+
如果出现以上画面,表明mysql已经安装成功;
2.更改MySQL系統之管理者密碼(新密碼的地方,換成您要設定的密碼)
mysql> UPDATE user SET password=password('新密碼') where user='root';
3.编辑php5中的启动文件php.ini,将mysql和php5连接起来.
mysql.default_port=
mysql.default_host=
mysql.default_user=
mysql.default_password=
改为:
mysql.default_port=3306 说明的是mysql的缺省端口一般为3306
mysql.default_host=localhost 说明的是mysql的缺省主机名称
mysql.default_user=jinchao 说明的是mysql的缺省的用户名(root是最高级用户)
mysql.default_password=666666 设置管理员的口令
修改完后将apache重启,查看phpinfo页面.
<5>安装phpmyadmin
修改 C:\Program Files\Apache Group\Apache2\htdocs\phpMyAdmin\config.inc.php
查找以下这么一段:
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
在这段之后再继续查找:
找到 $cfg['Servers'][$i]['auth_type'] = 'cookie'; 將 『 config 』改為 『 cookie 』或 『 http 』
找到$cfg['Servers'][$i]['host'] = 'localhost'; 视情况做相应修改
找到$cfg['Servers'][$i]['user'] = 'root'; 视情况做相应修改
找到$cfg['Servers'][$i]['password'] = ''; 视情况做相应修改
找到$cfg['Servers'][$i]['port'] = '3306'; 视情况做相应修改
标签:
php
帝王谷资源网 Design By www.wdxyy.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
帝王谷资源网 Design By www.wdxyy.com
暂无评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。
更新日志
2024年12月29日
2024年12月29日
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]