0

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'];
}
5
  • You will need to show some code. Who exactly is causing this error message to show? Commented Aug 2, 2012 at 14:29
  • are you running as a https:// ? It's quite obvious that you will not have SSL certificate for your localhost. Commented Aug 2, 2012 at 14:30
  • Try going to localhost/index.php Commented Aug 2, 2012 at 14:31
  • I tried: localhost:8080/MyFolder/index.php That doesn't work. Commented Aug 2, 2012 at 14:32
  • for some reason when I try it without https, it puts it there anyway Commented Aug 2, 2012 at 14:34

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

3 Comments

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="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']; }
Does 'DOCUMENT_ROOT' actually refer to a folder called DOCUMENT_ROOT?
it gives your directory root path.
1

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.

2 Comments

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="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']; }
I don't quite understand what you want to accomplish. Do you want it to be a https connection or not?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.