本文共 2770 字,大约阅读时间需要 9 分钟。
学习环境安装,有几种
1.WAMPServer
http://www.wampserver.com/en/
wampserver 2.5 (PHP5.5)
不能在windowsxp上面安装
可以在windows server2008上面安装
由于原先已经有了一个apache服务器,也已经有了一个mysql server;
所以apache不使用80端口而是8072(8070已经被apache占用);
mysql使用端口3308(原先的mysql使用端口3306)
配置文件
httpd.conf
#Listen 12.34.56.78:80Listen 0.0.0.0:8072Listen [::0]:8072ServerAdmin cajan2@163.comServerName localhost:8072 AllowOverride none Require all denied Allow from all
my.ini
[client]port = 3308# The MySQL server[wampmysqld]port = 3308# Change your locale here !#lc-messages=fr_FRlc-messages=en_US[mysqld]port=3308
config.inc.php $cfg['Servers'][$i]['user'] = 'root';$cfg['Servers'][$i]['password'] = '';/* Server parameters */$cfg['Servers'][$i]['host'] = '127.0.0.1';$cfg['Servers'][$i]['port'] ='3308';
2.
appserv
http://appservnetwork.com/
2.5.10
AppServ 2.5.10
apache
8070MySQL
root/root
revoke all on books.* from bookorama;revoke all on books.* from bookadmin;grant select,insert,update,delete,index,alter,create,drop on books.* to sally@localhost;grant select,insert,update,delete,index,alter,create,drop on books.* to bookorama@localhost identified by 'bookoroma123';grant select,insert,update,delete,index,alter,create,drop on books.* to bookorama identified by 'bookoroma';show grants;查看其他 MySQL 用户权限:show grants for bookorama@localhost;use mysql;UPDATE mysql.user SET password=PASSWORD('xxxxxxx') WHERE user='root';UPDATE mysql.user SET password=PASSWORD('bookoroma123') WHERE user='bookorama' AND host='localhost';UPDATE mysql.user SET password=PASSWORD('') WHERE user='bookorama' AND host='localhost';
php作为apache的一个扩展模块,修改apache或者php的配置文件,都需要重启apache。
学习书籍
PHP和MySQL Web开发(第四版)
(验证不通过)
(经过验证是可行的)
开发工具:
cd $php_home
php go-pear.phar
Configuration written to C:\Windows\pear.ini...Would you like to alter php.ini ? [Y/n] : yphp.ini include_path updated.Current include path : .;C:\php\pearConfigured directory : D:\wamp\bin\php\php5.5.12\pearCurrently used php.ini (guess) : D:\wamp\bin\php\php5.5.12\php.ini** WARNING! Old version found at D:\wamp\bin\php\php5.5.12, please remove it orbe sure to use the new d:\wamp\bin\php\php5.5.12\pear.bat commandThe 'pear' command is now at your service at d:\wamp\bin\php\php5.5.12\pear.bat* WINDOWS ENVIRONMENT VARIABLES *For convenience, a REG file is available under D:\wamp\bin\php\php5.5.12\PEAR_ENV.reg .This file creates ENV variables for the current user.Double-click this file to add it to the current user registry.
pear list pear list-all
pear install Mail_Mime
pear install MDB2
上面安装可能不会成功,就到pear网站上面下载这些pakcages
http://pear.php.net/packages.php
转载地址:http://uojtb.baihongyu.com/