0

I have just installed wampserver64 (v: wampserver3.2.6_x64) on window10 and after running wampserver, the icon is green but not connecting to localhost. The page took too much time to load and then gave a response

This site can’t be reached
The connection was reset.
Try:
Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics
ERR_CONNECTION_RESET

Then I tried just "localhost" in the search bar and it gave me the following error enter image description here

Fatal error: Uncaught ArgumentCountError: Too few arguments to function listen_ports(), 0 passed in C:\wamp64\www\index.php on line 40 and exactly 1 expected in C:\wamp64\scripts\wampserver.lib.php on line 529

Kindly help out me. I have changed port 80 to 8080 but the same error. Thanks!

ADDITIONAL INFO

[Sun Apr 10 11:50:51.558506 2022] [mpm_winnt:notice] [pid 12492:tid 732] AH00455: Apache/2.4.51 (Win64) PHP/7.4.26 configured -- resuming normal operations 
[Sun Apr 10 11:50:51.559506 2022] [mpm_winnt:notice] [pid 12492:tid 732] AH00456: Apache Lounge VS16 Server built: Oct 7 2021 16:27:02 
[Sun Apr 10 11:50:51.559506 2022] [core:notice] [pid 12492:tid 732] AH00094: Command line: 'c:\\wamp64\\bin\\apache\\apache2.4.51\\bin\\httpd.exe -d C:/wamp64/bin/apache/apache2.4.51' 
[Sun Apr 10 11:50:51.561505 2022] [mpm_winnt:notice] [pid 12492:tid 732] AH00418: Parent: Created child process 8064 
[Sun Apr 10 11:50:52.659822 2022] [mpm_winnt:notice] [pid 8064:tid 700] AH00354: Child: Starting 64 worker threads.
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • Your question is confusing. You say _"but not connecting to localhost"_ but then _"Then I tried just "localhost" in the search bar"_? You can't connect to localhost but it works with localhost (except from the PHP error)? – M. Eriksson Apr 09 '22 at 09:39
  • Nw connection is established, but when I try to access a URL like localhost/project/index.php it says This site can’t be reached – Haseeb Ahad Apr 09 '22 at 09:47
  • Could you show your DocumentRoot in apache config? – LBS Apr 09 '22 at 12:46
  • [Sun Apr 10 11:50:51.558506 2022] [mpm_winnt:notice] [pid 12492:tid 732] AH00455: Apache/2.4.51 (Win64) PHP/7.4.26 configured -- resuming normal operations [Sun Apr 10 11:50:51.559506 2022] [mpm_winnt:notice] [pid 12492:tid 732] AH00456: Apache Lounge VS16 Server built: Oct 7 2021 16:27:02 [Sun Apr 10 11:50:51.559506 2022] [core:notice] [pid 12492:tid 732] AH00094: Command line: 'c:\\wamp64\\bin\\apache\\apache2.4.51\\bin\\httpd.exe -d C:/wamp64/bin/apache/apache2.4.51' [Sun Apr 10 11:50:51.561505 2022] [mpm_winnt:notice] [pid 12492:tid 732] AH00418: Parent: Created child process 8064 – Haseeb Ahad Apr 10 '22 at 07:01
  • [Sun Apr 10 11:50:52.659822 2022] [mpm_winnt:notice] [pid 8064:tid 700] AH00354: Child: Starting 64 worker threads. – Haseeb Ahad Apr 10 '22 at 07:01
  • Upgrade to WAMPServer 3.2.8. You can download the update from [The backup repo](https://wampserver.aviatechno.net/?lang=en) It will not change anything of your Apache/MySQL/mariaDB/PHP versions. Just the internal WAMPServer code – RiggsFolly Apr 11 '22 at 11:04

1 Answers1

1

I have had the same issue. The solution for me was to alter line 67 of the add_vhost.php file to:

$listenPort = listen_ports($c_ApacheDefine['APACHE_DIR'].'/conf/httpd.conf');
Danbardo
  • 761
  • 7
  • 12