【问题标题】:Problem in migrating to LAMP from XAMPP.. Memory limit error从 XAMPP 迁移到 LAMP 时出现问题。内存限制错误
【发布时间】:2011-01-24 21:54:10
【问题描述】:

我在本地机器上使用 XAMPP,但由于我想运行 mysql 工作台和一些测试框架等应用程序,我决定切换到 LAMP 自我安装。我正在使用 ubuntu 并按照以下说明操作:https://help.ubuntu.com/community/ApacheMySQLPHP

但问题是 LAMP 占用了我太多的内存 (RAM) 我目前分配了 124 MB 但是当我运行 Drush(Drupal 命令行)时它仍然给我内存耗尽错误。当我 drush cc 清除缓存时,它给了我以下信息:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /var/www/----/sites/all/modules/ubercart/uc_order/uc_order.order_pane.inc on line 150

Call Stack:
    0.0020     185624   1. {main}() /opt/drush/drush.php:0
    0.0254    1303672   2. drush_main() /opt/drush/drush.php:37
    0.2674    5107784   3. drush_bootstrap() /opt/drush/drush.php:71
    0.2676    5109872   4. _drush_bootstrap_drupal_full() /opt/drush/includes/environment.inc:173
    0.2676    5151032   5. drupal_bootstrap() /opt/drush/includes/environment.inc:655
    0.3030    7739048   6. _drupal_bootstrap() /var/www/missmoti/includes/bootstrap.inc:989
    0.3122    8855792   7. _drupal_bootstrap_full() /var/www/missmoti/includes/bootstrap.inc:1078
    0.3445   12387320   8. module_load_all() /var/www/missmoti/includes/common.inc:2608
    0.5194   32586544   9. drupal_load() /var/www/missmoti/includes/module.inc:14
    0.5251   33361112  10. include_once('/var/www/missmoti/sites/all/modules/ubercart/uc_order/uc_order.module') /var/www/-----/includes/bootstrap.inc:617

Drush command could not be completed.   

在每个错误中,它都会向我显示一个回溯,我猜这个默认调试器在 Apache 或我的 PHP 配置中我不知道它会占用内存。如果有人能帮助我,我会很高兴。

下面的另一个错误:

    Fatal error: Call to undefined function dsm() in /var/www/-----/sites/all/modules/custom/gtpath/gtpath.module on line 180
Call Stack
#   Time    Memory  Function    Location
1   0.0002  120144  {main}( )   ../index.php:0
2   1.7604  68224112    theme( )    ../index.php:36
3   2.0188  77346112    call_user_func_array ( )    ../theme.inc:658
4   2.0188  77347024    gtpath_preprocess_page( )   ../theme.inc:0

我该如何处理这个默认调试器?怎么关掉??

【问题讨论】:

    标签: php mysql apache drupal drush


    【解决方案1】:

    Drush 也可能与 php-cli 一起运行。它有一个不同的 php.ini,你可以在 ubuntu 的 /etc/php5/cli 中找到它。如果你只是提高内存使用率,你应该没问题。

    【讨论】:

    • 是的,这是关键,现在 php.ini cli 和另一个都分配了 128 MB RAM,现在可以正常工作。谢谢你的回答。
    【解决方案2】:

    最后一个错误是因为你在devel模块被停用时使用了dms。可能是你在开发中使用的一些调试代码。

    【讨论】:

    • 我特意使用了 DMS,以便了解发生了什么。我发现也安装了xdebug,但仍然存在问题。一些已定义的函数,如 ns() 也未找到。
    猜你喜欢
    • 2017-04-03
    • 1970-01-01
    • 1970-01-01
    • 2021-05-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-12
    相关资源
    最近更新 更多