致命错误:在xampp中找不到类'Mongo' [英] Fatal error: Class 'Mongo' not found in xampp

查看:122
本文介绍了致命错误:在xampp中找不到类'Mongo'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Windows 7 64位与XAMPP for Windows一起使用,似乎找不到安装问题的解决方案.我已经阅读了MongoDB上的Windows和PHP驱动程序安装指南.

从PHP信息中我的环境规格: XAMPP 1.7.4 的PHP:5.3.3 Apache 2.0处理程序

有人知道如何完成安装吗?我已经阅读了很多人的评论,并尝试了不同的故障排除和解决方法,但到目前为止,对我来说什么都没有用.

我正在执行以下步骤:

  1. 从官方网站下载驱动程序
  2. 停止所有服务
  3. 更新PHP.ini
  4. 重新启动所有服务

显示:

致命错误:在第2行的G:\ Project \ xampp \ htdocs \ Mongo \ mongo.php中找不到类'Mongo'

任何人都可以解决问题.

解决方案

您没有加载mongo扩展名.

您是否已经按照安装说明安装说明来信?您是否已经安装了 mongodb本身?

如果您根本无法连接到mongo(通过在dos提示符下键入mongo),则需要先解决该问题.

如果您可以连接到mongo但不能通过php进行连接,那么您可能会错过一个步骤,但很可能是这样:

  • 打开您的php.ini文件
  • 确保其中(或相关的conf文件中)具有extension=php_mongo.dll
  • 重新启动apache
  • 再试一次

I'm using Windows 7 64 bit with XAMPP for Windows and can't seem to find the solution to the issue with the installation. I have gone through the Windows and PHP driver installation guides at MongoDB.

From PHP info my environment specs: XAMPP 1.7.4 PHP: 5.3.3 Apache 2.0 Handler

Does anyone have an idea how to finish the installation? I have read tons of peoples comments and tried different troubleshooting and workarounds but nothing worked so far for me.

I am doing the following steps:

  1. Downloading the drivers from the official site
  2. Stopping all services
  3. Updating the PHP.ini
  4. Restarting all services

Its showing :

Fatal error: Class 'Mongo' not found in G:\Project\xampp\htdocs\Mongo\mongo.php on line 2

Anyone can solve the problem .

解决方案

You don't have the mongo extension loaded.

Have you already followed the installation instructions to the letter? Do you already have mongodb itself installed?

If you can't connect to mongo at all (by typing mongo in a dos prompt) - you need to address that first.

If you can connect to mongo but not via php, there will be a step you've missed, but most likely:

  • open your php.ini file
  • ensure it has extension=php_mongo.dll in it (or in the relevant conf file)
  • restart apache
  • try again

这篇关于致命错误:在xampp中找不到类'Mongo'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆