Cannot connect to localhost (phpMyAdmin OK)
Posted by: pdavis (---.cable.dynamic.v4.ziggo.nl)
Date: June 20, 2019 04:04PM

I have just installed 3.1.9_x64 (in d:\wamp64) after removing a previous version.All the services are running. I can start phpMyAdmin and carry out actions there, but selecting localhost in the WAMP menu (or trying to run a php file in my www folder) leads to a (Firefox) message that connection cannot be made.

I note the following:

The WAMP menu offers the choice of five versions of php (5.6.40, 7.0.33, 7.1.29, 7.2.18 and 7.3.5); 7.2.18 is selected (selecting 7.3.5. doesn't help)


php_error.log contains an entry (actually repeated three additional times): "[19-Jun-2019 18:26:24 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: d:/wamp64/bin/php/php7.2.18/ext/curl (Kan opgegeven module niet vinden.), d:/wamp64/bin/php/php7.2.18/ext/php_curl.dll (Kan opgegeven module niet vinden.)) in Unknown on line 0" php_curl.dll is however present in d:\wamp64\bin\php\php7.2.18\ext. "Kan opgegeven module niet vinden"= Cannot find specified module.
.

Options: ReplyQuote
Re: Cannot connect to localhost (phpMyAdmin OK)
Posted by: Otomatic (Moderator)
Date: June 20, 2019 04:47PM

Hi,

PhpMyAdmin is 'http://localhost/phpmyadmin/'

What is the exact error message from Firefox ?

Please READ (and answer) BEFORE YOU ASK A QUESTION

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Cannot connect to localhost (phpMyAdmin OK)
Posted by: pdavis (---.cable.dynamic.v4.ziggo.nl)
Date: June 20, 2019 10:12PM

Hello,

PROBLEM LOADING PAGE

Unable to connect

Firefox can't establish a connection to the server at localhost.

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

(Button) Try again.

Options: ReplyQuote
Re: Cannot connect to localhost (phpMyAdmin OK)
Posted by: Otomatic (Moderator)
Date: June 21, 2019 09:14AM

Hi,

> Firefox can't establish a connection to the server at localhost.
And yet, with PhpMyAdmin, Firefox does establish a connection with localhost! 'http://localhost/phpmyadmin/'

Check with the Windows firewall and/or Firefox settings.

And you didn't answer to READ (and answer) BEFORE YOU ASK A QUESTION

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Cannot connect to localhost (phpMyAdmin OK)
Posted by: pdavis (---.cable.dynamic.v4.ziggo.nl)
Date: June 21, 2019 11:33AM

After removing everything and reinstalling I see that localhost is found immediately after installation, but the problem occurs when I repopulate my www folder from backup. I shall now start again and selectively add files to my www; this should emable me to discover the problem.

Options: ReplyQuote
Re: Cannot connect to localhost (phpMyAdmin OK)
Posted by: RiggsFolly (Moderator)
Date: June 21, 2019 11:41AM

Hi,

DO NOT place your site into the www folder, it is used by WAMPServer.
Instead add a subfolder lets say www\project1 and place your stuff in there.

Then create a Virtual Host to point to the folder See
THE NEED for VIRTUAL HOSTS


---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 06/21/2019 01:02PM by RiggsFolly.

Options: ReplyQuote
Re: Cannot connect to localhost (phpMyAdmin OK)
Posted by: pdavis (---.cable.dynamic.v4.ziggo.nl)
Date: June 21, 2019 12:10PM

Thank you! Everything running fine now.The root cause turned out to be the inclusion of the following in my .htaccess coppied (bad idea!) from my remote publically visible website:

####CUSTOM_HEADER####
##------Forceer HTTPS verbinding geheel domein------##
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) []%{SERVER_NAME}/$1 [R,L]
######CUSTOM_TAILER####

Options: ReplyQuote


Sorry, only registered users may post in this forum.