LAMP学习环境

学习环境安装,有几种

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

<span style="font-size:14px;"><span style="font-size:14px;"><span style="font-size:14px;">#Listen 12.34.56.78:80
Listen 0.0.0.0:8072
Listen [::0]:8072
ServerAdmin cajan2@163.com
ServerName localhost:8072
<Directory />
    AllowOverride none
    Require all denied
    Allow from all
</Directory></span></span></span>
  

my.ini

<span style="font-size:14px;"><span style="font-size:14px;"><span style="font-size:14px;">[client]
port		= 3308
# The MySQL server
[wampmysqld]
port		= 3308
# Change your locale here !
#lc-messages=fr_FR
lc-messages=en_US
[mysqld]
port=3308</span></span></span>

config.inc.php

<span style="font-size:14px;"><span style="font-size:14px;"><span style="font-size:14px;">$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] ='3308';</span></span></span>


2.

appserv

http://appservnetwork.com/

  2.5.10

AppServ 2.5.10

  • Apache 2.2.8
  • PHP 5.2.6
  • MySQL 5.0.51b
  • phpMyAdmin-2.10.3

apache

  8070

MySQL 

  root/root


Mysql命令行常用操作

如何使用mysql命令行

 

<span style="font-size:14px;">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';
</span>

   


php作为apache的一个扩展模块,修改apache或者php的配置文件,都需要重启apache。



学习书籍

PHP和MySQL Web开发(第四版)

《细说PHP》PDF

解决windows系统下php.ini邮件配置正确不发送邮件的问题(验证不通过)

PHP发送邮件配置(经过验证是可行的)


开发工具:

在 Sublime Text 2 中运行 PHP

sublime text2小技巧

  ctags -R -f .tag
  发现一个问题:inc文件,无法使用ctags获取函数的位置,只能适用于php文件。inc文件还是要靠右键跳转(这是另外一个插件)



WAMP中无go-pear.bat文件的安装  

pear官网


cd $php_home

php go-pear.phar

<span style="font-size:14px;">Configuration written to C:\Windows\pear.ini...

Would you like to alter php.ini <D:\wamp\bin\php\php5.5.12\php.ini>? [Y/n] : y

php.ini <D:\wamp\bin\php\php5.5.12\php.ini> include_path updated.

Current include path           : .;C:\php\pear
Configured directory           : D:\wamp\bin\php\php5.5.12\pear
Currently 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 or
be sure to use the new d:\wamp\bin\php\php5.5.12\pear.bat command

The '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.
</span>

pear list

pear list-all

pear install Mail_Mime

pear install MDB2

上面安装可能不会成功,就到pear网站上面下载这些pakcages

http://pear.php.net/packages.php



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值