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.

CommentFileSizeAuthor
#7 637146-7.patch624 bytesDavid_Rothstein
#4 637146_2.patch630 bytesnaxoc
#1 637146.patch690 bytesnaxoc

Comments

naxoc’s picture

Status: Active » Needs review
StatusFileSize
new690 bytes

The obvious fix seems to work just fine. It removes the php error.

dries’s picture

Status: Needs review » Reviewed & tested by the community

Seems to make sense to me.

David_Rothstein’s picture

Status: Reviewed & tested by the community » Needs work

I think install_goto() should include this file, not _db_check_install_needed(). It's the one that's causing the problem.

naxoc’s picture

Status: Needs work » Needs review
StatusFileSize
new630 bytes

Putting the include in install_goto() does make more sense. I moved the include.

aren cambre’s picture

Version: 7.x-dev » 7.0-alpha1

Subscribe.

dave reid’s picture

Version: 7.0-alpha1 » 7.x-dev

This is still a problem in HEAD (7.x-dev) so no need to change versions please.

David_Rothstein’s picture

StatusFileSize
new624 bytes

I 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 :)

carlos8f’s picture

Status: Needs review » Reviewed & tested by the community

looks fine.

dirksonii’s picture

Tested this, it does appear to remove the drupal_exit() error.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

int’s picture

so, now drupal will consum more memory at the install process?

heine’s picture

@ #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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.