-1

i have a problem with Phar on centos 6. When i run "phar" i get:

# phar -v
PHP Warning:  include(): Failed opening 'phar:///usr/bin/phar.phar/pharcommand.inc' for inclusion (include_path='.:') in /usr/bin/phar.phar on line 48
PHP Fatal error:  Class 'PharCommand' not found in /usr/bin/phar.phar on line 61

Any idea what might cause this?

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
Danielss89
  • 863
  • 1
  • 11
  • 17
  • The error message tells you exactly what fails: Including that file. The fatal error is a product of that, the original code should use a require instead of an include command probably. Also please understand what `phar://` stands for. – hakre May 28 '12 at 18:53

1 Answers1

0
PHP Fatal error:  Class 'PharCommand' not found.

It looks like if you don't have any file pharcommand.inc in /usr/bin/phar.phar/.

is your file correctly chmoded?

Pier-Alexandre Bouchard
  • 5,135
  • 5
  • 37
  • 72
  • Yeah, you're pwning yourself. Check your configuration and setup. And hey, if it's the first time you're using it, why do you expect it to work out of the box? Have you read the manual? Why do you expect it to work that way? To which documentation are you referring to? – hakre May 28 '12 at 18:54
  • It's a compressed Phar, everything after __HALT_COMPLIER(); is compressed so it should look lik that. If you want to see the php code, build the phar without the gzip compression flags. – ellipse-of-uncertainty Sep 19 '12 at 20:49