安装好php和apache后不能执行php文件

软件和网站开发以及相关技术探讨
头像
zjbking
帖子: 52
注册时间: 2007-03-08 17:07

安装好php和apache后不能执行php文件

#1

帖子 zjbking » 2007-03-21 12:30

出现的文题见附件,请高手帮忙
附件
Screenshot-1.png
cfc4n
帖子: 142
注册时间: 2006-08-29 15:21
来自: 江苏徐州
联系:

#2

帖子 cfc4n » 2007-03-22 11:13

APACHE没解析啊!
httpd.conf 里面添加啊!!!!
头像
adqin
帖子: 1417
注册时间: 2007-01-24 22:07
来自: http://adqin.cn
联系:

#3

帖子 adqin » 2007-03-22 12:56

新手建议先用用XAMPP集成包。
详情见这里:
viewtopic.php?t=43224&highlight=
sanebaby
帖子: 227
注册时间: 2006-09-23 6:27
来自: 火星
联系:

#4

帖子 sanebaby » 2007-04-05 0:38

配置httpd.conf
还要给与php文件执行权限
头像
zjbking
帖子: 52
注册时间: 2007-03-08 17:07

#5

帖子 zjbking » 2007-04-07 12:52

sanebaby 写了:配置httpd.conf
还要给与php文件执行权限
----------------------------------------------
那么应该如何配置,请详细讲解
其实我是一个程序员
头像
karron
帖子: 6226
注册时间: 2005-06-11 14:03
来自: 不明真相的群众
联系:

#6

帖子 karron » 2007-04-07 13:01

我的blog,关于技术,软件,linux,vim <---- 所有博客均被河蟹.
头像
zjbking
帖子: 52
注册时间: 2007-03-08 17:07

#7

帖子 zjbking » 2007-04-07 21:56

我是教育网的,上不了那个网,如果可以的请在帖子里说清楚或者提供多几个网址,希望其中有教育网可以上得了的
其实我是一个程序员
头像
karron
帖子: 6226
注册时间: 2005-06-11 14:03
来自: 不明真相的群众
联系:

#8

帖子 karron » 2007-04-07 22:13

sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server

就ok了, LAMP环境就建立好了.
我的blog,关于技术,软件,linux,vim <---- 所有博客均被河蟹.
头像
woodlinux
帖子: 158
注册时间: 2006-07-15 7:29
来自: 宁波北仑
联系:

#9

帖子 woodlinux » 2007-07-03 18:43

文件权限搞定没有。
头像
forrid
帖子: 659
注册时间: 2007-04-23 17:40

#10

帖子 forrid » 2007-07-05 16:34

你咋装的?

吾生也有涯,而知也无涯,以有涯随无涯,SB啊~~~~~~~~~~
头像
china_baby
帖子: 71
注册时间: 2007-06-20 13:17
来自: 上海

#11

帖子 china_baby » 2007-07-06 12:54

8楼正解!ubuntu是我用到的最简单的linux
是否我,真的一无所有??
头像
走刀口→超
帖子: 192
注册时间: 2007-07-10 15:25
来自: jssz

#12

帖子 走刀口→超 » 2007-07-22 10:55

很想用这个阿!

可是:

代码: 全选

Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: Permission denied in /opt/lampp/htdocs/xampp/index.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/xampp/index.php:2) in /opt/lampp/htdocs/xampp/index.php on line 4
这是什么情况,看来这次非重装了!呼。。。
人在江湖,怎能不挨;为了能活,唯有把己!fighting...

HP V3706
T5450 2G GF8400GS 128M

u8.04+VBOX(xp)
JasonMiao
帖子: 27
注册时间: 2007-01-22 21:20

#13

帖子 JasonMiao » 2007-07-31 20:55

permission denied 没有设置权限!实在不行,你可以删除全部包含apahce2,php5和mysql的文件夹(先前要用命令删除包sudo apt-get autoremove ***)
考试的烦恼
帖子: 84
注册时间: 2006-11-09 7:53
联系:

#14

帖子 考试的烦恼 » 2007-08-03 2:01

To only install PHP5. use any method to install

php5

If PHP4 is present on your system, also install

libapache2-mod-php5

Troubleshooting

Does your browser ask if you want to download the php file instead of displaying it? If Apache is not actually parsing the php after you restarted it, install libapache2-mod-php5. It is installed when you install the php5 package, but may have been removed inadvertently by packages which need to run a different version of php. You may also need to actually enable it, by doing sudo a2enmod php5 followed by sudo /etc/init.d/apache2 restart. Be sure to clear your browser's cache before testing your site again.


按照上面的方法都试过了,可还是不行,设置什么文件权限?我设成777了都。。。试着全部删除又重装乐意下,可还是不行,麻烦那个大侠指导一下吧。谢谢
uouowoai
帖子: 3
注册时间: 2007-08-15 8:43

#15

帖子 uouowoai » 2007-08-15 19:36

我也遇见这个问题了,具体的怎么操作 我是个新手 能详细的最好
回复