免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 2962 | 回复: 12
打印 上一主题 下一主题

服务器架完了,但无法浏览PHP页 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-03-15 16:59 |只看该作者 |倒序浏览
freebsd+apache2+mysql+php

我是菜鸟。整个安装过程都是照书上做的。

1.apache

cd /usr/ports/www/apache2
make install clean

2.php
cd /usr/ports/www/mod_php5
make install clean
cd /usr/ports/lang/php5-extensions
make install clean

3.mysql
cd /usr/ports/databases/mysql323-server
make install clean
cd /usr/ports/databases/php5-mysql
make install clean

现在我测试apache与mysql好象没什么问题。但PHP好象没有启动。

我修改了/usr/local/etc/apache2/httpd.conf
加入了

AddType application/x-httpd-php  .php
AddType application/x-httpd-php-source  .phps

我测试时。HTML页没问题。
但PHP测试页则不行。用IE就是不存在的页。用mozilla就是一个劲的下载PHP页。我下了一屏了。哈哈。

请DX们指教。我哪里做的不对啊。
谢谢。。。

论坛徽章:
0
2 [报告]
发表于 2006-03-15 17:19 |只看该作者

re

have php.ini in you /usr/local/etc ?

see /var/log/httpd-error.log look like this 'Apache/1.3.34 (Unix) PHP/4.4.2 configured -- resuming normal operations' ?

[ 本帖最后由 50g 于 2006-3-15 17:21 编辑 ]

论坛徽章:
3
CU大牛徽章
日期:2013-09-18 15:16:55CU大牛徽章
日期:2013-09-18 15:18:22CU大牛徽章
日期:2013-09-18 15:18:43
3 [报告]
发表于 2006-03-15 23:43 |只看该作者
你直接访问的index.php?

论坛徽章:
0
4 [报告]
发表于 2006-03-16 17:58 |只看该作者
/var/log/httpd-error.log

PHP Warning:  Function registration failed - duplicate name - mssql_connect in UPHP Warning:  Function registration failed - duplicate name - mssql_pconnect in
PHP Warning:  Function registration failed - duplicate name - mssql_close in UnkPHP Warning:  Function registration failed - duplicate name - mssql_select_db inPHP Warning:  Function registration failed - duplicate name - mssql_query in UnkPHP Warning:  Function registration failed - duplicate name - mssql_free_result
PHP Warning:  Function registration failed - duplicate name - mssql_get_last_mesPHP Warning:  Function registration failed - duplicate name - mssql_num_rows in
PHP Warning:  Function registration failed - duplicate name - mssql_num_fields iPHP Warning:  Function registration failed - duplicate name - mssql_fetch_row inPHP Warning:  Function registration failed - duplicate name - mssql_fetch_array
PHP Warning:  Function registration failed - duplicate name - mssql_fetch_assoc
PHP Warning:  Function registration failed - duplicate name - mssql_fetch_objectPHP Warning:  Function registration failed - duplicate name - mssql_data_seek inPHP Warning:  Function registration failed - duplicate name - mssql_fetch_field
PHP Warning:  Function registration failed - duplicate name - mssql_field_seek iPHP Warning:  Function registration failed - duplicate name - mssql_result in Unfile "httpd-error.log", 265 lines

论坛徽章:
0
5 [报告]
发表于 2006-03-16 18:02 |只看该作者
原帖由 bdwy 于 2006-3-15 23:43 发表
你直接访问的index.php?


没懂。什么直接访问?

论坛徽章:
0
6 [报告]
发表于 2006-03-16 18:16 |只看该作者
你的php测试页是什么呀?
试试看phpinfo行不

论坛徽章:
54
2017金鸡报晓
日期:2017-02-08 10:39:42操作系统版块每日发帖之星
日期:2016-03-08 06:20:00操作系统版块每日发帖之星
日期:2016-03-07 06:20:00操作系统版块每日发帖之星
日期:2016-02-22 06:20:00操作系统版块每日发帖之星
日期:2016-01-29 06:20:00操作系统版块每日发帖之星
日期:2016-01-27 06:20:00操作系统版块每日发帖之星
日期:2016-01-20 06:20:00操作系统版块每日发帖之星
日期:2016-01-06 06:20:0015-16赛季CBA联赛之江苏
日期:2015-12-21 20:00:24操作系统版块每日发帖之星
日期:2015-12-21 06:20:00IT运维版块每日发帖之星
日期:2015-11-17 06:20:002015亚冠之广州恒大
日期:2015-11-12 10:58:02
7 [报告]
发表于 2006-03-16 21:35 |只看该作者
楼主好象在mysql上出了问题。你应先自己写一个index.php,放到你的网站试试。内容为
<? php
echo phpinfo();
?>

如果正常,应该出现php的信息,并且当中应有mysql方面的内容。

论坛徽章:
0
8 [报告]
发表于 2006-03-17 09:14 |只看该作者
使用phpinfo()的图

1.png (57.47 KB, 下载次数: 72)

1.png

论坛徽章:
0
9 [报告]
发表于 2006-03-17 09:16 |只看该作者
httpd.conf 内容
我在最后加上了呀。
还需要在别的地方配置吗?

2.png (53.09 KB, 下载次数: 66)

2.png

论坛徽章:
0
10 [报告]
发表于 2006-03-17 14:17 |只看该作者
看一下我的笔记吧,
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP