php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52683 couldn't create phar on osx
Submitted: 2010-08-24 05:04 UTC Modified: 2010-08-24 13:12 UTC
From: jinmoku at hotmail dot com Assigned:
Status: Not a bug Package: PHAR related
PHP Version: 5.3.3 OS: OSX 10.6.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
39 - 32 = ?
Subscribe to this entry?

 
 [2010-08-24 05:04 UTC] jinmoku at hotmail dot com
Description:
------------
when i'am create phar on osx (php 5.3.3), some weird charaters apprear (in the phar)

I can't copy phar's source (weird charaters dont pass)

phar link : http://backfront.org/bugs/MyPhar.phar


Test script:
---------------
$phar = new Phar('MyPhar.phar');

$index = <<<DOC
<?php
	echo 'hello';
DOC;
$phar->addFromString('index.php', $index);

require_once('MyPhar.phar');

Expected result:
----------------
hello

Actual result:
--------------
��????

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-24 13:12 UTC] johannes@php.net
-Status: Open +Status: Bogus
 [2010-08-24 13:12 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You have to use the phar:// stream to access the contents
 [2010-08-24 13:39 UTC] jinmoku at hotmail dot com
documentation said :

<?php
include 'coollibrary.phar';
?>

http://www.php.net/manual/en/phar.using.intro.php

and  
require_once('phar://MyPhar.phar/index.php');
don't work too
 [2010-08-26 04:53 UTC] jinmoku at hotmail dot com
in make test :
FAIL Phar: test readfile() interception [ext/phar/tests/readfile.phpt]

ACTUAL RESULT :
????

I'm sorry but it's really a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC