|  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
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

the patch is a pull request on github:

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

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-21 12:00 UTC]
-Assigned To: +Assigned To: remi
 [2015-05-21 12:07 UTC]
Automatic comment on behalf of remi
Log: Fixed bug #69680 (phar symlink in binary directory broken).
 [2015-05-21 12:07 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 29 20:01:24 2023 UTC