php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69680 phar symlink in binary directory broken
Submitted: 2015-05-21 11:51 UTC Modified: 2015-05-21 12:00 UTC
From: matteo dot bernardini at gmail dot com Assigned: remi (profile)
Status: Closed Package: *Compile Issues
PHP Version: Irrelevant OS: linux
Private report: No CVE-ID: None
 [2015-05-21 11:51 UTC] matteo dot bernardini at gmail dot com
Description:
------------
Platform: slackware64-current, php-5.6.8/9

The phar symlink in the binary directory point to a non-existing file in the build folder

$ ls -la /usr/bin/phar
lrwxrwxrwx 1 root root 35 mag 8 20:50 /usr/bin/phar -> /tmp/package-php//usr/bin/phar.phar

but there's nothing in /tmp/package-php//usr/bin/phar.phar (the link is broken) and the invocation of phar from the command line fails

$ ls -la /tmp/package-php//usr/bin/phar.phar
/bin/ls: cannot access /tmp/package-php//usr/bin/phar.phar: No such file or directory

$ ls -la /usr/bin/phar.phar
-rwxr-xr-x 1 root root 14823 apr 24 20:32 /usr/bin/phar.phar

the problem seems to be a line in the file ext/phar/Makefile.frag where the link is created with the following command

$(LN_S) -f $(INSTALL_ROOT)$(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar

we better omit the path and make the symlink relative (see also the discussion in https://github.com/php/php-src/pull/1288)

the patch is a pull request on github: https://github.com/php/php-src/pull/1294

Test script:
---------------
$ phar
-bash: phar: command not found
$

Expected result:
----------------
$ phar
No command given, check /usr/bin/phar help
$


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-21 12:00 UTC] remi@php.net
-Assigned To: +Assigned To: remi
 [2015-05-21 12:07 UTC] remi@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a7de68f98ac563b57156c31c3b89653444af68ef
Log: Fixed bug #69680 (phar symlink in binary directory broken).
 [2015-05-21 12:07 UTC] remi@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC