JQuery not loading

I am using php.

When I use jQuery-1.3.2-min.js on google server, it loads and everything works fine.

But when I try to use the one that I uploaded to my server, Firebug gives me the following:

1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 2<html><head> 3<title>403 Forbidden</title> 4</head><body> 5<h1>Forbidden</h1> 6<p>You don't have permission to access /path/to/scripts/jquery-1.3.2.min.js 7on this server.</p> 8<hr> 9<address>Apache/2.2.12 (Ubuntu) Server at localhost Port 80</address> 10</body></html> 

How can i fix this? I need to change some parameters in Apache.

Another thing is that there is another js file (the one that uses jquery) that loads just fine. It is located in the same folder as jquery-1.3.2.min.js (i.e., in the script folder).

+3
source share
7 answers

It sounds like a problem with the permissions of the file itself. Try

 chmod 755 /local/path/to/jquery-1.3.2.min.js 
+12
source

It just happened to me very similarly. For me, this caused a file that did not work and copied the contents of the file to a new file. EG. In my case, take the jQuery file, open it, copy to a new JS file, save, move the old file, put the new file in the same place with the same name ... then everything was fine.

+2
source

You need to check the user rights for these directories / files. Think about how to contact your host about this problem if you cannot solve it yourself.

0
source

If apache can read one file, but not another. Check permissions to use the chmod or chown file and see if this has changed. Set the file to the same permissions as another javascript file that loads normally.

0
source

Besides checking permissions, prefix the path with this, and then see:

 $_SERVER[DOCUMENT_ROOT]; 
0
source

If the suphp module is included in apache, you must configure the permissions and owner of the jquery file. Take a look at file permissions with

 cd /path/to/scripts ls -l *.js 

if the permissions are different, you can configure the permissions of the jquery-1.3.2.min.js file, for example,

 chmod 664 jquery-1.3.2.min.js 

and if the owner is different, you can set it up with

 chown user:group jquery-1.3.2.min.js 
0
source

This solution will not fix the permission issue, but it’s better to download the jQuery library from Google.

Google hosts several popular JS libraries.

The main advantage is that many people have already downloaded the file from Google, so they already have it in the cache. This saves you a lot of bandwidth, and pages load faster for most of your visitors.

You can simply use this URL to enable api. ( more details )

http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js

0
source

Source: https://habr.com/ru/post/1369097/


All Articles