So, i'm trying to use Silex on my dreamhost account and I'm getting an error
Fatal error: Class 'Phar' not found in blah blah blah...
when I try to include the Silex.phar file. When I look at phpinfo(), there isn't a section for Phar, even though everything I've seen claims that Phar support should be included by default in php 5.3.whatever, which is what i'm running under. Any Ideas?
Figured it out. If you add a directory at
~/.php/5.3/
and then put a file calledphprc
in it with the following line in itthen the phar extension gets loaded.
I found you have to put some more lines in the phprc file for it to work in FastCGI mode
You will generally not be able to enable/disable things in the PHP configuration on a shared host. There are a number of things that can often be tweaked with settings in .htaccess files depending on your host's setup, but enabling modules/libraries is not one of them.
Most hosts do not run entirely with the default PHP options for one reason or another, so even though it is included by default in the standard distribution you can not rely on finding in included on any given host.
You need to contact your host. They may be willing to enable the feature for you if it is something that might be useful to their customers more generally, or it may be something they already have enabled on some hosts (but have more rolled out to all yet) in which case they could move your account to a server that has it already.