I've looked all over google and the site and none of the solutions I've tried have worked... maybe my problem requires something a little more specific.
When I have this site hosted on a test site, it works fine, but I'm getting this error when I use "Inspect Element" on Chrome: Failed to load resource: the server responded with a status of 403 (Forbidden). I can tell the jquery file isn't being accessed properly by my site because the jquery that works perfectly on my Go Daddy test site (a cool little tool called Tablesorter) isn't working anymore.
The jquery.min.js file is in a directory called js. Here's the entirety of the head in my html file.
<head>
<title>Corporate Dude, Data Management</title>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.tablesorter.js"></script>
<link rel="stylesheet" type="text/css" href="style.css?v=1.9"/>
<script type="text/javascript">
$(document).ready(function()
{
$("#data_table").tablesorter();
}
);
</script>
</head>
The weird thing is that when I move the style.css file into the js directory and change the path to js/style.css, the css works just fine. Does this mean it's not a permissions issue or is it just a peculiarity of the way href works in the link tag?
I've tried going to the terminal and typing cd /Users/myusername/mylocalhostfile/"Corporate Guy"/js then typing chmod 0755 to give permission to access the directory, but that didn't work either. Is this the proper way to assign permissions through the terminal?
Thanks for any help you can give me.
I've looked all over google and the site and none of the solutions I've tried have worked... maybe my problem requires something a little more specific.
When I have this site hosted on a test site, it works fine, but I'm getting this error when I use "Inspect Element" on Chrome: Failed to load resource: the server responded with a status of 403 (Forbidden). I can tell the jquery file isn't being accessed properly by my site because the jquery that works perfectly on my Go Daddy test site (a cool little tool called Tablesorter) isn't working anymore.
The jquery.min.js file is in a directory called js. Here's the entirety of the head in my html file.
<head>
<title>Corporate Dude, Data Management</title>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.tablesorter.js"></script>
<link rel="stylesheet" type="text/css" href="style.css?v=1.9"/>
<script type="text/javascript">
$(document).ready(function()
{
$("#data_table").tablesorter();
}
);
</script>
</head>
The weird thing is that when I move the style.css file into the js directory and change the path to js/style.css, the css works just fine. Does this mean it's not a permissions issue or is it just a peculiarity of the way href works in the link tag?
I've tried going to the terminal and typing cd /Users/myusername/mylocalhostfile/"Corporate Guy"/js then typing chmod 0755 to give permission to access the directory, but that didn't work either. Is this the proper way to assign permissions through the terminal?
Thanks for any help you can give me.
Share Improve this question asked Oct 3, 2014 at 20:41 MarvinLazerMarvinLazer 3182 gold badges6 silver badges16 bronze badges 9-
Sounds like a
.htaccess
problem. – Barmar Commented Oct 3, 2014 at 20:45 - There's an .htaccess file in my localhost folder? – MarvinLazer Commented Oct 3, 2014 at 20:48
- You're accessing your folder through a webserver. "403 Forbidden" is an HTTP error. – Barmar Commented Oct 3, 2014 at 20:49
- The address I type in my browser to access the site that's creating the error is localhost/~myusername/Corporate%20Guy/index.php. Does that help? – MarvinLazer Commented Oct 3, 2014 at 20:54
-
Yes, that confirms what I said. The scheme is defaulting to
http:
, so that's short forhttp://localhost/~myusername/Corporate%20Guy/index.php
– Barmar Commented Oct 3, 2014 at 20:55
2 Answers
Reset to default 3I had the same problem: accessing jquery locally would not work but accessing it remotely from "http://code.jquery./jquery-1.7.2.min.js" would work. The problem is that when I downloaded jquery it was stored without reading access to everyone (as json_parse... has below):
-rw-r----- 1 jorge jorge 94840 ago 6 04:07 jquery-1.7.2.min.js
-rw-r--r-- 1 jorge jorge 9866 jun 25 06:18 json_parse_20091204.js
I changed it thus: chmod +r jquery-1.7.2.min.js
-rw-r--r-- 1 jorge jorge 94840 ago 6 04:07 jquery-1.7.2.min.js
Please check file permissions; it should have read access. I was facing the same issue with AngularJS lib; When I was trying to access it from locally running apache2 server, I was getting: Failed to load resource: the server responded with a status of 403 (Forbidden)
The file had not read permissions:
-rw-r----- 1 root root 147059 Aug 29 20:20 angular.min.js
Added read-permissions by running:
sudo chmod +r angular.min.js
And now it's working fine.