ID: 49741
Updated by: [email protected]
Reported By: admin at sulehosting dot co dot za
-Status: Open
+Status: Feedback
Bug Type: PHAR related
Operating System: open suse 11.1
PHP Version: 5.3.0
New Comment:
Could you please to run your example script again, with error reporting
enabled and check whether it works? If it does not, please provide an
strace, like this:
strace php -f foo.php 2> strace.txt
Please provide an URL to the strace here (you can use a pastebin).
Thank you.
Previous Comments:
------------------------------------------------------------------------
[2009-10-05 08:45:33] admin at sulehosting dot co dot za
1)file_put_contents (works!)
$strFile = '/tmp/myFile.txt';
$strData = 'hello world';
$res = file_put_contents($strFile, $strData);
if($res):
print 'it works';
else:
print 'it failed';
endif;
2)uname -a
Linux pegasus 2.6.27.29-0.1-pae #1 SMP 2009-08-15 17:53:59 +0200 i686
i686 i386 GNU/Linux
------------------------------------------------------------------------
[2009-10-03 18:45:34] [email protected]
Could you please verify that writing to /tmp works at all (for example
file_put_contents() in the same script) and also say if it's 32bit or
64bit
------------------------------------------------------------------------
[2009-10-02 11:59:35] admin at sulehosting dot co dot za
I tried setting phar.readonly to false, I no longer get the exception
but there is still no phar created on the specified directory.
------------------------------------------------------------------------
[2009-10-02 11:37:40] [email protected]
Thank you for your bug report.
Please try setting phar.readonly to false. Does this solve the problem?
------------------------------------------------------------------------
[2009-10-01 20:57:16] admin at sulehosting dot co dot za
Description:
------------
I am trying to create a phar file, following examples from the php.net
http://us.php.net/manual/en/phar.using.object.php
Reproduce code:
---------------
<?php
$phar = new Phar("/tmp/first.phar",0,"first.phar");
$phar['hello.txt'] = 'hello world';
?>
and
<?php
$phar = new Phar("/tmp/first.phar");
$phar['hello.txt'] = 'hello world';
?>
Expected result:
----------------
I expect a phar file to be created in the tmp directory,
Actual result:
--------------
UnexpectedValueException: creating archive "/tmp/first.phar" disabled
by INI setting in /srv/www/htdocs/PHAR/test_phar.php on line 2
Call Stack:
0.0003 323772 1. {main}()
/srv/www/htdocs/PHAR/test_phar.php:0
0.0003 328724 2. Phar->__construct()
/srv/www/htdocs/PHAR/test_phar.php:2
php --ri Phar
Phar
Phar: PHP Archive support => enabled
Phar EXT version => 2.0.0-dev
Phar API version => 1.1.1
CVS revision => $Revision: 1.370.2.62 $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => enabled
bzip2 compression => enabled
OpenSSL support => enabled
Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive => Local Value => Master Value
phar.readonly => On => On
phar.require_hash => On => On
phar.cache_list => no value => no value
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49741&edit=1