Good evening
I'm running WAMP Server 3.2.0 (64bit) and I am experiencing errors when I try to add virtual hosts.
When I try to create a new virtual host I get the 3 errors which are indicated in point 10 further 10.
I have tried many things to solve that issue and tried to find solutions on the net, but I have not been able to solve my problem.
I have tried to reinstall again WAMP following all the instructions in your installation guidelines, but it did not change anything.
So I contact you to see if you could help me solve my problem.
Here are all the answers to your questions to help you find a possible solution.
1 - Windows version used (Specify version number AND whether 32 or 64 bit)
-> Windows NT 10.0 build 17763 (Windows 10) AMD64
-> Windows 10 Professional – version 1809
-> Build Date Nov 19 2019 13:50:18
-> Compiler MSVC15 (Visual C++ 2017)
->Architecture x64 bits
2 - Version WampServer (Specify version number AND whether 32 or 64 bit)
WAMP Server 3.2.0 (64bit)
installed from file wampserver3.2.0_x64.exe downloaded from [sourceforge.net]
3 - Apache Version
2.4.41, as delivered in the WAMP file I installed from
4 - PHP Version
7.3.12, as delivered in teh WAMP file I installed from
5 - MySQL Version
5.7.28, as delivered in WAMP file I installed from
5a - MariaDB version if applicable
10.4.10, as delivered in WAMP file I installed from
6 - What color is the WampServer icon (in the notification area of the taskbar)
GREEN
The 3 services are running
7 - In the file c:\Windows\System32\drivers\etc\hosts, what are the active lines?
* Active means no # at the beginning of the line.
There are no "active" lines, all are comments, i.e., all begin with #.
I have tried to modify this file but I cannot save it.
I have opened the Windows textEditor as an administrator and tried to modify from there but I cannot save it.
When I try to save it, I am told "The process cannot access the file because it is being used another process."
I have tried to copy the file into my destop and I have been able to modify it there.
But then it is impossible to copy it back into c:\Windows\System32\drivers\etc\
In the properties of the files it says that
- I am the administrator
- I have all the right to read, modify the file but in reality I cannot save it after I modify it.
In other words, I can open and edit the hosts file to insert the needed lines, but I cannot save the changes.
I'm using either Visual Studio Code or the simple Windows Text Editor to edit the hosts file. Even if I run it as the administrator, I cannot save the file.
8 - Do you have access to localhost (Homepage WampServer)?
YES
I am able to create files in the www.
And I can read the files I have created using Chrome Navigator through the Apache Server.
8a - If so, is there an error message at the bottom of the page?
No
9 - Do you have access to phpMyAdmin?
Yes - I am able to create databases and modify them.
10 - If you refer to an error message, please include the EXACT wording of the error in your post
It seems that everything is working OK except when I try to ad a new virtual host.
Here are the 3 error messages I have
! ) Warning: fopen(C:/WINDOWS/system32/drivers/etc/hosts): failed to open stream: Resource temporarily unavailable in C:\wamp64\www\add_vhost.php on line 472
Call Stack
# Time Memory Function Location
1 0.0009 417984 {main}( ) ...\add_vhost.php:0
2 0.0120 497424 fopen ( )
...\add_vhost.php:472
( ! ) Warning: fwrite() expects parameter 1 to be resource, bool given in C:\wamp64\www\add_vhost.php on line 473
Call Stack
# Time Memory Function Location
1 0.0009 417984 {main}( ) ...\add_vhost.php:0
2 0.0409 498040 fwrite ( )
...\add_vhost.php:473
( ! ) Warning: fclose() expects parameter 1 to be resource, bool given in C:\wamp64\www\add_vhost.php on line 510
Call Stack
# Time Memory Function Location
1 0.0009 417984 {main}( ) ...\add_vhost.php:0
2 0.0663 497800 fclose ( )
...\add_vhost.php:510
11 - If you use an Antivirus and / or Firewall, please include the names of these
I use Windows Defender as well as ZoneAlarm Antivirus from time to time.
During normal use of the PC, ZoneAlarm is used only for the firewall.
When I tried to add virtual hosts, I have desactivated all firewall systems and all antivirus systems and the 3 error messages are the same.
So I do not believe that my problem is due to the antivirus / firewalls.
Otherwise, desactivating them would solve my issue!
12 - What is the full path to the installation of WampServer (eg D:\wamp\)
c:/wamp64
13 - If you have one or more Virtual Hosts defined, please show their definition(s)
Here is the Content of httpd-vhosts.conf
Located here C:\wamp64\bin\apache\apache2.4.41\conf\extra\
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#
<VirtualHost *:80>
ServerName pbophpintro
DocumentRoot "c:/wamp64/www/coursphp/phpintro"
<Directory "c:/wamp64/www/coursphp/phpintro/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
Summary of my problem:
When I try to add a virtual host,
- I have the 3 error messages as indicated in point 10 above.
- but in the list Your virtual hosts , pbophpintro Virtual host appears.
But I cannot access to it.
- and when I look in the file hosts located here
C:/Windows/system32/drivers/etc/hosts
pbophpintro is not mentioned anywhere.
Many thanks in advance for all help you could provide me.
Philippe
I'm running WAMP Server 3.2.0 (64bit) and I am experiencing errors when I try to add virtual hosts.
When I try to create a new virtual host I get the 3 errors which are indicated in point 10 further 10.
I have tried many things to solve that issue and tried to find solutions on the net, but I have not been able to solve my problem.
I have tried to reinstall again WAMP following all the instructions in your installation guidelines, but it did not change anything.
So I contact you to see if you could help me solve my problem.
Here are all the answers to your questions to help you find a possible solution.
1 - Windows version used (Specify version number AND whether 32 or 64 bit)
-> Windows NT 10.0 build 17763 (Windows 10) AMD64
-> Windows 10 Professional – version 1809
-> Build Date Nov 19 2019 13:50:18
-> Compiler MSVC15 (Visual C++ 2017)
->Architecture x64 bits
2 - Version WampServer (Specify version number AND whether 32 or 64 bit)
WAMP Server 3.2.0 (64bit)
installed from file wampserver3.2.0_x64.exe downloaded from [sourceforge.net]
3 - Apache Version
2.4.41, as delivered in the WAMP file I installed from
4 - PHP Version
7.3.12, as delivered in teh WAMP file I installed from
5 - MySQL Version
5.7.28, as delivered in WAMP file I installed from
5a - MariaDB version if applicable
10.4.10, as delivered in WAMP file I installed from
6 - What color is the WampServer icon (in the notification area of the taskbar)
GREEN
The 3 services are running
7 - In the file c:\Windows\System32\drivers\etc\hosts, what are the active lines?
* Active means no # at the beginning of the line.
There are no "active" lines, all are comments, i.e., all begin with #.
I have tried to modify this file but I cannot save it.
I have opened the Windows textEditor as an administrator and tried to modify from there but I cannot save it.
When I try to save it, I am told "The process cannot access the file because it is being used another process."
I have tried to copy the file into my destop and I have been able to modify it there.
But then it is impossible to copy it back into c:\Windows\System32\drivers\etc\
In the properties of the files it says that
- I am the administrator
- I have all the right to read, modify the file but in reality I cannot save it after I modify it.
In other words, I can open and edit the hosts file to insert the needed lines, but I cannot save the changes.
I'm using either Visual Studio Code or the simple Windows Text Editor to edit the hosts file. Even if I run it as the administrator, I cannot save the file.
8 - Do you have access to localhost (Homepage WampServer)?
YES
I am able to create files in the www.
And I can read the files I have created using Chrome Navigator through the Apache Server.
8a - If so, is there an error message at the bottom of the page?
No
9 - Do you have access to phpMyAdmin?
Yes - I am able to create databases and modify them.
10 - If you refer to an error message, please include the EXACT wording of the error in your post
It seems that everything is working OK except when I try to ad a new virtual host.
Here are the 3 error messages I have
! ) Warning: fopen(C:/WINDOWS/system32/drivers/etc/hosts): failed to open stream: Resource temporarily unavailable in C:\wamp64\www\add_vhost.php on line 472
Call Stack
# Time Memory Function Location
1 0.0009 417984 {main}( ) ...\add_vhost.php:0
2 0.0120 497424 fopen ( )
...\add_vhost.php:472
( ! ) Warning: fwrite() expects parameter 1 to be resource, bool given in C:\wamp64\www\add_vhost.php on line 473
Call Stack
# Time Memory Function Location
1 0.0009 417984 {main}( ) ...\add_vhost.php:0
2 0.0409 498040 fwrite ( )
...\add_vhost.php:473
( ! ) Warning: fclose() expects parameter 1 to be resource, bool given in C:\wamp64\www\add_vhost.php on line 510
Call Stack
# Time Memory Function Location
1 0.0009 417984 {main}( ) ...\add_vhost.php:0
2 0.0663 497800 fclose ( )
...\add_vhost.php:510
11 - If you use an Antivirus and / or Firewall, please include the names of these
I use Windows Defender as well as ZoneAlarm Antivirus from time to time.
During normal use of the PC, ZoneAlarm is used only for the firewall.
When I tried to add virtual hosts, I have desactivated all firewall systems and all antivirus systems and the 3 error messages are the same.
So I do not believe that my problem is due to the antivirus / firewalls.
Otherwise, desactivating them would solve my issue!
12 - What is the full path to the installation of WampServer (eg D:\wamp\)
c:/wamp64
13 - If you have one or more Virtual Hosts defined, please show their definition(s)
Here is the Content of httpd-vhosts.conf
Located here C:\wamp64\bin\apache\apache2.4.41\conf\extra\
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#
<VirtualHost *:80>
ServerName pbophpintro
DocumentRoot "c:/wamp64/www/coursphp/phpintro"
<Directory "c:/wamp64/www/coursphp/phpintro/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
Summary of my problem:
When I try to add a virtual host,
- I have the 3 error messages as indicated in point 10 above.
- but in the list Your virtual hosts , pbophpintro Virtual host appears.
But I cannot access to it.
- and when I look in the file hosts located here
C:/Windows/system32/drivers/etc/hosts
pbophpintro is not mentioned anywhere.
Many thanks in advance for all help you could provide me.
Philippe