Quantcast
Channel: WampServer - WampServer English
Viewing all articles
Browse latest Browse all 3177

Warning on creating virtual host (5 replies)

$
0
0
Windows version used: 10 (x64)
Version WampServer: 3.0.6
Apache Version: 2.4.23
PHP Version: 5.6.25
MySQL Version: 5.7.14
What color is the WampServer icon: GREEN

Hosts file has:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost




Do you have access to localhost (Homepage WampServer)?: Yes
Do you have access to phpMyAdmin?: Yes
If you use an Antivirus and / or Firewall, please include the names of these: Escan
What is the full path to the installation of WampServer: C:\wamp64\

httpd-vhosts.conf:

# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#


<VirtualHost *:80>
ServerName filebucket
DocumentRoot "c:/wamp64/www/filebucket"
<Directory "c:/wamp64/www/filebucket/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>









I have made a clean install of wamp 3.0.6 and installed all the distributables properly. But when I create the virtual host I get the following warning (as in my PHP error log) :

[07-Jan-2017 10:02:47 UTC] PHP Warning: fopen(C:\\Windows\\system32\\drivers\\etc\\hosts): failed to open stream: Permission denied in C:\wamp64\www\add_vhost.php on line 338

[07-Jan-2017 10:02:47 UTC] PHP Stack trace:

[07-Jan-2017 10:02:47 UTC] PHP 1. {main}() C:\wamp64\www\add_vhost.php:0

[07-Jan-2017 10:02:47 UTC] PHP 2. fopen() C:\wamp64\www\add_vhost.php:338

[07-Jan-2017 10:02:47 UTC] PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\wamp64\www\add_vhost.php on line 339

[07-Jan-2017 10:02:47 UTC] PHP Stack trace:

[07-Jan-2017 10:02:47 UTC] PHP 1. {main}() C:\wamp64\www\add_vhost.php:0

[07-Jan-2017 10:02:47 UTC] PHP 2. fwrite() C:\wamp64\www\add_vhost.php:339

[07-Jan-2017 10:02:47 UTC] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in C:\wamp64\www\add_vhost.php on line 376

[07-Jan-2017 10:02:47 UTC] PHP Stack trace:

[07-Jan-2017 10:02:47 UTC] PHP 1. {main}() C:\wamp64\www\add_vhost.php:0

[07-Jan-2017 10:02:47 UTC] PHP 2. fclose() C:\wamp64\www\add_vhost.php:376


What to do to sort this issue?

Viewing all articles
Browse latest Browse all 3177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>