php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49270 configure fails if PHP source folder path contains spaces
Submitted: 2009-08-16 01:53 UTC Modified: 2023-02-22 19:24 UTC
Votes:4
Avg. Score:4.5 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: moisadoru at gmail dot com Assigned:
Status: Open Package: Compile Failure
PHP Version: Irrelevant OS: *nix
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: moisadoru at gmail dot com
New email:
PHP Version: OS:

 

 [2009-08-16 01:53 UTC] moisadoru at gmail dot com
Description:
------------
If you extract the sources snapshot inside a folder that has spaces in the path, the configure fails with a message similar to this: 
"checking for PDO includes... test: 1: /media/Disc: unexpected operator"
I extracted the sources into the "/media/Disc 1/php6" folder.
Inside the configure.log file there is a reference to configure:67842 and something about not finding "php_pdo_driver.h"

Here is my patch
--- /home/user/php6.0-200908152030/configure.original 
+++ /home/user/php6.0-200908152030/configure 
@@ -67839,11 +67839,11 @@
   
     echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
 echo "configure:67842: checking for PDO includes" >&5
-    if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
+    if test -f "$abs_srcdir/include/php/ext/pdo/php_pdo_driver.h"; then
       pdo_inc_path=$abs_srcdir/ext
-    elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
+    elif test -f "$abs_srcdir/ext/pdo/php_pdo_driver.h"; then
       pdo_inc_path=$abs_srcdir/ext
-    elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
+    elif test -f "$prefix/include/php/ext/pdo/php_pdo_driver.h"; then
       pdo_inc_path=$prefix/include/php/ext
     fi

Reproduce code:
---------------
This is my configure command:

./configure --with-apxs2=/usr/bin/apxs2 --with-mysql --prefix=/opt/php6 --with-regex --with-libxml-dir=/usr/lib --with-openssl=/usr/lib --with-pcre-regex --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --with-enchant=/usr/lib --enable-exif --enable-ftp --with-gd --enable-gd-native-ttf --with-gettext --with-gmp --with-mhash --with-imap --with-imap-ssl --enable-intl --enable-mbstring --with-mcrypt --with-mssql --with-mysql --with-mysqli --enable-embedded-mysqli --enable-pcntl --with-pspell --with-libedit --with-readline --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --with-xmlrpc --with-xsl --enable-zip --with-openssl=/usr --with-enchant=/usr --with-kerberos --enable-embedded-mysqli=shared --with-pdo-mysql=shared

Expected result:
----------------
It should configure just fine

Actual result:
--------------
"checking for PDO includes... test: 1: /media/Disc: unexpected operator"

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-09 03:17 UTC] felipe@php.net
-Package: PDO related +Package: Compile Failure -PHP Version: 6SVN-2009-08-16 (snap) +PHP Version: 5.2, 5.3, 6
 [2010-03-09 03:17 UTC] felipe@php.net
This patch isn't enough to get PHP building. It just fix the PDO part, but there are other issues yet.
 [2010-03-09 22:25 UTC] jani@php.net
-PHP Version: 5.2, 5.3, 6 +PHP Version: 5.*, 6
 [2010-12-20 12:07 UTC] jani@php.net
-Package: Tidy +Package: Compile Failure
 [2015-01-02 21:01 UTC] kassner@php.net
I created a simple pull request that I think solves this bug:

https://github.com/php/php-src/pull/974

Any thoughts?
 [2016-12-28 02:44 UTC] ejrx7753 at gmail dot com
Experienced this on OS X. It is a general Linux issue, not fixed in 7. In reply to the suggested pull request, I think it is a bad idea. All that is needed is to output a proper warning if spaces are used. There are too many incompatibilities to attempt to fix.
 [2021-03-27 10:59 UTC] petk@php.net
-Assigned To: +Assigned To: petk
 [2021-03-28 15:57 UTC] petk@php.net
-Operating System: Ubuntu linux 9.10alpha3 64bit +Operating System: *nix -PHP Version: 5.*, 6 +PHP Version: Irrelevant
 [2021-03-28 16:11 UTC] petk@php.net
The following pull request has been associated:

Patch Name: Fix #49270: configure fails if PHP source folder path contains spaces
On GitHub:  https://github.com/php/php-src/pull/6813
Patch:      https://github.com/php/php-src/pull/6813.patch
 [2023-02-22 19:24 UTC] petk@php.net
-Assigned To: petk +Assigned To:
 [2023-06-17 10:29 UTC] autosectornews at gmail dot com
Autosectornews are sharing latest news about about auto, car, bikes, electric secotor, trucks, upcoming cars, bikes etc. More info to visit: (https://autosectornews.com)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 11:01:28 2024 UTC