When the installer reaches the point, where the database is to be selected, it stops with the following error message:
Warning: glob() expects parameter 2 to be long, string given in [path cut]/htdocs/sites/dev/drupal7/includes/install.inc on line 216
Warning: Invalid argument supplied for foreach() in [path cut]/htdocs/sites/dev/drupal7/includes/install.inc on line 216
Warning: Invalid argument supplied for foreach() in [path cut]/htdocs/sites/dev/drupal7/includes/install.inc on line 222
Warning: Cannot modify header information - headers already sent by (output started at [path cut]/htdocs/sites/dev/drupal7/includes/install.inc:216) in [path cut]/htdocs/sites/dev/drupal7/includes/common.inc on line 141
according to php.net the used parameter glob_brace is not implemented in Sun Solaris systems.
Removing the parameter from the command results in the first 2 error messages disappearing.
Comment | File | Size | Author |
---|---|---|---|
#8 | installer-db-drivers-302596-8.patch | 1.04 KB | dropcube |
#2 | installer-db-drivers-302596-2.patch | 1.2 KB | dropcube |
#1 | installer-db-drivers-302596.patch | 1.13 KB | dropcube |
Comments
Comment #1
dropcube CreditAttribution: dropcube commentedFrom the PHP manual http://www.php.net/glob (function glob() ):
-This function isn't available on some systems (e.g. old Sun OS).
-The GLOB_BRACE flag is not available on some non GNU systems, like Solaris.
So, we should use an alternative solution.
The attached patch fixes this by using another alternative technique to detect database drivers.
Comment #2
dropcube CreditAttribution: dropcube commentedThe same patch, but closing the dir handle.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm going to suggest a drupal_glob be added to bootstrap.inc so that others can take advantage.
Comment #4
dropcube CreditAttribution: dropcube commentedWhere else do we require
glob()
? If a module require it, then it can use a simple similar approach to the one proposed in this patch. We also have afile_scan_directory
function that can be used for similar purposes.Comment #5
Damien Tournoud CreditAttribution: Damien Tournoud commented1.
Should be:
2. This should really use
file_scan_directory
directly. It does not currently probably because of Crell willingness to keep the database layer completely separate from the rest of Drupal. We should probably generalize fsd() and move it to bootstrap.inc.Comment #6
dropcube CreditAttribution: dropcube commentedDamien, not sure if file_scan_directory can be used to scan directories. It recurse through directories, but only returning files. To detetect database drivers we are looking for directories, not for files. What else do you suggest?
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedIf $recurse param is FALSE then file_scan_directory will return the directory.
Comment #8
dropcube CreditAttribution: dropcube commentedWell, here is a patch that uses
file_scan_directory
. Work as expected.Comment #9
randall.vg CreditAttribution: randall.vg commentedThis patch applies cleanly to HEAD and works as expected on mac os x leopard and ubuntu.
Comment #10
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.