Hostmonster 500 Internal Server Error (SHTML Wrapper)

David Nash linux, php 3 Comments

A client using Hostmonster was doing some hair-pulling over what appeared to be a .htaccess problem while installing a Symphony site I developed. We thought it might be related to the fact it was running on a subdomain. The server would give a blank page, and on the HTML source would show something like “500 SHTML wrapper”. It turns out this happens when group write permissions are set on the script. Via the Hostmonster Cpanel File Manager, you can right-click the file, click permissions and uncheck “write” and the script should run. The way I worked this out was: first, …

Using PHP variables that contain hyphens

David Nash php 2 Comments

This took me a little while to work out. I’m using PHP5’s SimpleXML to parse XML into a PHP object. The XML has entries like <HELLO-THERE>. But you can’t use $xml->HELLO-THERE because it reads the hyphen as a minus. Instead, use $xml->{“HELLO-THERE”} Easy!