LAMP学习环境

来源:互联网 发布:邬贺铨 大数据 编辑:程序博客网 时间:2024/06/06 02:13

学习环境安装,有几种

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:80Listen 0.0.0.0:8072Listen [::0]:8072ServerAdmin cajan2@163.comServerName 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_FRlc-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小技巧

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


十款提高开发效率的PHP编码工具


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] : yphp.ini <D:\wamp\bin\php\php5.5.12\php.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.</span>

pear list

pear list-all

pear install Mail_Mime

pear install MDB2

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

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



0 0
原创粉丝点击