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) 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 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) commentedSo what you really need is to return FALSE if the file doesn't exist in drupal_install_fix_file.
Comment #5
CorniI commentedhere we go...
I'll look at drupal_verify_install_file another day :)
Comment #6
Anonymous (not verified) commentedWatch those tabs. You need spaces.
Comment #7
CorniI commentedhere we go again...
Comment #8
CorniI commentedand I forgot to change the status
Comment #9
Anonymous (not verified) commentedComment #10
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 commentedThat Comment wasn't good, anyway
Comment #13
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) commentedAutomatically closed -- issue fixed for two weeks with no activity.