Questions tagged [phar]

Phar is the PHP Archive format. It is analogous to Java's JAR files.

Phar is the PHP Archive format.

A Phar file consists of a collection of PHP scripts combined into a single compressed file, for easy distribution and installation.

More information can be found here.

320 questions
0
votes
1 answer

How to include paths to PHAR archives in the open-basedir directive?

I'm trying to use composer on my local development machine, and it always fails when trying to copy something from the PHAR archive: [ErrorException] copy(): open_basedir restriction in effect.…
ndm
  • 59,784
  • 9
  • 71
  • 110
0
votes
1 answer

AWS PHP SDK 2 (aws.phar) doesn't work in xampp

I can't seem to make aws.phar work on my local xampp (under Ubuntu). My example is very simple:
Dima L.
  • 3,443
  • 33
  • 30
0
votes
0 answers

Installing aws php sdk with phar

I am trying to use the AWS SDK for PHP 2 to create a file on S3. Installing via Phar: http://docs.aws.amazon.com/awssdkdocsphp2/latest/gettingstartedguide/sdk-php2-installing-the-sdk.html#sdk-php2-installing-via-phar I added the following line to…
Enkay
  • 1,898
  • 6
  • 24
  • 35
0
votes
1 answer

Cannot create Phar from ZFTool of Zend Framework 2

The Phar Archive of the ZFTool can be downloaded from GitHub or created manually. When I try to complite the Phar on my own, I get this error: user@machine:/lib/ZendFramework/ZFTool# bin/create-phar PHP Fatal error: Uncaught exception…
automatix
  • 14,018
  • 26
  • 105
  • 230
0
votes
1 answer

How to get executable phar command from the PHP source working?

I want to be able to work with phar command line tool (on Debian Linux) like described on this manpage. What I've done so far: downloaded the PHP PHAR source folder; moved it to /usr/share/; altered the first line of the phar.php from…
automatix
  • 14,018
  • 26
  • 105
  • 230
0
votes
1 answer

behat predefined steps

has anybody encountered the following problem: behat apparently works fine, but it has no predefined steps: the result of \tests> php .\behat\behat.phar -di is empty even the file FeatureContext.php has no steps defined. My behat version is 2.4.0,…
Andrew
  • 2,148
  • 5
  • 23
  • 34
0
votes
1 answer

Append data to tar file using PHP-PHAR

I'm using the following code to create and append data to a tar-archive in PHP. The problem is that phar does not use an exclusive lock on the tar-file causing problem when I have atomic writes to the same file. function phar_put_contents($fname,…
Fredrik Erlandsson
  • 1,279
  • 1
  • 13
  • 22
0
votes
1 answer

Can I include composer.phar in my project like a class library?

I want to use that feature in order to set dependencies right via web interface. I have found in Using Phar Archives: Introduction tutorial that it's possible to do next: But i get next error when trying to do…
0m3r
  • 33
  • 6
0
votes
1 answer

Including a PHAR that packages an existing class

I have a project that currently uses Guzzle (which is loaded [as a .phar] by an explicit "require_once" in a bootstrap file). I have been trying to add the AWSSDKforPHP from Amazon, so that I can easily handle uploads to Amazon S3. Unfortunately,…
Rican7
  • 1,125
  • 2
  • 10
  • 28
0
votes
2 answers

I am including a phar file (goutte.phar) in my php application. When I try to hit the url I get Connection to the server was reset error

Is there any specific settings in php.ini that I need to change to allow the server to include the file? require_once dirname(dirname(__FILE__)).'/unleashapi/protected/extensions/goutte.phar';
0
votes
1 answer

PHP difference between terminal and browser

There is Neo4J installed on my Ubuntu and I'm running a test code. It's perfectly working when the code runs on terminal such as: root@ekin-Inspiron-1090:/var/www# php neo.php home: demolished name: Arthur Dent But when it comes to run on browser…
gzg
  • 1,469
  • 6
  • 23
  • 39
0
votes
1 answer

phpDocumentor 2 installer fails to install symfony/Console with composer

I've downloaded (cloned) the github version of phpdocumentor 2 and followed the installation instructions found on the phpdoc website At the composer installation step 3 (php composer.phar install) I receive the following error…
Attila Fulop
  • 6,861
  • 2
  • 44
  • 50
-1
votes
1 answer

PHP Application in a single file

I want to create php app (with composer and some libs's) in a single file. First what i try is a phar. It's great , but when i enter .phar (file name can be changed to .php) file in browser it redirects me to deafult stub …
Michał G
  • 2,234
  • 19
  • 27
-1
votes
1 answer

Downloading phar with nodejs. Which encoding should be used?

I'm trying to download a phar (PHP Archive) with my program in node.js. After some testing, I've discovered that the files are not the same when downloaded from a browser and from node.js. I've tried a few things: "binary" encoding "utf8"…
Ad5001
  • 748
  • 5
  • 19
-1
votes
1 answer

How to work with .phar file?

I've a .phar file, how can I open it and modify the content? I'm not familiar to this type of file so please explain a step by step solution I've tried to use a php $phar->extractto() to extract the archive with no results.
user7031185
  • 61
  • 2
  • 9
1 2 3
21
22