Archive

Posts Tagged ‘xampp’

ubuntu下使用xampp快速搭建lamp环境

January 4th, 2009

自从用上ubuntu后,也深深为她所吸引。不仅仅是因为她长的漂亮,还因为她身材好。该凸的地方凸,该凹的地方凹。一点也不臃肿,想要什么你可以自己选择。你可以为她化妆,可以为她减肥或增肥,完全根据个人喜好。当然,她本身就很优秀,你甚至可以根本不用去修饰她。仅仅是让她完全学会一门语言就可以了,而且,是你说的语言。因为她初来乍到的时候,虽然都会那么一点,但会的更不完整。
之所以使用xampp(以前叫lampp),是因为,在之前也在ubuntu下配过lamp环境,甚至最简单的一条指令sudo tasksel install lamp-server 就可以安装lamp环境。但是,这仅仅是最基本的。真正要使用的话,我们还要去配置很多东西,比如GD,比如稀哈算法,比如zlib等等。

而且,我发现使用软件包的方式安装,很多程序的版本都很旧。看来这软件包还真是跟不上潮流啊。源我没试过,但据一些人说源里的应该是很新。不知道源里的新到什么程度。

而且,apache,php等安装完了,也要挨个儿去配。不大舒服。所以还是用xampp,安装超简单。官方网站有中文说明。下载软件包,约55M,解压,然后在终端里运行sudo ./install.sh (当然要进到你解压出来的目录里)就可以开始安装了。安装以后再设置一下安全措施,也就是设置几个密码就可以了。

如果要安装zend Optimizer支持,也很方便,看这里

http://forum.ubuntu.org.cn/viewtopic.php?f=54&t=156258&start=0

关于xampp的使用和设置官方有很多说明,有多种语言版本,这里就不再多讲。总之,使用xampp是非常方便的,安装,卸载,更改设置都是非常方便的。而且,所有的文件都在一个目录下。结构一目了然。

给你的ubuntu美女,也配上一套xampp吧。她会看起来,更加迷人。

linux ,

在xampp中开启Mod_Rewrite

November 12th, 2008

偶尔我们在本地调试程序的时候,也想要看看伪静态的效果,即rewrite。而xampp默认是没有开启mod_rewrite的。所以我们要开启它一下。

在xampp/apache/conf/httpd.conf中,找到

LoadModule rewrite_module modules/mod_rewrite.so

把前面的#号去掉。

然后再找到

Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all

把其中的AllowOverride None 改为 AllowOverride All 然后重启xampp中的apache就可以了。

apache ,

windows下配置php和sendmail

May 15th, 2008

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 1904

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 1904

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2257

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3206

Warning: implode() [function.implode]: Argument must be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3258

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3289

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3289

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3332

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3332

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3477

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3477

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 1904

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 1904

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2257

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3206

Warning: implode() [function.implode]: Argument must be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3258

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3289

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3289

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3332

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3332

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3477

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3477

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 1904

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 1904

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 2257

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3206

Warning: implode() [function.implode]: Argument must be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3258

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3289

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3289

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3332

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3332

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3477

Warning: Invalid argument supplied for foreach() in /home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3477

sendmail是类unix系统自带的邮件发送程序
而windows则没有sendmail。现在大部分人介绍的windows下的apache+php+mysql环境配置,仍然是没有说明如何与置php和sendmail.
我在server 2003上装了一下xampp。它自带了一个邮件发送程序mercury.界面是纯英文的,费好大力气终于配置能发送邮件了吧,结果发现只有163的邮箱能收到。其它邮箱都收不到。狂汗一顿。

于是总结了两种方法来配置php的sendmail.
一.
用sendmail结合其它的smtp服务器,如smtp.163.com来实现发邮件。现在大部分邮箱都要求smtp验证,所以要在sendmail.ini中加入用户名和密码。
php.ini配置(以用163邮箱为例)

[mail function]
; For Win32 only.
;SMTP = smtp.163.com
;smtp_port = 25
; For Win32 only.
;sendmail_from = me@example.com
; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "D:\www\sendmail\sendmail.exe -t"

就配置三项,smtp,smtp_port和sendmail_path
sendmail.ini配置

[sendmail]
 
; you must change mail.mydomain.com to your smtp server
smtp_server=smtp.163.com
smtp_port=25
auth_username=yourusername
auth_password=yourpassword
force_sender=yourusername@163.com

sendmail网上有下的,如果你是用xampp,那里面直接就带了。
不过此种方法,查看收到的邮件头,会是两个发件人。如果你有更好的配置方法,请告诉我。谢谢。
同时在虚拟主机的conf里加上这样一句

<directory d:/www/users/username>
     php_admin_value sendmail_path 'd:\www\sendmail\sendmail.exe -t skyaga@skyaga.com'
</directory>

此邮件地址为用户的邮件地址,随便添。

二.采用windows的smtp服务。php.ini配置方法和上一种类似。或者,下载一个foxmail都可以
安装设置服务端
配置您的服务器向导 下一步找到pop3和smtp 然后进一步配置pop3和smtp服务器。
一切设置好后,你就拥护了自己的邮件发送服务器了!
SMTP装好以后 你应该是在WINDOW2K下,你找到PHP。INI文件
打开找到下面这些行
[mail function]
; For Win32 only.
SMTP = 10.0.0.9 ——-》替换成你的IP,10.0.0.9是偶的IP了 :)
; For Win32 only.
sendmail_from = test@test.com —》发件人信息

然后重新启动APACHE

为了安全和方便,建议采用第一种方法。配置 起来也方便。用一些大的邮件提供商的系统,总比自己的好吧:)

PHP&MYSQL , , , , , , ,

开启xampp中的zend功能

April 12th, 2008

发现xmapp是一个非常不错的套件。用起来非常方便。但官方说不要用于服务器,因为安全性尚未得到验证。我个人觉得,没啥问题。
我的环境是windows xp +xmapp 1.6.6a

修改xampp/apache/bin/php.ini中
zend_optimizer.enable_loader = 0 把0改为1 然后重启apache即可。

PHP&MYSQL , ,

非常容易安装的 apache、mysql、php 和 perl 套件XAMPP

April 6th, 2008

许多人通过他们自己的经验认识到安装 Apache 服务器是件不容易的事儿。如果您想添加 MySQL、PHP 和 Perl,那就更难了。XAMPP 是一个易于安装且包含 MySQL、PHP 和 Perl 的 Apache 发行版。XAMPP 的确非常容易安装和使用:只需下载,解压缩,启动即可。

到目前为止,XAMPP 共有以下四种版本:

* 适用于 Linux 的版本(已在 Ubuntu、SuSE、RedHat、Mandrake 和 Debian 下通过测试),
* 适用于 Windows 98、NT、2000、2003、XP 和 Vista 的版本,
* 适用于 Solaris SPARC 的测试版(在 Solaris 8 环境下开发并测试),
* 适用于 Mac OS X 的测试版。

适用于 Mac OS X 和 Solaris 的 XAMPP 版本尚处于开发的第一阶段。使用时风险自担!

Read more…

PHP&MYSQL , , , ,