LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 782|回复: 4

mysql +php +apache配置完成,mysql能起动,但是apache却有问题?

[复制链接]
发表于 2003-12-29 03:56:56 | 显示全部楼层 |阅读模式
127.0.0.1能打开 index.html
但127.0.0.1/index.php 打开仍然显示<?(info) ;  ?>

#/opt/apache/bin/apachectl start
Syntax error on line 840 of /opt/apache/conf/httpd.conf:
AddType requires at least two arguments,a mime type followed by one or more   
file extensions

这与与此何干?
 楼主| 发表于 2003-12-29 09:38:32 | 显示全部楼层
840行我是这样做的:
更改apache的配制文件:目的是让apache能解释php程序。
找到839行#AddType application/x-tar .tgz 这行,在下面加一行。前面不要加#号。

AddType application/x-httpd-php .php


找到下面一行在后面加上index.php,这表示网站的默认页也能够为index.php

DirectoryIndex index.html index.html.var index.php

注意:改变了http.conf后,要重启apache服务器

但还是有错误?
 楼主| 发表于 2003-12-29 10:25:58 | 显示全部楼层
Syntax error on line 840 of /opt/apache/conf/httpd.conf:
AddType requires at least two arguments,a mime type followed by one or more file extensions
怎么办???
发表于 2003-12-29 11:36:37 | 显示全部楼层
不太清楚,我自己装的redhat 9,用光盘安装的php+mysql+apache ,安装完以后只要在DirectoryIndex 后边加index.php 然后重启apache就完了,我的就支持php 了
 楼主| 发表于 2003-12-29 21:52:14 | 显示全部楼层
我是根据版主北北南提供的文章设的
我想我是不会漏什么的
这到底是什么原因啊
这与我启动的数据库:/opt/mysql/share/mysql/mysqlserver start
是否有关?(也就是我当前use 的数据库有关吗)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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