RTFM causes 500 internal server error

2008 Oct 19 at 00:00 » Tagged as :weird, collaboration,

I can never quite remember whether it's print_r or var_dump in PHP that can send a detailed dump of an object to the server log file.  Who wants to remember it anyway, that's what the manual is there for. I want the manual to be instantly available, so I have a local copy. It's been working fine so for many years. What can go wrong with static HTML after all? Something did go wrong a few days ago. When I tried to read the documentation on variable functions. I get an internal server error. The (local) link that caused the error was:


And the detailed message in the apache error log was:

Syntax error in type map, no ':' in /var/www/html/php5.2/intro.var.html for header </div></body></html>n, referer: http://localhost/php5.2/refs.basic.vartype.html

I reckoned I could sort this out by commenting out the following line in the httpd.conf file.

#AddHandler type-map var

For good measure, I commented out a few other settings that control type mappings - the web server is being confused by the filename containing a .var in it (please see link above).

<Directory "/var/www/error"> #        AllowOverride None #        Options IncludesNoExec #        AddOutputFilter Includes html #        AddHandler type-map var #        Order allow,deny #        Allow from all #        LanguagePriority en es de fr #        ForceLanguagePriority Prefer Fallback </Directory> and lastly. 'DirectoryIndex index.html index.html.var' became just 'DirectoryIndex index.html'. After wards apache was restarted and I am merrily on my way. So what if the apache default page is now broken? That's only seen when there is configured website. That fixes that but a couple of days later I ran into another error: subrequested from r->uri Oh and by the way, it's print_r that can send the dump to the log file instead of the browser, not var_dump