- 论坛徽章:
- 0
|
大家好!我再linux环境下安装mysql+apache+php的组合!当安装PHP的时候:
[root@weiming root]#cd /usr/local/
[root@weiming local]# tar -zxvf php-5.2.8.tar.gz
[root@weiming local]# cd php-5.2.8
[root@weiming php-5.2.8]# ./configure --prefix=/usr/local/php4 --with-apxs2=/usr/local/apache/bin/apxs --with-
mysql=/usr/local/mysql
#make
#make install
#cp php.ini-dist /usr/local/lib/php.ini
#vi /usr/local/apache2/conf/httpd.conf
就是这步的问题:
网上的资料说是:DirectoryIndex index.html
在后面加入 index.php 让apache也能打开默认首页为php的文件。
查找:
#AddType application/x-tar .tgz
在下面加入
AddType application/x-httpd-php .php
重启apache
第一个DirectoryIndex index.html
找到啦而且也添加啦!但是#AddType application/x-tar .tgz
没有找到只找到了:#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz和
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
这两项我在下面添加AddType application/x-httpd-php .php
出去重启APACHE:
[root@localhost httpd]# /usr/local/apache/bin/apachectl start
Syntax error on line 310 of /etc/httpd/httpd.conf:
AddType requires at least two arguments, a mime type followed by one or more file extensions
这是怎么回事??高手给下解答?? |
|