从 XAMPP 迁移到 LAMP 时出现问题。内存限制错误

发布于 2024-08-24 15:31:21 字数 2081 浏览 9 评论 0原文

我在本地计算机上使用 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

我如何处理这个默认调试器?我如何关闭它?

I was using XAMPP for my local machine but as I wanted to run applications like mysql work bench and some test frameworks I decided to switch to LAMP self install. I'm using ubuntu and followed the instructions at: https://help.ubuntu.com/community/ApacheMySQLPHP

But the problem is LAMP is consuming too much of my memory (RAM) I've allocated 124 MB currently but still it gives me memory exhausted error when I run Drush (Drupal command line). When I do drush cc to clear cache it give me the following:

    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.   

In each error it shows me a back trace and I guess this default debugger I'm not aware of in Apache or my PHP config it eating up the memory. If anyone can help I"d be glad.

Another error below:

    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

how do I deal with this default debugger? how do I turn it off??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

[浮城] 2024-08-31 15:31:21

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

Drush also might be running with php-cli. There is a different php.ini for it, you can find it in ubuntu in /etc/php5/cli. If you just up the ram usage there you should be fine.

梨涡 2024-08-31 15:31:21

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

The last error is because you use dms when the devel module is deactivated. Might be some debugging code you used in dev.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文