Subby
Subby

Reputation: 5480

Connecting to MySQL Database

I have imported a database over to MySQL in phpMyAdmin. I am performing my work locally using WAMPSERVER (localhost).

Before I imported the database, I was getting the error Database not found. Now that I have added the database in localhost. I am getting the following error in the browser when I go to index.php

SSL connection error Unable to make a secure connection to the server. This may be a problem with the server or it may be requiring a client authentication certificate that you don't have. Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.

Here are some details about the config file, if it helps:

I haven't changed the .htaccess file. I do however have a config file that looks like this:

<?php
if($_SERVER['REMOTE_ADDR']=="127.0.0.1")
{
    $DB_HOST="localhost";
    $DB_USER="root";
    $DB_PASS="";
    $DB_NAME="dbName";
    $site_url="http://localhost/folder/";
    $doc_root=$_SERVER['DOCUMENT_ROOT']."/folder/";
}
else
{
    $DB_HOST="localhost";
    $DB_USER="root";
    $DB_PASS="password";
    $DB_NAME="dbName";
    if($_SERVER["HTTPS"]=="on")
        $site_url="weburl";
    else
        $site_url="weburl";
    $doc_root=$_SERVER['DOCUMENT_ROOT'];
}

Upvotes: 0

Views: 450

Answers (2)

Ms01
Ms01

Reputation: 4702

You probably don't have https on.

And you're having issue going to http:// since you already went to https:// in your browser (Chrome is my guess). Try clearing your visited sites or history and it will work just fine. Or you may try it in another browser.

Also, it is possible that you may have edited an .htacess file to redirect or installed a php framework with https on.

Upvotes: 1

Kalpesh
Kalpesh

Reputation: 5685

You don't need to use https:// when you are running it in you local machine. Because you can't have SSL certificate for your local machine, isn't it?

Try: http://localhost/myfolder/index.php instead.

Upvotes: 2

Related Questions