Commit:    cdedee3fa11be4d71364ad4843aa095df03c7159
Author:    Michael Heimpold <>         Fri, 9 Aug 2013 21:06:17 
Committer: Stanislav Malyshev <>      Sat, 10 Aug 2013 17:33:24 
Parents:   503d39d9252b4134f2387ac7914f60083aa1c990
Branches:  PHP-5.5 master


Fix #61345: fix install of CGI binary

When CLI was not built but only CGI binary, then a sequence of

$ ./buildconf
$ ./configure  --prefix=/usr/local/phpcgi --disable-cli
$ make -j8
$ sudo rm -rf /usr/local/phpcgi
$ sudo make install

results in the following error:

/bin/bash /srv/smb/php-src.test/libtool --silent --preserve-dup-deps 
--mode=install cp ext/opcache/ /srv/smb/php-src.test/modules
Installing shared extensions:     
Installing PHP CGI binary:        /usr/local/phpcgi/bin/
cp: cannot create regular file `/usr/local/phpcgi/bin/#INST@28245#': No such 
file or directory
make: *** [install-cgi] Fehler 1

The solution is to create the binary directory before copying the
CGI binary as e.g. CLI does.

Signed-off-by: Oliver Metz <>

[extensive commit message]

Signed-off-by: Michael Heimpold <>


Changed paths:
  M  sapi/cgi/Makefile.frag

diff --git a/sapi/cgi/Makefile.frag b/sapi/cgi/Makefile.frag
index d54dd40..d3d7cb3 100644
--- a/sapi/cgi/Makefile.frag
+++ b/sapi/cgi/Makefile.frag
 install-cgi: $(SAPI_CGI_PATH)
        @echo "Installing PHP CGI binary:        $(INSTALL_ROOT)$(bindir)/"
+       @$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
        @$(INSTALL) -m 0755 $(SAPI_CGI_PATH) 
        @echo "Installing PHP CGI man page:      $(INSTALL_ROOT)$(mandir)/man1/"
        @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1

PHP CVS Mailing List (
To unsubscribe, visit:

Reply via email to