Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
require aws.phar fails silently #12
I am having trouble using the phar file in a trivial script. I have a php script like the one below and when I try to run it from the command line (php script.php) any code after the require 'aws.phar' line does not get executed. It acts like the require aws.phar line was an exit line.
Note: the aws.phar is in the same directory as the script.
Suhosin does not allow phars by default. You need to enable phars specifically. I've not personally done this before, but I've read that you can do it by adding a PHP ini setting to the
Let me know how that goes.
I should note that I found out this disallowing-phars behavior is a result of my installing the extra php5-suhosin package on top of the basic apache/php packages in ubuntu precise. on a fresh server without the extra php5-suhosin package the phar works right away, without needing any extra ini file settings. Here's the php -v output from the two installs, for reference...
ubuntu with just libapache2-mod-php5:
ubuntu with libapache2-mod-php5 and optional php5-suhosin package:
when the optional php5-suhosin package is installed you need to add the ini directive as mentioned above to load the aws.phar.
thanks again & hth