仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1090|回复: 19
打印 上一主题 下一主题

[学习教程] PHP网站制作之在UNIX下具体的装置 PHP 的 apache 模块...

[复制链接]
小妖女 该用户已被删除
跳转到指定楼层
#
发表于 2015-2-4 00:03:21 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
怎样学习,大家都知道编程是1门很枯燥的事业,所以大家一定要有兴趣,可能刚开始打算学的时候是因为别人说php有多好,php多么流行,但是后来伴随着学习的深入,你的这些   

Details of installing PHP with apache on Unix.
You can select arguments to add to the configure on line 8 below from the Complete list of configure options.

Example 2-4. Installation Instructions (Apache Module Version)

1. gunzip apache_1.3.x.tar.gz
2. tar xvf apache_1.3.x.tar
3. gunzip php-x.x.x.tar.gz
4. tar xvf php-x.x.x.tar
5. cd apache_1.3.x
6. ./configure --prefix=/www
7. cd ../php-x.x.x
8. ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
9. make
10. make install
11. cd ../apache_1.3.x
12. for PHP 3: ./configure --activate-module=src/modules/php3/libphp3.a
for PHP 4: ./configure --activate-module=src/modules/php4/libphp4.a
13. make
14. make install

Instead of this step you may prefer to simply copy the httpd binary
overtop of your existing binary. Make sure you shut down your
server first though.

15. cd ../php-x.x.x
16. for PHP 3: cp php3.ini-dist /usr/local/lib/php3.ini
for PHP 4: cp php.ini-dist /usr/local/lib/php.ini

You can edit your .ini file to set PHP options. If
you prefer this file in another location, use
--with-config-file-path=/path in step 8.

17. Edit your httpd.conf or srm.conf file and add:

For PHP 3: AddType application/x-httpd-php3 .php3
For PHP 4: AddType application/x-httpd-php .php

You can choose any extension you wish here. .php is simply the one
we suggest. You can even include .html .


18. Use your normal procedure for starting the Apache server. (You must
stop and restart the server, not just cause the server to reload by
use a HUP or USR1 signal.)




Different examples of compiling PHP for apache are as follows:


./configure --with-apxs --with-pgsql





This will create a libphp4.so shared library that is loaded into Apache using a LoadModule line in Apache's httpd.conf file. The PostgreSQL support is embedded into this libphp4.so library.



./configure --with-apxs --with-pgsql=shared





This will again create a libphp4.so shared library for Apache, but it will also create a pgsql.so shared library that is loaded into PHP either by using the extension directive in php.ini file or by loading it explicitly in a script using the dl() function.



./configure --with-apache=/path/to/apache_source --with-pgsql





This will create a libmodphp4.a library, a mod_php4.c and some accompanying files and copy this into the src/modules/php4 directory in the Apache source tree. Then you compile Apache using --activate-module=src/modules/php4/libphp4.a and the Apache build system will create libphp4.a and link it statically into the httpd binary. The PostgreSQL support is included directly into this httpd binary, so the final result here is a single httpd binary that includes all of Apache and all of PHP.



./configure --with-apache=/path/to/apache_source --with-pgsql=shared





Same as before, except instead of including PostgreSQL support directly into the final httpd you will get a pgsql.so shared library that you can load into PHP from either the php.ini file or directly using dl().

When choosing to build PHP in different ways, you should consider the advantages and drawbacks of each method. Building as a shared object will mean that you can compile apache separately, and don't have to recompile everything as you add to, or change, PHP. Building PHP into apache (static method) means that PHP will load and run faster. For more information, see the Apache webpage on DSO support.
怎么培养啊 别光说不练啊,好 ,比如新人入门自己步是配置环境,虽然现在都有很多的集成环境,但是真实的体验下配置环境还是会有很多帮助,不论是你以后工作还是在真实的linux下开发。
莫相离 该用户已被删除
19#
发表于 2015-4-29 16:07:11 | 只看该作者
基础有没有对学习php没有太大区别,关键是兴趣。
深爱那片海 该用户已被删除
18#
发表于 2015-4-28 08:16:07 | 只看该作者
微软最近出的新字体“微软雅黑”,虽然是挺漂亮的,不过firefox  支持的不是很好,所以能少用还是少用的好。
灵魂腐蚀 该用户已被删除
17#
发表于 2015-4-25 23:31:24 | 只看该作者
装在C盘下面可以利用windows的ghost功能可以还原回来(顺便当做是重转啦),当然啦我的编译目录要放在别的盘下,不然自己的劳动成果就悲剧啦。
只想知道 该用户已被删除
16#
发表于 2015-4-16 10:11:56 | 只看该作者
首推的搜索引擎当然是Google大神,其次我比较喜欢 百度知道。不过搜出来的结果往往都是 大家copy来copy去的,运气的的概率很大。
第二个灵魂 该用户已被删除
15#
发表于 2015-4-1 14:11:14 | 只看该作者
如果你可以写完像留言板这样的程序,那么你可以去一些别人的代码了,
小妖女 该用户已被删除
14#
 楼主| 发表于 2015-3-31 04:46:06 | 只看该作者
当然这种网站的会员费就几十块钱。
谁可相欹 该用户已被删除
13#
发表于 2015-3-27 11:11:05 | 只看该作者
至于模板嘛,各位高人一直以来就是争论不休,我一只小菜鸟就不加入战团啦,咱们新手还是多学点东西的好。
爱飞 该用户已被删除
12#
发表于 2015-3-27 04:09:10 | 只看该作者
php是动态网站开发的优秀语言,在学习的时候万万不能冒进。在系统的学习前,我认为不应该只是追求实现某种效果,因为即使你复制他人的代码调试成功,实现了你所期望的效果,你也不了解其中的原理。
小女巫 该用户已被删除
11#
发表于 2015-3-26 11:18:47 | 只看该作者
建议加几个专业的phper的群,当然啦需要说话的人多,一处一点问题能有人回答你的,当然啦要让人回答你的问题,平时就得躲在里面聊天,大家混熟啦,愿意回答你问题的人自然就多啦。
海妖 该用户已被删除
10#
发表于 2015-3-24 22:28:59 | 只看该作者
多看优秀程序员编写的代码,仔细理解他们解决问题的方法,对自身有很大的帮助。
精灵巫婆 该用户已被删除
9#
发表于 2015-3-20 04:37:41 | 只看该作者
环境搭建好,当你看见你的浏览器输出“it works\\\\\\\"时你一定是喜悦的。在你解决问题的时候,我强烈建议多读php手册。
若天明 该用户已被删除
8#
发表于 2015-3-15 10:24:49 | 只看该作者
,熟悉html,能用div+css,还有javascript,优先考虑linux。我在开始学习的时候,就想把这些知识一起学习,我天真的认为同时学习能够互相呼应,因为知识是相通的。
若相依 该用户已被删除
7#
发表于 2015-3-7 17:44:35 | 只看该作者
先学习php和mysql,还有css(html语言很简单)我认为现在的效果比以前的方法好。
小魔女 该用户已被删除
6#
发表于 2015-3-7 12:40:05 | 只看该作者
首先我是坚决反对新手上来就用框架的,因为对底层的东西一点都不了解,造成知识上的真空,会对以后的发展不利。我的观点上手了解下框架就好,代码还是手写。当然啦如果是位别的编程语言的高手的话,这个就另当别论啦。
老尸 该用户已被删除
5#
发表于 2015-3-3 23:10:36 | 只看该作者
当留言板完成的时候,下步可以把做1个单人的blog程序,做为目标,
透明 该用户已被删除
地板
发表于 2015-2-10 05:23:46 | 只看该作者
要进行开发,搭建环境是首先需要做的事,windows下面我习惯把环境那个安装在C盘下面,因为我配的环境经常出现诡异事件,什么事都没做环境有的时候就不能用啦。
愤怒的大鸟 该用户已被删除
板凳
发表于 2015-2-7 11:54:41 | 只看该作者
其实也不算什么什么心得,在各位大侠算是小巫见大巫了吧,望大家不要见笑,若其中有错误的地方请各位大虾斧正。
飘飘悠悠 该用户已被删除
沙发
发表于 2015-2-6 16:51:45 | 只看该作者
如果你已经到这种程度了,那么你已经可以做我的老师了。其实php也分很多的区域,
活着的死人 该用户已被删除
楼主
发表于 2015-2-4 08:19:04 | 只看该作者
php里的数组为空的时候是不能拿来遍历的;(这个有点低级啊,不过我刚被这个边界问题墨迹了好长一会)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-9-20 17:50

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表