Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have some strange error messages in my Apache error log:

Line: 106 Error: syntax error at token &
Line: 81 Error: syntax error at token $

Now my guess is that these refer to an error in some configuration file. However, the message is decidedly unhelpful as to which configuration file produces the error. The main configuration files pass the apachectl configtest test so I guess it isn't in one of those which means that it is probably in an .htaccess somewhere. Is there a way to make these error messages a little more informative? How does apache count lines? Is it per-file, or on a global basis?

(The system is apache2 on Linux, if that helps)

share|improve this question

1 Answer 1

up vote 2 down vote accepted

These are not apache log messages; they're most likely CGI or PHP (whichever you use).

apachectl configtest does not validate "the main files"- it validates the configuration - all of it.

(.htaccess files are NOT part of the configuration.)

.htaccess failures are not logged as "files"- they just produce a 500 error.

share|improve this answer
    
I assumed that they weren't PHP error messages as they didn't seem to be related to a particular request. PHP error messages seem to follow the pattern "[Date Time] [error] [client IP] PHP Warning: warning in file line number" whereas these were just the lines I quoted: no context whatsoever. The previous error in the log file was about a missing favicon. –  Loop Space Mar 1 '12 at 11:16
    
If an .htaccess file contains invalid data, apache will log a 500 Internal Server error. –  adaptr Mar 1 '12 at 11:20
    
However, that did give me the hint to go digging further and I found a few more examples some of which complained about $$. Complaining about $ and $$ and complaining about tokens is a very TeX-like thing to do and, sure enough, I'm running a TeX-like process elsewhere and these errors are from that. So thanks for the help - I now know I can safely ignore them. –  Loop Space Mar 1 '12 at 11:21
    
Why on earth would there be TeX errors in a web server error log ? –  adaptr Mar 1 '12 at 11:22
    
I said TeX-like, not TeX. It's an instiki installation running itex2MML as part of the wiki-to-XHTML conversion. (However, as I'd installed some PHP stuff I was watching the error logs with PHP in my head and had forgotten about this other part, hence my initial confusion.) –  Loop Space Mar 1 '12 at 11:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.