php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22556 configure file reports bogus mkdir -p failure
Submitted: 2003-03-05 13:29 UTC Modified: 2003-03-10 08:53 UTC
From: john345 at earthlink dot net Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.3.1 OS: SCO OpenServer 5.0.6
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: john345 at earthlink dot net
New email:
PHP Version: OS:

 

 [2003-03-05 13:29 UTC] john345 at earthlink dot net
configure --without-mysql --with-pgsql --with-apxs=/usr/local/apache/bin

reports that mkdir -p does not work. This is because there are two identical lines, one at line 82750 and one at 82751, that use mkdir -p to make comftestdir/somedir. The first one succeeds; the second one fails. The test to see if mkdir -p works is after the second line, so configure reports a failure.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-05 13:36 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

I think something like this was already fixed..

 [2003-03-06 15:05 UTC] john345 at earthlink dot net
Tried php4-STABLE-latest.tar.gz and the duplicate line is still in the configure file, just at a different line number, 83186.
 [2003-03-07 00:10 UTC] sniper@php.net
It's actually intentionally done twice.
Comment from acinclude.m4:

"`mkdir -p' must be quiet about creating existing directories"

 [2003-03-07 16:54 UTC] john345 at earthlink dot net
If it is done twice on purpose, then why do it at all?

Doing it twice will always make the test fail.

If the issue is the fact that mkdir -p complains when the directory already exists, test for the directory before trying to make it or send the error to dev/null.
 [2003-03-08 10:33 UTC] sniper@php.net
Yeah, right. But it's still not a bug.
 [2003-03-09 16:33 UTC] john345 at earthlink dot net
I really don't want to piss anyone off. I really like PHP. But why do stupid things in configure? At least add a comment that says we do this because we want mkdir -p to fail. Better yet, just don't use mkdir -p. There are several valid solutions.

Use mkdir without -p.
Trap the error output of mkdir -p.
Test for the directories before trying to make them.
Use rm -rf to remove the directories before creating them.
 [2003-03-10 08:53 UTC] sniper@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

Removed that pretty dumb test and replaced the calls
to plain mkdir to use the shtool instead.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 19:01:28 2024 UTC