Illegal characters attached to javascript file

I think my apache web server has problems. I can not reference jquery.js

I get the following errors:

With chrome:

 Uncaught SyntaxError: Unexpected token ILLEGAL 

With firefox:

 Error: illegal character Source File: http://xxxxxxxxx/test/javascript/jquery.js Line: 1 Source Code:  Hz ÚH[9 R 

Below is my test HTML

 <html> <head> <script type="text/javascript" src="javascript/jquery.js"></script> <script type="text/javascript"> function doclick(){ jQuery('#hello').attr('value', "mmmmef") } </script> </head> <body> <input type="button" name="hello" id="hello" value="hello" onclick="doclick();" /> </body> </html> 

This happens not only with jquery.js , these illegal characters are added to all js and css files.

I log in using ssh and look at these js and css files with the vi command, but there are none of these characters. But when I try to download or view / edit with Filezilla or CuteFTP FTP clients, these illegal characters are included.

What happened to my server? The same code may work on my local Windows server and another centos server.

+7
source share
1 answer

I found a solution when

http://www.cyberciti.biz/tips/apache-223-corrupt-file-download-issue.html

Just open httpd.conf and put below lines

  EnableMMAP off EnableSendfile off 

then

  # /sbin/service httpd restart 
+16
source

All Articles