Apache Syntax Error In Type Map
Contents |
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack apache syntax error on line Overflow the company Business Learn more about hiring developers or posting ads with us Server apache syntax error cannot load Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. apache php syntax error Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Apache treating files with
Apache Server Where To Put Html Files
“.var[.]” in their names as type-maps up vote 3 down vote favorite So today at work I ran into a strange problem. An application I was writing had a JavaScript file named form.sales.var.js, placed in the same directory as other JS files. However, when the browser tried to load the JS file, the server returned a 500 Internal Server Error page. The Apache log showed the entry: Syntax error in type map, http localhost index html no ':' in /var/www/... —followed by the rest of the file path and the file's contents. I did some research on Google regarding the issue and found that this was likely caused by the filename containing .var., causing Apache to treat it as a type-map. Since it wasn't, a syntax error occurs. My questions now are: Why is a .js file being treated as a type-map when the documentation says that type maps are *.var files? Is it just that my web server is misconfigured, or can others test to see if their web servers produce the same errors with files named something.var.something? Why is there no documentation of this problem, and why is it so rarely reported, even though this behavior seems to have existed since Apache 1.3? It seems like it would be a more common issue. Are type-maps commonly used? Is there any foreseeable issues with disabling them in Apache? What is the best way to address this issue (aside from renaming the file and not using any filenames that contain .var.)? apache-2.2 configuration httpd mime-type share|improve this question asked Jul 10 '10 at 0:55 Lèse majesté 299210 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted That's part of Apache httpd's Content Negotiation. Just remove
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Why won't my local Apache open html pages? up vote 2 down vote favorite so, I'm running Apache on my laptop. If I go to "localhost", I get http://serverfault.com/questions/159152/apache-treating-files-with-var-in-their-names-as-type-maps the page that says, If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page. except, I can't add content and replace that page. I can click on its links, and that works fine. First of all, there's not even an "index.html" document in that directory. If I try to directly access one that I created http://stackoverflow.com/questions/60213/why-wont-my-local-apache-open-html-pages with localhost/index.html, I get "the request URL was not found on the server." So, I'm not even sure where that page is coming from. I've searched for words in that page under the apache directory, and nothing turns up. It seems to redirect somewhere. Just as a test, I KNOW that it loads localhost/manual/index.html (doesn't matter what that is) so I tried to replace that with something I've written, and I received the message The server encountered an internal error or misconfiguration and was unable to complete your request. The error log says, [Fri Sep 12 20:27:54 2008] [error] [client 127.0.0.1] Syntax error in type map, no ':' in C:/Program Files/Apache Group/Apache2/manual/index.html for header \r\n But, that page works fine if I open directly with a browser. so, basically, I don't know what I don't know here. I'm not sure what apache is looking for. I'm not sure if the error is in my config file, my html page, or what. Oh, and the reason I want to open this using apache is (mainly) because I'm trying to test some php, so I'm trying to get apache to run locally. Thanks. apache share|improve this question asked Sep 13 '08 at 0:38 Baltimark 3,50192933 add a comment| 3 Answers 3 active oldest votes up vote 3 down vote accepted "By default, your pages should be placed in the "C:\Program Files\Apache Group\A
Printing -XML -Clone This Bug -Last Comment First Last Prev Next This bug is not in your last search results. Bug127343 - PHP https://bugzilla.redhat.com/show_bug.cgi?id=127343 manual (ref.var.html) causes 500 error Summary: PHP manual (ref.var.html) causes 500 error Status: CLOSED NOTABUG Aliases: None Product: Fedora Classification: Fedora Component: httpd (Show other bugs) Sub Component: --- Version: 2 Hardware: i386 https://ubuntuforums.org/archive/index.php/t-2107609.html Linux Priority medium Severity low TargetMilestone: --- TargetRelease: --- Assigned To: Joe Orton QA Contact: Docs Contact: URL: Whiteboard: Keywords: Depends On: Blocks: Show dependency tree /graph Reported: 2004-07-06 16:17 syntax error EDT by Steve Fox Modified: 2007-11-30 17:10 EST (History) CC List: 0 users See Also: Fixed In Version: Doc Type: Bug Fix Doc Text: Story Points: --- Clone Of: Environment: Last Closed: 2004-07-06 16:36:36 EDT Type: --- Regression: --- Mount Type: --- Documentation: --- CRM: Verified Versions: Category: --- oVirt Team: --- RHEL 7.3 requirements from Atomic Host: Cloudforms Team: --- Attachments (Terms of Use) apache syntax error ref.var.html (8.60 KB, text/html) 2004-07-06 16:20 EDT, Steve Fox no flags Details Add an attachment (proposed patch, testcase, etc.) Groups: None (edit) Description Steve Fox 2004-07-06 16:17:30 EDT From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 Galeon/1.3.15 Description of problem: I have the PHP manual (multiple files) downloaded from http://www.php.net/get/php_manual_en.tar.gz/from/a/mirror and am trying to view chapter CXIV "Variable Functions". Trying to view this document through http://localhost throws a 500 error and the apache log shows: [Tue Jul 06 14:44:16 2004] [error] [client 127.0.0.1] Syntax error in type map, no ':' in /home/drfickle/public_html/docs/PHP/ref.var.html for header \n Version-Release number of selected component (if applicable): httpd-2.0.49-4 How reproducible: Always Steps to Reproduce: 1.Download the PHP manual and extract it. 2. Load http://localhost/PHP/ref.var.html in my browser 3. 500 error shown Additional info: I get this same error with Mozilla and elinks. I can use these browsers to read the file properly off the file system, avoiding Apache. As far as I can tell, no other pages in the manual have this problem. I am using an ext3 filesystem and have this same problem on another machine wi
by browser on 12.04.1 alex2356January 22nd, 2013, 03:48 PMI am running Ubuntu 12.04.1 and trying to get a php script to work within the browser. I am not very experienced with these things, and searching the issue on the net brought no real clue what I am missing. If, for any reason, this problem is nor well described or belongs to another forum, please let me know! On the system I seem to have apache2 running, the file /etc/apache2/httpd.conf is empty, and a httpd service does not seem to exist. What do I need to check/enable/install to be able to get a php script interpreted by the browser (current firefox). jonedneyJanuary 22nd, 2013, 04:31 PMHey Alex, On Ubuntu, things are in different locations that say CentOS. The service name for Apache is apache2, you can test to see if it is running by using the following command: service apache2 status Did you install services on this server? Did you install PHP? Examples may be helpful also. alex2356January 22nd, 2013, 04:37 PMHere is the requested output: service apache2 status Apache2 is running (pid 7197). Here is the test file (located in /var/www - do I have to store the php file there or can I store it anywhere?):
"; echo $_SERVER['HTTP_USER_AGENT']; phpinfo(); ?> and the command php5 -r 'phpinfo();' gives a lot of output. olegioJanuary 22nd, 2013, 05:33 PMMaybe this can help.. https://wiki.ubuntu.com/UserDirectoryPHP alex2356January 22nd, 2013, 05:57 PMHi, I have tried the instructions in the link, but I still have the identical behavior. The browser is trying to download the php file instead of processing it. Doug SJanuary 22nd, 2013, 07:03 PMIs libapache2-mod-php5 installed? How to check: doug@doug-64:~$ dpkg -l | grep libapache ii libapache2-mod-php5 5.3.10-1ubuntu3.4 server-side, HTML-embedded scripting language (Apache 2 module)And if not, how to install: sudo apt-get install libapache2-mod-php5 Edit: what is the file name you are using? and will it be recognised as a php file? olegioJanuary 22nd, 2013, 07:39 PMYou might also need to change DocumentRoot in "/etc/apache2/sites-enabled/000-default" from "/var/www" to the folder with your php file (~/public_html). (or put your index.php file in "/var/www"). The browser should be pointing to http://localhost when you try to test it locally. Hi, I have tried the instructions in the link, but I still have the identical behavior. The browser is tryi