Wednesday, September 23, 2015

php - Enabling phar on Dreamhost shared hosting?



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?


Answer



Figured it out. If you add a directory at ~/.php/5.3/ and then put a file called phprc in it with the following line in it




extension=phar.so


then the phar extension gets loaded.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...