FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: Sledgehammer (---.range86-165.btcentralplus.com)
Date: December 17, 2014 10:20PM

Requested information:

Windows 7 32-bit
Apache 2.4.9
PHP 5.5.12
MySQL 5.6.17
WampServer icon: green

Re Question 7:

127.0.0.1 localhost
127.0.0.1 first-project

::1 localhost
::1 first-project

Re Question 8: Yes, I have access to absolutely everything except my procjects (under 'Your Projects').

Re Question 9: Yes, I can access phpMyAdmin.

Re Question 10: 'Forbidden. You don't have permission to access / on this server. Apache/2.4.9 (Win32) PHP/5.5.12 Server at first-project Port 80.'

Re Question 11: Windows Firewall and Microsoft Security Essentials.

Re Question 12: C:\wamp.

----------------------------

Hello everyone

I wonder if you might be able to help me with this damned thing. I've spent over fifteen hours on this so far today and have now reached the point of delirium.

I am trying to set up WampServer so that I can test a contact form script for my website. As I fully expected before I even started this, nothing worked properly. To cut a long story short, I eventually found this thread:

[forum.wampserver.com]

I have followed every stage of those instructions, and confirmed that everything was working with a green WampServer icon after each and every change that I made. I can access everything in Local Host and phpMyAdmin except for my project files. The error I get is this:

Forbidden. You don't have permission to access / on this server. Apache/2.4.9 (Win32) PHP/5.5.12 Server at first-project Port 80.

I have been through every thread I can find on the subject, mainly on StackOverflow, and I found that either my configuration already had what appeared to be the suggested settings, or that what was indicated didn't seem to exist in the indicated form in my set-up.

Just in case this is of any significance, I tried a 'ping localhost' command (as suggested in a different forum) and it came back as an under 1ms reply from ::1:.

---------------------------

My Apache access log has this in it (not the whole file, just the latest end of it):

token=7943b7d5e8345d2493a556c9b8b8f765&scripts[]=jquery/jquery-1.8.3.min.js&scripts[]=ajax.js&scripts[]=keyhandler.js&scripts[]=jquery/jquery-ui-1.9.2.custom.min.js&scripts[]=jquery/jquery.sprintf.js&scripts[]=jquery/jquery.cookie.js&scripts[]=jquery/jquery.mousewheel.js&scripts[]=jquery/jquery.event.drag-2.2.js&scripts[]=jquery/jquery-ui-timepicker-addon.js&scripts[]=jquery/jquery.ba-hashchange-1.3.js&scripts[]=jquery/jquery.debounce-1.0.5.js&scripts[]=jquery/jquery.menuResizer-1.0.js&scripts[]=cross_framing_protection.js&scripts[]=rte.js&scripts[]=tracekit/tracekit.js&scripts[]=error_report.js&scripts[]=doclinks.js&scripts[]=functions.js&scripts[]=navigation.js&scripts[]=indexes.js&scripts[]=common.js&scripts[]=codemirror/lib/codemirror.js&scripts[]=codemirror/mode/sql/sql.js&scripts[]=codemirror/addon/runmode/runmode.js HTTP/1.1" 200 1039434
127.0.0.1 - - [17/Dec/2014:20:42:21 +0000] "GET /phpmyadmin/version_check.php?&_nocache=1418848940935634221 HTTP/1.1" 200 39
127.0.0.1 - - [17/Dec/2014:20:44:26 +0000] "GET / HTTP/1.1" 200 4929
127.0.0.1 - - [17/Dec/2014:20:44:26 +0000] "GET /index.php?img=favicon HTTP/1.1" 200 1429
127.0.0.1 - - [17/Dec/2014:20:44:26 +0000] "GET /index.php?img=pngPlugin HTTP/1.1" 200 548
127.0.0.1 - - [17/Dec/2014:20:44:26 +0000] "GET /index.php?img=pngFolder HTTP/1.1" 200 850
127.0.0.1 - - [17/Dec/2014:20:44:26 +0000] "GET /index.php?img=pngWrench HTTP/1.1" 200 741
127.0.0.1 - - [17/Dec/2014:20:44:26 +0000] "GET /index.php?img=favicon HTTP/1.1" 200 1429
127.0.0.1 - - [17/Dec/2014:20:44:26 +0000] "GET /index.php?img=gifLogo HTTP/1.1" 200 4549
127.0.0.1 - - [17/Dec/2014:20:44:26 +0000] "GET /index.php?img=pngFolderGo HTTP/1.1" 200 694

----------------------------------

My Apache error log shows the following (again, just the latest end of the file):

Starting 64 worker threads.
[Wed Dec 17 20:17:16.339090 2014] [mpm_winnt:notice] [pid 2808:tid 396] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Wed Dec 17 20:17:18.367094 2014] [mpm_winnt:notice] [pid 4648:tid 312] AH00364: Child: All worker threads have exited.
[Wed Dec 17 20:17:18.429494 2014] [mpm_winnt:notice] [pid 2808:tid 396] AH00430: Parent: Child process 4648 exited successfully.
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Wed Dec 17 20:17:20.114297 2014] [mpm_winnt:notice] [pid 3108:tid 396] AH00455: Apache/2.4.9 (Win32) PHP/5.5.12 configured -- resuming normal operations
[Wed Dec 17 20:17:20.114297 2014] [mpm_winnt:notice] [pid 3108:tid 396] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:13:13
[Wed Dec 17 20:17:20.114297 2014] [core:notice] [pid 3108:tid 396] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.9'
[Wed Dec 17 20:17:20.114297 2014] [mpm_winnt:notice] [pid 3108:tid 396] AH00418: Parent: Created child process 5456
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Wed Dec 17 20:17:20.722698 2014] [mpm_winnt:notice] [pid 5456:tid 312] AH00354: Child: Starting 64 worker threads.

---------------------------------------------


I have been through everything I can find mentioned to do with the following files:

Wampmanager.tpl
Httpd-vhosts.conf
Hosts (in Windows System 32 drivers)
Httpd.conf
Phpmyadmin.conf

Anything I changed in any of these files was copied from the original setting, then the original setting commented out to preserve it. Afterwards the things I tried were deleted and the original settings un-commented to restore them. I used administrator access to edit files where instructed. After every stage of every single change I confirmed I still had the green WampServer icon, which I had throughout.

I have no idea what else to try as I have now got to the stage of having read everything available and keep coming up with the same information when I search for answers.

Thank you very much in advance if you can advise me what might be wrong. I must admit that this has turned out precisely as I expected, although I did dare to hope that it might be a straight forward case of installing the program, then using it!

Options: ReplyQuote
Re: FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: RiggsFolly (---.as43234.net)
Date: December 17, 2014 10:51PM

Hi Sledge,

Well the first thing that I noticed was that you said that you have access to everything that came with the WAMPServer install i.e. the homepage/phpMyAdmin ... etc.

So it was a straight forward case of installing the program, then using it!


All problems you have after that are of your own making! Presumably due to lack of experience/knowledge !!



Now the first thing that SHOUTS at me is that you have not deleted the DUMMY example stuff that existed in the httpd-vhosts.conf file which is why you are getting these errors in the Apache error log

AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist

Please note this line in the tutorial you say you followed to the letter, in Step 1
-- If this is the first time you edit this file, remove the default example code, it is of no use.

So edit \wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhost.conf and remove these lines

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "c:/Apache24/docs/dummy-host.example.com"
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"
    ServerName dummy-host2.example.com
    ErrorLog "logs/dummy-host2.example.com-error.log"
    CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

Afterall they are pointing at a folders that OBVIOUSLY do not exist.




Please post your httpd-vhost.conf file so I can see what you have done in there

---------------------------------------------------------------------------------------------
(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: FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: Sledgehammer (---.range86-165.btcentralplus.com)
Date: December 17, 2014 11:18PM

Hello, and thank you for your reply!

Yes, definitely a lack of experience and knowledge here. My WampServer experience totals just over fifteen hours so far!

I'm very glad that the problem was something obvious, so I will now go and amend those parts, as you have instructed.

Regarding the VirtualHost example code, I left those in because the wording implied to me that it would be of no consequence leaving them in there. Where it said 'it is of no use', that meant to me that it doesn't do anything, rather than it meaning 'it will stop it from working'.

If it said something along the lines of 'if this is the first time you edit this file, remove the default example code, otherwise it will prevent it from working,' then I think I would have been okay, and consequently had fifteen extra hours today for spending on doing something else wrong instead.


Thank you again for your help. I'm not surprised that it was something blindingly obvious to someone who knows what they're doing. I don't think I would ever have thought of removing that example code!

Options: ReplyQuote
Re: FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: Sledgehammer (---.range86-165.btcentralplus.com)
Date: December 17, 2014 11:37PM

Sorry, I missed your last request. The contents of my httpd-vhosts.conf file are as follows:

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:[httpd.apache.org];
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#

<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>


<VirtualHost *:80>
DocumentRoot "c:/wamp/www/first-project"
ServerName project1
<Directory "c:/wamp/www/first-project">
AllowOverride All
Require local
</Directory>
</VirtualHost>

----------------------------


I have removed the offending example code. I no longer get the error message when I try to access my project via Local Host, but now it only re-loads the Local Host page when I click on my project link.

My project file currently contains one file called 'index.php', and the contents of that file are:

<?php
/**
* TechieRoop PHP Tutorial
*
* Hello World Program.
*/
echo 'Hello World !';
?>

I was just using that file to confirm everything was working (which it wasn't!) before I moved on to try my contact form script (which I haven't yet!).

Options: ReplyQuote
Re: FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: Sledgehammer (---.range86-165.btcentralplus.com)
Date: December 17, 2014 11:41PM

Here is the latest part of my error log now:


[Wed Dec 17 22:23:51.690434 2014] [mpm_winnt:notice] [pid 3108:tid 396] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Wed Dec 17 22:23:53.718437 2014] [mpm_winnt:notice] [pid 5456:tid 312] AH00364: Child: All worker threads have exited.
[Wed Dec 17 22:23:53.765238 2014] [mpm_winnt:notice] [pid 3108:tid 396] AH00430: Parent: Child process 5456 exited successfully.
[Wed Dec 17 22:23:55.871241 2014] [mpm_winnt:notice] [pid 2688:tid 380] AH00455: Apache/2.4.9 (Win32) PHP/5.5.12 configured -- resuming normal operations
[Wed Dec 17 22:23:55.871241 2014] [mpm_winnt:notice] [pid 2688:tid 380] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:13:13
[Wed Dec 17 22:23:55.871241 2014] [core:notice] [pid 2688:tid 380] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.9'
[Wed Dec 17 22:23:55.871241 2014] [mpm_winnt:notice] [pid 2688:tid 380] AH00418: Parent: Created child process 4928
[Wed Dec 17 22:23:56.386042 2014] [mpm_winnt:notice] [pid 4928:tid 296] AH00354: Child: Starting 64 worker threads.

Options: ReplyQuote
Re: FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: RiggsFolly (---.as43234.net)
Date: December 17, 2014 11:50PM

That contains no errors. Thats a normal log resulting from a clean Apache startup.

Can you try adding this line to your VHOST Definition please

Options Indexes FollowSymLinks

Like so

<VirtualHost *:80>
   DocumentRoot "c:/wamp/www"
   ServerName localhost
   ServerAlias localhost
   <Directory "c:/wamp/www">
      AllowOverride All
      Options Indexes FollowSymLinks
      Require local
</Directory>
</VirtualHost>


<VirtualHost *:80>
   DocumentRoot "c:/wamp/www/first-project"
   ServerName project1
   <Directory "c:/wamp/www/first-project">
      AllowOverride All
      Options Indexes FollowSymLinks
      Require local
   </Directory>
</VirtualHost>

---------------------------------------------------------------------------------------------
(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: FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: Sledgehammer (---.range86-165.btcentralplus.com)
Date: December 18, 2014 12:00AM

Okay, I did that. Copied and pasted, just to confirm:

<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp/www">
AllowOverride All
Options Indexes FollowSymLinks
Require local
</Directory>
</VirtualHost>


<VirtualHost *:80>
DocumentRoot "c:/wamp/www/first-project"
ServerName project1
<Directory "c:/wamp/www/first-project">
AllowOverride All
Options Indexes FollowSymLinks
Require local
</Directory>
</VirtualHost>


I saved the file and re-started WampServer, but this time the icon gets stuck on orange. I tried exiting and re-starting, but it's still only getting as far as the orange icon.

Error log here:

[Wed Dec 17 22:55:11.498138 2014] [mpm_winnt:notice] [pid 2688:tid 380] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Wed Dec 17 22:55:13.526141 2014] [mpm_winnt:notice] [pid 4928:tid 296] AH00364: Child: All worker threads have exited.
[Wed Dec 17 22:55:13.541741 2014] [mpm_winnt:notice] [pid 2688:tid 380] AH00430: Parent: Child process 4928 exited successfully.

Options: ReplyQuote
Re: FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: RiggsFolly (---.as43234.net)
Date: December 18, 2014 12:55AM

Just checking, are you running all this on the same PC as WAMPServer is installed or are you trying to get to your site from another PC?

---------------------------------------------------------------------------------------------
(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: FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: Sledgehammer (---.range86-165.btcentralplus.com)
Date: December 18, 2014 01:07AM

It's all on the same PC. It's a Lenovo T510 and it has a Samsung 120GB 840 EVO SSD. It has Windows 7 Professional, Service Pack 1, and it has all the latest updates.

I have uninstalled and re-installed WampServer several times during my recent attempts.

Options: ReplyQuote
Re: FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: RiggsFolly (---.as43234.net)
Date: December 18, 2014 10:52AM

There is something odd going on here:

If you would like to try getting together on a TeamViewer session we can try that, assuming you have a half decent bandwidth.

If so, I am in the GMT timezone, as are you judging by your location info. I am at my desk 09:00 - 16:30 and then sometimes long into the evening. Send me a time when you are available and we will try and find a time that suits us both.

Then, install TeamViewer and send me a Private Message with the TeamViewer ID and PASSWORD just before the arranged time,so I can connect to you.

---------------------------------------------------------------------------------------------
(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: FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: Sledgehammer (---.range86-165.btcentralplus.com)
Date: December 18, 2014 11:54AM

Thanks very much! Yes, I'm in England, so the times work out well. I'm often up all night so any time would suit. I'll sort out the TeamViewer in a moment.

I'm just trying to think if there is anything else of significance that may be causing the problem. I did download WordPress to use at a later date (with a view to using that platform for my static website), and that is in a separate 'mysite' folder in C:\wamp\www.

I am also using Foundation 5 with SCSS, so I have everything to do with that installed (using this page [foundation.zurb.com]), which is all working. Therefore I have Git, NodeJS and Ruby 1.9.3.

I have been editing all the above - including the WampServer files - in Sublime Text 2, just in case that is of significance.

Thanks again for your help. I'll send you a PM when I am set up with TeamViewer.

Options: ReplyQuote
Re: FORBIDDEN: Can't access my project. Tried everything. 15 hours spent so far.
Posted by: Sledgehammer (---.range86-165.btcentralplus.com)
Date: December 18, 2014 07:40PM

A big thank you to RiggsFolly for helping me out via TeamViewer today.

It was fascinating to see my cursor zooming about the screen and fixing things right before my eyes. Naturally of course, the problem was all my own work: I had left a rogue hashtag in one file, which was commenting-out part of something that shouldn't have been commented out. The other problem was me not ensuring continuity of file names between entries in two important files, the result of which was WampServer not being able to find the other half of what it needed to.

I really should have noticed those problems, but at least I have learnt a bit more and now know what kinds of things to look for next time I render something inoperable.

Thanks again, and apologies for the nuisance! :-D

Options: ReplyQuote


Sorry, only registered users may post in this forum.