Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#23 MMCache 2.3.18 bugs with SqMail and other scripts

closed-fixed
nobody
None
5
2003-09-22
2003-07-04
Bilal Kathrada
No

We run Squirrelmail 1.2.11 and with Turck MMCache we
get this error when trying to log in:

Warning: main(../functions/imap_utf7_decode_local.):
failed to open stream: No such file or directory in
/home/virtual/site1/fst/var/www/squirrelmail/functions/imap_mailbox.php
on line 14

Fatal error: main(): Failed opening required
'../functions/imap_utf7_decode_local.'
(include_path='.:/php/includes:/usr/share/php') in
/home/virtual/site1/fst/var/www/squirrelmail/functions/imap_mailbox.php
on line 14

The error in apache's error_log is:

MMCACHE: PHP crashed on opline 134 of main() at
/home/virtual/site1/fst/var/www/squirrelmail/src/login.php:59

These errors don't show up when running Turck MMCache
2.3.17.

We also have problems with other scripts on our
clients' websites.

Bilal
RevolutionHosting.net

Discussion

  • tmgh141242
    tmgh141242
    2003-07-05

    Logged In: YES
    user_id=774892

    i had the same problem

     
  • Logged In: NO

    which php?
    which platform?
    which caching-system (SHM?)?

    the best is to include the info you can find
    at the bottom of your mmcache.php admin-site!

     
  • Bilal Kathrada
    Bilal Kathrada
    2003-07-05

    Logged In: YES
    user_id=802606

    When I run MMCache 2.3.18, this is the info at the bottom of
    mmcache() page.

    MMCache 2.3.18 [shm:sysvipc sem:spinlock], PHP 4.3.2 [ZE
    1.3.0], Apache [Apache/1.3.27 (Unix) (Red-Hat/Linux)
    mod_gzip/1.3.19.1a mod_jk/1.2.0 mod_perl/1.26 PHP/4.3.2
    FrontPage/5.0.2 mod_ssl/2.8.12 OpenSSL/0.9.6b], Linux
    server1.revolutionhosting.net 2.4.18-27.7.xsmp #1 SMP Fri
    Mar 14 05:52:30 EST 2003 i686

     
  • Dmitry Stogov
    Dmitry Stogov
    2003-07-07

    Logged In: YES
    user_id=124551

    Sorry, but I can't repeat these errors and crash.
    Try to delete all files from "/tmp/mmcache" and restart
    Apache.

     
  • Bilal Kathrada
    Bilal Kathrada
    2003-07-22

    Logged In: YES
    user_id=802606

    MMCache 2.3.19 seems to have fixed the conflict with
    SquirrelMail.

    However, there's still problems with other scripts (like
    IBF), especially around include and require statements.

    Also, i've had to disable MMCache because, after a few
    hours, *all* PHP scripts on the server crash.

    My MMCache info output is:

    MMCache 2.3.19 [shm:sysvipc sem:spinlock], PHP 4.3.2 [ZE
    1.3.0], Apache [Apache/1.3.27 (Unix) (Red-Hat/Linux)
    mod_gzip/1.3.19.1a mod_perl/1.26 PHP/4.3.2 FrontPage/5.0.2
    mod_ssl/2.8.12 OpenSSL/0.9.6b], Linux
    server1.revolutionhosting.net 2.4.18-27.7.xsmp #1 SMP Fri
    Mar 14 05:52:30 EST 2003 i686
    Produced by Turck MMCache.

     
  • Garvin Hicking
    Garvin Hicking
    2003-07-30

    Logged In: YES
    user_id=473563

    I am having similar crashed.

    I am using the CVS-mmturck-tache from 2003-07-29 and get
    this entry in my apache error_log:

    MMCACHE: PHP crashed on opline 6 of main() at
    /home/superdbl/www.garvinhicking.de/lib/functions.php:5

    The corresponding fule (functions.php) is called multiple
    times from different scripts. It is coded like:

    if (!defined('FUNCTIONS_INCLUDED')) {
    define('FUNCTIONS_INCLUDED', TRUE);

    function connect(&$connect) {
    global $db;

    if (!$connect) {
    mysql_connect($db['host'], $db['user'], $db['pw']);
    mysql_select_db($db['db']);
    $connect = true;
    }
    }
    [...]
    }

    So the functions file will only get parsed once, even though
    it is required() by several files which could include each
    other.

    The part which causes the errors is using &$connect in the
    function argument. When I remove the reference and rewrite
    my function to:

    function connect($c) {
    global $db;

    mysql_connect($db['host'], $db['user'], $db['pw']);
    mysql_select_db($db['db']);

    if (!$c) {
    $c = true;
    }

    return $c;
    }

    everything will again work fine. So I guess there's a
    problem with multiple depending includes/requires ony
    referenced variables?

    Hope that helps,
    Garvin.

     
  • Dmitry Stogov
    Dmitry Stogov
    2003-07-31

    Logged In: YES
    user_id=124551

    The reference is not the reason of crash. You can change it
    back and all should work. But the problem in including one file
    twitch. I am working on it.

     
  • Garvin Hicking
    Garvin Hicking
    2003-07-31

    Logged In: YES
    user_id=473563

    dstogov,

    You are right, I found that out later. MMCache always kept
    this include crashing, so I currently had to disable it. I'm
    looking forward to news on this. :)

    Regards,
    Garvin.

     
  • Logged In: NO

    I hope I have fixed this BUG.
    You can try the version from sourceforge CVS.
    "mmcache.c" revision id is 1.134

     
  • Dmitry Stogov
    Dmitry Stogov
    2003-07-31

    Logged In: YES
    user_id=124551

    I hope, I have fixed this bug in release 2.3.21. Please, check
    it and let me know about the result.

     
  • Dmitry Stogov
    Dmitry Stogov
    2003-09-22

    • status: open --> closed-fixed