L
L
llxff2011-10-11 08:39:30
PHP
llxff, 2011-10-11 08:39:30

phar not working

In general, I run the same script from under Apache and through cli It knocks out from under Apache: through cli everything works fine. php.ini are the same. suhosin.executor.include.whitelist = "phar" is in php.ini. Apache/2.2.21, Debian 6, PHP 5.3.8-2 with Suhosin-Patch Confused , but don't know where to dig :\. Apache has suexec enabled.

require_once 'phar:///way/file.phar/file.php';



Fatal error: require_once(): Failed opening required 'phar:///way/file.phar/file.php' (include_path='.:/usr/share/php:/usr/share/pear') in script.php

PHP Warning: require_once(phar:///way/file.phar/file.php): failed to open stream: phar error: Cannot open temporary file for decompressing phar archive "phar:///way/file.phar/file.php" file "file.php" in script.php





Cannot open temporary file for decompressing phar archive

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Beresnev, 2011-10-11
@sectus

Perhaps this: http://www.php.net/manual/en/phar.using.intro.php#100127
In general, there is a very big difference between console launch and web launch. There may be a different set of rights, modules, settings, etc.

B
BreatheInMyVoid, 2011-10-11
@BreatheInMyVoid

In suhosin, whitelist .phar.
suhosin.executor.include.whitelist="phar"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question