免费注册 查看新帖 |

Chinaunix

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

PHP的一个安装问题向大家请教. [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-11-19 21:42 |只看该作者 |倒序浏览
小弟的机子是XP,用的IIS,PHP版本是5.0.2,MYSQL 4.1.7,装好以后phpinfo()可以用了,但是装了一个phpnuke,出现好多错误提示:
Notice: Undefined index: QUERY_STRING in D:\web\ukhero\mainfile.php on line 23

Notice: Undefined index: QUERY_STRING in D:\web\ukhero\mainfile.php on line 26

Notice: Undefined variable: HTTP_USER_AGENT in D:\web\ukhero\mainfile.php on line 28

Notice: import_request_variables() [function.import-request-variables]: No prefix specified - possible security hazard in D:\web\ukhero\mainfile.php on line 51

Notice: Undefined variable: forum_admin in D:\web\ukhero\mainfile.php on line 79

Notice: Undefined variable: inside_mod in D:\web\ukhero\mainfile.php on line 82

Notice: Undefined variable: inside_mod in D:\web\ukhero\db\db.php on line 44

还有一些其他的
Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module (SNMP-MPD-MIB): At line 0 in (none) Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module (SNMPv2-TM): At line 0 in (none)

请问有人遇到过,可以解决吗?
先谢了!

论坛徽章:
0
2 [报告]
发表于 2004-11-21 21:32 |只看该作者

PHP的一个安装问题向大家请教.

这个问题很难吗?都没人能解决?

论坛徽章:
0
3 [报告]
发表于 2004-11-26 21:20 |只看该作者

PHP的一个安装问题向大家请教.

各位帮忙啊!

论坛徽章:
0
4 [报告]
发表于 2004-11-27 15:06 |只看该作者

PHP的一个安装问题向大家请教.

还有一些其他的
Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module (SNMP-MPD-MIB): At line 0 in (none) Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module (SNMPv2-TM): At line 0 in (none)


这个问题,可以通过修改php.ini解决

  1. extension=php_snmp.dll
复制代码

前面加分号,注释掉就可以了


至于前面的问题,看看php.ini中的

  1. register_globals = OFF
复制代码

默认是OFF,改为ON试试,但是安全性就不能保证了

论坛徽章:
0
5 [报告]
发表于 2004-11-28 00:34 |只看该作者

PHP的一个安装问题向大家请教.

修改PHP.ini文件里的错误级别。

论坛徽章:
0
6 [报告]
发表于 2004-11-29 22:57 |只看该作者

PHP的一个安装问题向大家请教.

谢谢redundancycode,extension=php_snmp.dll已经解决.但还是出现许多Undefined index, MySQL还是没有办法连接.

aspbiz,请问能不能说详细些?如果修改错误级别?
谢谢两位的回复.

论坛徽章:
0
7 [报告]
发表于 2004-11-30 00:55 |只看该作者

PHP的一个安装问题向大家请教.

Undefined问题,设置php.ini中的

error_reporting  =  E_ALL & ~E_NOTICE

论坛徽章:
0
8 [报告]
发表于 2004-11-30 01:01 |只看该作者

PHP的一个安装问题向大家请教.

连接Mysql,用PHP5的mysqli试试
修改php.ini,在extension最多的那里加入

extension=php_mysqli.dll

复制php目录的libmysqli.dll到System32目录,重启Apache。

然后用以下代码测试连接

  1. <?php

  2. $host         = "localhost";
  3. $user         = "root";
  4. $password = "password";
  5. $dbname    = "dbname";

  6. $mysqli       = new mysqli($host,$user,$password,$dbname);

  7. if (mysqli_connect_errno()) {
  8.     printf("连接数据库失败");
  9.     exit();
  10. }

  11. ......

  12. ?>;
复制代码

如果以传统的mysql连接,则必须修改mysql用户密码“

  1. mysql>;set password for 'root'@'localhost' = old_password('newpassword');
复制代码


PHP连接代码:

  1. <?php
  2. $host          = "localhost";
  3. $user          = "root";
  4. $password = "password";
  5. $dbname    = "dbname";

  6. $conn          = mysql_connect($host,$user,$password) or die("连接数据库失败");

  7. mysql_select_db($dbname) or die("查询数据库错误");

  8. ?>;
复制代码

论坛徽章:
0
9 [报告]
发表于 2004-12-01 19:26 |只看该作者

PHP的一个安装问题向大家请教.

谢谢redundancycode,问题已解决.

论坛徽章:
0
10 [报告]
发表于 2004-12-01 21:52 |只看该作者

PHP的一个安装问题向大家请教.

111
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP