On a fresh checkout of head, a visit to index.php results in:
PHP Fatal error: Call to undefined function drupal_exit() in C:\www\head\includes\install.inc on line 928
PHP Stack trace:
PHP 1. {main}() C:\www\head\index.php:0
PHP 2. drupal_bootstrap() C:\www\head\index.php:21
PHP 3. _drupal_bootstrap_page_cache() C:\www\head\includes\bootstrap.inc:1497
PHP 4. drupal_bootstrap() C:\www\head\includes\bootstrap.inc:1561
PHP 5. _drupal_bootstrap_variables() C:\www\head\includes\bootstrap.inc:1505
PHP 6. variable_initialize() C:\www\head\includes\bootstrap.inc:1623
PHP 7. cache_get() C:\www\head\includes\bootstrap.inc:704
PHP 8. DrupalDatabaseCache->get() C:\www\head\includes\cache.inc:46
PHP 9. db_query() C:\www\head\includes\cache.inc:308
PHP 10. Database::getConnection() C:\www\head\includes\database\database.inc:2014
PHP 11. Database::openConnection() C:\www\head\includes\database\database.inc:1364
PHP 12. Database::parseConnectionInfo() C:\www\head\includes\database\database.inc:1493
PHP 13. _db_check_install_needed() C:\www\head\includes\database\database.inc:1407
PHP 14. install_goto() C:\www\head\includes\database\database.inc:2626
An obvious potential fix would be to include_once DRUPAL_ROOT . '/includes/common.inc'; in _db_check_install_needed, but I'm atm not able to research the options.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 637146-7.patch | 624 bytes | David_Rothstein |
| #4 | 637146_2.patch | 630 bytes | naxoc |
| #1 | 637146.patch | 690 bytes | naxoc |
Comments
Comment #1
naxoc commentedThe obvious fix seems to work just fine. It removes the php error.
Comment #2
dries commentedSeems to make sense to me.
Comment #3
David_Rothstein commentedI think install_goto() should include this file, not _db_check_install_needed(). It's the one that's causing the problem.
Comment #4
naxoc commentedPutting the include in install_goto() does make more sense. I moved the include.
Comment #5
aren cambre commentedSubscribe.
Comment #6
dave reidThis is still a problem in HEAD (7.x-dev) so no need to change versions please.
Comment #7
David_Rothstein commentedI feel like there's an unwritten rule that global variables get declared at the top of a function, so I moved it, but otherwise looks good.
(Was easier to move it in the patch file than to explain it in any more detail :)
Comment #8
carlos8f commentedlooks fine.
Comment #9
dirksonii commentedTested this, it does appear to remove the drupal_exit() error.
Comment #10
dries commentedCommitted to CVS HEAD. Thanks.
Comment #11
int commentedso, now drupal will consum more memory at the install process?
Comment #12
heine commented@ #11, I doubt that. During the first few install steps, the inclusion of common.inc uses memory. However, common.inc was already included in the more memory-intensive parts of the installation, so the max memory usage for installation will be the same.
If you want to be sure, please measure.