5 Replies - 3707 Views - Last Post: 12 December 2012 - 03:36 PM

#1 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 219
  • View blog
  • Posts: 1,604
  • Joined: 20-January 09

Odd WAMP directory issue

Posted 12 December 2012 - 01:10 PM

So I am running into this weird issue that I've never encountered so I don't know how to solve it. On my LINUX production and dev servers I will link to my css like so:

<link href="/css/style.css" rel="stylesheet" media="all" type="text/css"/>


Then on my local machine it won't work, and it's because of the initial /, as this does work:

<link href="css/style.css" rel="stylesheet" media="all" type="text/css"/>


Similiarily in my css files I'll have background images like this:

background-image: url(/images/image.jpg);


Which works on the dev and prod servers but not wamp, and reversely this works on the wamp server:

background-image: url(images/image.jpg);


Any thoughts on why this is?

Is This A Good Question/Topic? 0
  • +

Replies To: Odd WAMP directory issue

#2 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5182
  • View blog
  • Posts: 26,886
  • Joined: 10-May 07

Re: Odd WAMP directory issue

Posted 12 December 2012 - 01:28 PM

What are the permissions on the root folder? What is the owner set to?

I can see Linux not allowing access to relative "/" if the permissions are not 777 (7 being execute), because execute is required for entering a directory. Now if the current location is relative to root, & you provide the start of the path "images", then it's going to look to images for permissions, & not "root" "permissions".

If that makes sense.

or I'm just wrong :) It's only a hunch.
Was This Post Helpful? 0
  • +
  • -

#3 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 219
  • View blog
  • Posts: 1,604
  • Joined: 20-January 09

Re: Odd WAMP directory issue

Posted 12 December 2012 - 02:01 PM

LOL. As far as the permissions go I want to leave the linux box as is it they are, for the site root:

drwxr-xr-x


Then wamp looks like this:

Modify, Read & execute, List folder contents, write

Thoughts?
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5182
  • View blog
  • Posts: 26,886
  • Joined: 10-May 07

Re: Odd WAMP directory issue

Posted 12 December 2012 - 02:11 PM

All three executes are selected, so I was wrong.

Hrm, what does the apache logs show when you try to use the root folder & it fails?
Was This Post Helpful? 0
  • +
  • -

#5 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 219
  • View blog
  • Posts: 1,604
  • Joined: 20-January 09

Re: Odd WAMP directory issue

Posted 12 December 2012 - 03:01 PM

[Wed Dec 12 12:55:39 2012] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/images, referer: http://localhost/AQQ001-Website/


I think this is happening because I don't have vhosts setup on wamp, so you can see it's looking in the root of www and not the sub directory of AQQ001-Website.
Was This Post Helpful? 0
  • +
  • -

#6 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 219
  • View blog
  • Posts: 1,604
  • Joined: 20-January 09

Re: Odd WAMP directory issue

Posted 12 December 2012 - 03:36 PM

Yep that was the issue. So used to only working locally and then moving to a prod box, so I normally don't have the vhosts set in wamp. Thanks for the help!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1