Wampserver error
Posted by: dyld (---.telecentro-reversos.com.ar)
Date: June 16, 2022 05:43PM

Hello! I don't know if a photo of the error I have with Wampserver can be attached. But I'm going to copy and paste it to see if someone can help me, I searched everywhere for the error and I can't find the solution.

Warning: file_get_contents(C:/Windows/system32/drivers/etc/hosts): failed to open stream: No such file or directory in C:\wamp\scripts\wampserver.lib.php on line 601

In some places I read that I had to disable the antivirus. I did that but nothing happened.

The ServerName localhost is not defined into hosts file.
The file: C:/Windows/system32/drivers/etc/hosts is not writable
The file C:/Windows/system32/drivers/etc/hosts does not exists

That's another thing it says at the bottom of the page. I await your answers, thank you very much

Options: ReplyQuote
Re: Wampserver error
Posted by: Otomatic (Moderator)
Date: June 16, 2022 10:45PM

Hi,

> C:/Windows/system32/drivers/etc/hosts

This file does not exist and/or is blocked in writing and/or is locked by your anti-virus.

See items 09 and 10 and (note 2) of TROUBLESHOOTING TIPS

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

Options: ReplyQuote
Re: Wampserver error
Posted by: dyld (---.telecentro-reversos.com.ar)
Date: June 17, 2022 01:25AM

Hello, thanks for answering. I looked for the file in the corresponding folders and there are 2 files called hosts. One is an iCalendar file and the other is a text document. It seems that the problem would be that the antivirus is blocking it

Options: ReplyQuote
Re: Wampserver error
Posted by: RiggsFolly (Moderator)
Date: June 17, 2022 10:23AM

You have to tell your anti virus to allow wampmanager to update the HOSTS file

---------------------------------------------------------------------------------------------
(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-

Options: ReplyQuote
Re: Wampserver error
Posted by: dyld (---.telecentro-reversos.com.ar)
Date: June 21, 2022 07:02PM

Hello, sorry for the delay. I saw that in the Wampserver menu, pressing with the left click, an option appears that says "Warning. Hosts file not writable". I clicked on it and it opened a window similar to the CMD that said this:

Warning


There is problem with the file C:\Windows\System32\drivers\etc\hosts
In order to create or modify VirtualHost,
it is imperative to be able to write to the hosts file.
Check that your anti-virus allows to write the hosts file.

----------------------------------------
The file C:/Windows/system32/drivers/etc/hosts does not exists

Press ENTER to continue

Options: ReplyQuote
Re: Wampserver error
Posted by: RiggsFolly (Moderator)
Date: June 22, 2022 04:07PM

Ok,
So did you find out what was locking it? And did you do something about it??

---------------------------------------------------------------------------------------------
(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-

Options: ReplyQuote


Sorry, only registered users may post in this forum.