在 WAMP 上设置问题 2答案


Setting up Question2Answer on WAMP

我的电脑里安装了WAMP服务器。

阿帕奇版本 : 2.2.17
PHP 版本 : 5.3.5
MySQL 版本 : 5.5.8

现在我想在这个wamp上部署Question2Answer。http://www.question2answer.org/install.php

我做了以下工作-1)

CREATE USER 'masterqa'@'localhost' IDENTIFIED BY '***';
GRANT ALL PRIVILEGES ON * . * TO 'masterqa'@'localhost' IDENTIFIED BY '***' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
CREATE DATABASE IF NOT EXISTS `masterqa` ;
GRANT ALL PRIVILEGES ON `masterqa` . * TO 'masterqa'@'localhost';

2)

已解压缩压缩

qa-config-example.php解压缩的 question2answer 文件夹中,并将其重命名为 qa-config.php

更改了以下内容

define('QA_MYSQL_HOSTNAME', '127.0.0.1'); // try '127.0.0.1' or 'localhost' if MySQL on same server
    define('QA_MYSQL_USERNAME', 'masterqa');
    define('QA_MYSQL_PASSWORD', 'open');
    define('QA_MYSQL_DATABASE', 'masterqa');

3)将整个文件夹"Question2Answer"复制到

C:'wamp'www

但是当我尝试时

http://localhost/question2answer 

在我的浏览器上,它显示一些错误,例如

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

我做错了什么?

我也面临着同样的问题。我刚刚删除了.htaccess文件,一切正常。

尝试使用以下方法:

define('QA_MYSQL_USERNAME', 'masterqa@localhost');

flush privileges;

编辑
我使用以下方法:

  1. 下载项目
  2. 将项目解压缩到我的 www 目录
  3. 查找 qa-config-example.php 文件
  4. 将文件重命名为 qa-config.php
  5. 在记事本中打开 qa-config.php 文件
  6. 我在 qa-config.php 文件中的设置如下:
    define('QA_MYSQL_HOSTNAME', '127.0.0.1');
    define('QA_MYSQL_USERNAME', 'root');
    define('QA_MYSQL_PASSWORD', '');
    define('QA_MYSQL_DATABASE', 'qa');
  7. 打开 phpMyAdmin
  8. 创建名为 QA 的数据库
  9. localhost运行项目