Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
when you call drupal_verify_install_file with the flag FILE_READABLE for a nonexistant, in a call by drupal_verify_install_file a php function is called which issues a warning for the nonexistant file. file_exists() is used in previous code, but in a way which makes it senseless...
The attached file return immediatly false if the file isn't of the expected type or doesn't exist. This check is entirely performed by the is_xx()-func.
The old misbehauvior needed to subsequent calls to drupal_verify_install_file which are unneeded.
Comment | File | Size | Author |
---|---|---|---|
#12 | inc_install_drupal_install_fix_file.patch | 810 bytes | CorniI |
#10 | inc_install_drupal_install_fix_file.patch | 909 bytes | CorniI |
#7 | inc_install_drupal_install_fix_file.patch | 738 bytes | CorniI |
#5 | inc_install_drupal_install_fix_file.patch | 737 bytes | CorniI |
#1 | install.inc-drupal_verify_install_file.patch | 4.06 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI think we need to retain the $return and make the changes I have attached.
Comment #2
catchNot tested the patch yet, but this is to prevent errors if you mv default.settings.php instead of cp default.settings.php since the installer requires both default.settings.php and settings.php to actually work.
Comment #3
CorniI CreditAttribution: CorniI commentedNah, it's not the real patch, it's a bug I found when writing that patch ;)
The one of earnie doesn't work. I maybe have to explain better where the problem really lies: Even when a file doesn't exist drupal calls drupal_install_fix_file() for the file, which issues a call to fileperms() which then issues a stat failure:
Warning: fileperms() [function.fileperms]: stat failed for ./sites/default/default.settings.php in /var/www/drupal7/includes/install.inc on line 740
One may want to fix the problem there, too. But if a file is nonexistant most of the loop in drupal_verify_install_file is nonsense, too. The only logical thing (for me) would be passing a dir to the drupal_install_mkdir() and FILE_EXIST, the rest would just leed to failure-calls to is_xxx() and drupal_install_fix_file()
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedSo what you really need is to return FALSE if the file doesn't exist in drupal_install_fix_file.
Comment #5
CorniI CreditAttribution: CorniI commentedhere we go...
I'll look at drupal_verify_install_file another day :)
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedWatch those tabs. You need spaces.
Comment #7
CorniI CreditAttribution: CorniI commentedhere we go again...
Comment #8
CorniI CreditAttribution: CorniI commentedand I forgot to change the status
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #10
CorniI CreditAttribution: CorniI commentedI forgot a space, and added a comment by webchick's request. i'm not sure if she'll commit this as-is, but we'll see :D
Comment #11
catchThat one line comment is definitely over 76 characters long.
Comment #12
CorniI CreditAttribution: CorniI commentedThat Comment wasn't good, anyway
Comment #13
CorniI CreditAttribution: CorniI commentedwebchick comitted this one, thanks!
Now just someone need to review #312144: Install fails when default.settings.php is not present ;)
Comment #14
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.