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

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.9 32 bit - Apache 2.4.54 - PHP 8.1.8…5.6.40 - MySQL 5.7.39 - MariaDB 10.5.13/10.6.5
Wampserver 3.2.9 64 bit - Apache 2.4.54 - PHP 8.1.8…5.6.40 - MySQL 5.7.39/8.0.30 - MariaDB 10.5.15/10.7.3
PhPMyadmin 5.1.3 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

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.2.8 32bit & 64bit) Aestan Tray Menu 3.2.4.7
<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.2.8 32bit & 64bit) Aestan Tray Menu 3.2.4.7
<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.