Relative, virtual or what paths?
Posted by: dickiebow (---.bagu.broadband.ntl.com)
Date: October 30, 2006 05:10AM

I am trying to develop on WAMP and love it - except every time I try to use a "../" page reference I get error messages saying the files cannot be found. The trouble is that I want to place a lot of routines inside an includes directory to save clutter but often they need to reference files both in their own level and in the level above and that is producing errors that I just cannot work round .

I am using the full <?php ?> tags

I tried following the tutorial by yfastud on configuring the WAMP server's Apache httpd.conf to do virtual hosts using the 127.0.0.1 address (my PC is on DHCP and I am the only person developing on it so don't see any reason to go via other IP addresses) and got to the site - but not only did the '../' style of link not work, but I lost access to the php MyAdmin. So I tried moving the default files down to the user level - but they lost their route to the phpMyAdmin. Then I tried to keep the port 80 pointing to just the www directory with everything restored to correct positions and my working files on port 81 and that broke Apache.

Surely I don't need to get external dns for a purely one machine setup.



Post Edited (10-30-06 13:43)

Options: ReplyQuote
Re: Relative, virtual or what paths?
Posted by: dickiebow (---.dsl.in-addr.zen.co.uk)
Date: October 30, 2006 05:41PM

Could someone tell me if this is the right solution. It seems to work!

I put the following in the httpd.conf of the apache

<Directory c:\wamp\www\mydirectoryname>
Options Indexes FollowSymLinks Includes
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>

Options: ReplyQuote
Re: Relative, virtual or what paths?
Posted by: yfastud (72.236.169.---)
Date: October 30, 2006 06:06PM

Sorry for any trouble you've got after follow my guide, but there is something I'd like to make it clear

First, I did mention to backup before attempting to make any change. Did you do it? If yes, after restore it should back to the state before change

Second, if you only run wampserver on 1 machine, why you want to setup vh in httpf.conf instead just access through localhost

Third, to be honest, I wanted my guide to help new wampserver users, but it just seems to cause them more trouble, so I think I should remove it

Again, my appology to you all if experience any problem after follow my basic guide

My best regard

Options: ReplyQuote
Re: Relative, virtual or what paths?
Posted by: dickiebow (---.bagu.broadband.ntl.com)
Date: October 30, 2006 08:45PM

Thank you for taking the trouble to reply. I actually found the seeds of my solution in your guide and then extrapolated after careful reading.

I have tested the solution I applied and so far it appears robust. It certainly is important to tweak the httpd.conf file and when I looked through in detail, I found why the port 80 issue can crash the apache - there are early references in the code to establish the www directory as the one to which :80 points. These were in obvious conflict when I tried to redefine the same spot.

BTW the menu from the sys tray is great when it offers the chance to check port 80, as well as all the other controls. Well designed mate.

Once you have put my code snippet in (I stuck it at the bottom), WAMP5 gives you access to all its functionality via phpMyAdmin plus the site directory you specify where I put 'mydirectoryname' works fine on '../' references. The Wamp front page shows the directories under www and, once you have clicked and brought up the index page of your site, you can get back to it via history or bookmark.

Options: ReplyQuote
Re: Relative, virtual or what paths?
Posted by: CyberSpatium (71.237.217.---)
Date: October 30, 2006 09:11PM

dickiebow
<Directory c:\wamp\www\mydirectoryname>
Options Indexes FollowSymLinks Includes
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>


yes, that is a valid virtual host setup.

> yfastud
>
> Second, if you only run wampserver on 1 machine, why you want to setup vh
> in httpf.conf instead just access through localhost

virtual host has nothing to do with how many machines/servers you are using. what it does is allow multiple domains and websites to use the same ip address and web server.


CyberSpatium
WAMP English Forum Administrator

Options: ReplyQuote


Sorry, only registered users may post in this forum.