Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__DIR__ inside phar file in HHVM is not the same as in PHP5 #4313

Closed
nazar-pc opened this issue Nov 22, 2014 · 2 comments
Closed

__DIR__ inside phar file in HHVM is not the same as in PHP5 #4313

nazar-pc opened this issue Nov 22, 2014 · 2 comments

Comments

@nazar-pc
Copy link
Contributor

I've create regular phar archive with stub:

<?php
if (PHP_SAPI == 'cli') {
    Phar::mapPhar('cleverstyle_cms.phar');
    include 'phar://cleverstyle_cms.phar/install.php';
} else {
    Phar::webPhar(null, 'install.php');
}
__HALT_COMPILER();

When running from CLI inside install.php __DIR__ constant is not the same.

PHP5:

$ php distributive.phar.php
phar:///web/test.com/www/distributive.phar.php

HHVM:

$ hhvm distributive.phar.php
phar://cleverstyle_cms.phar

I'm not familiar enough with HHVM codebase to find where it occurs and to fix it.

@mgottein
Copy link
Contributor

I'll take a look at this and see what I can do

@lexidor
Copy link
Collaborator

lexidor commented May 19, 2020

I am going over old issues on this repository, to see which ones apply to the current versions of hhvm.

This issue applies to running php code on hhvm. Hhvm nolonger supports running php code since hhvm version 4.0.0.

Support for the phar extension was dropped from hhvm 4.1.0.

@lexidor lexidor closed this as completed May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants