fryser_d
(Fryser D)
May 14, 2012, 2:32am
1
Hi everyone
We have a problem, we have a website on a server and everything is working perfectly.
We pull the code from git on a local machine for Dev…
The site loads… but the jQuery won’t work on [localhost].
We checked all the files and folders permissions… everything is full open to 777 and STILL nothing will work.
We checked all paths… eveything echo out the right location.
We checked with "firebug" and we get an:
[color="#0000FF "]http://localhost/MyWebsite/jsfiles/myExtruder.js
304 Not Modified[/color]
I’m really confuse, I think it might be a problem with Apache that for some reason it won’t load the .js Files.
Any of you mignt have an idea?
Thank you for your time
when you view the source and click on the generated jquery url, can you see it in your browser ? does the url looks correctly to you ?
Check the server and see if you have mod_security enabled, if so, disable it.
1- Are you using Yii framework ?
If yes then you need to register the JQuery js
2- Check the URL if it is accessible or not
Steps: right click on the page, then view source click on the jquery URL.
fryser_d
(Fryser D)
May 14, 2012, 5:23pm
4
Thank you for your quick responds.
Yes I do.
I did exactly that, and in server side, it’s working perfectly, it’s just locally that it won’t work
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->getBaseUrl(true).'/jsfiles/myExtruder.js', CCCheck the server and see if you have mod_security enabledlientScript::POS_HEAD);
Yes, the browser can see the .js and navigate in it. All the .js are read by the browser, but won’t load it
I tried to edit my .htaccess in the root folder and add
SecFilterEngine Off
SecFilterScanPOST Off
Restart Apache, but no luck… Still won’t work
Anyone have a suggestion on how I can approach the problem?
Thank you for your time
outrage
(Site Sense Web)
May 16, 2012, 12:26pm
6
In your replies, the file you are registering is not jquery, it is myExtruder.js
You need to add this before your other javascript files:
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
fryser_d
(Fryser D)
May 16, 2012, 7:33pm
7
outrage:
In your replies, the file you are registering is not jquery, it is myExtruder.js
You need to add this before your other javascript files:
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
Yes it’s all there too
But I’m still struggling to find why Apache won’t load Jquery (Localy)