php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19712 phpize reports errors when using directories containing spaces
Submitted: 2002-10-02 06:51 UTC Modified: 2002-10-04 10:46 UTC
From: MuTbKA at ukr dot net Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.2.1 OS: Any
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: MuTbKA at ukr dot net
New email:
PHP Version: OS:

 

 [2002-10-02 06:51 UTC] MuTbKA at ukr dot net
$mkdir "My Directory"
$cd "My Directory"
$touch config.m4
$phpize
usage: cp [-R [-H | -L | -P]] [-f | -i] [-pv] src target             
       cp [-R [-H | -L | -P]] [-f | -i] [-pv] src1 ... srcN directory
usage: cp [-R [-H | -L | -P]] [-f | -i] [-pv] src target             
       cp [-R [-H | -L | -P]] [-f | -i] [-pv] src1 ... srcN directory
mv: build/rules_pear.mk: No such file or directory                   

The problem is here:
(cd $phpdir && cp $FILES_BUILD $builddir/build)
(cd $phpdir && cp $FILES $builddir)

We consider that one should use "${phpdir}" and "${builddir}" to eliminate the problem.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-02 06:52 UTC] derick@php.net
changing category
 [2002-10-02 07:14 UTC] hholzgra@php.net
why do you do that? 

even if we fix this -> blanks in dirnames are a no-no for developers

this fires back in lots of places (e.g. find ... | xargs ... )
so it is an absolute bad idea in the first place ...
 [2002-10-02 07:41 UTC] MuTbKA at ukr dot net
I don't think so...
Perhaps "blanks in dirnames are a no-no for developers", but why one should do exotic things like: 

$cp /usr/local/bin/phpize /home/user/my_ext/phpize
$cd /home/user/my_ext
$vi phpize
...
$./phpize

Is it possible that one have no control over upper level dirs? I think nothing should not be done in one and only one situation: the patch will have some negative side effects. In the case I don't see ones.
 [2002-10-03 21:33 UTC] sas@php.net
Trying to support spaces in path names opens up a can of worms without any real benefit.

If your administrator has made the mistake to give you a home directory beneath such a path, complain to him/her. It is very likely that the person is simply inexperienced.
 [2002-10-04 02:47 UTC] markonen@php.net
This is a real problem on Desktop OSes such as Mac OS X, where spaces in directory names are common (The default volume name is "Macintosh HD"). As the Linux desktops get better, the amount of GUI-bound users will increase there as well. This will undoubtedly make spaces in directory names more common across the board.

I understand that fixing this is hard because there are a ton of places that are potentially broken, but that's no real excuse for closing this. Let's leave it open for someone to fix.
 [2002-10-04 03:46 UTC] mfischer@php.net
Suspending until some brave hero wants to slay the dragon.
 [2002-10-04 05:34 UTC] hholzgra@php.net
"... the amount of GUI-bound users will increase there as well. ..."

we are talking about C programmers experienced enought
to give writing an extension a try, aren't we?
 [2002-10-04 05:59 UTC] markonen@php.net
No? phpize is also an end-user technology, used in PECL (for example). So experiencing this bug when running a GNOME PECL installer or something similar seems like a reasonable scenario to me.
 [2002-10-04 10:46 UTC] MuTbKA at ukr dot net
I suggest to mark this bug CLOSED, and go on with fixing Bug #19755 (http://bugs.php.net/bug.php?id=19755).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC