Frequently Asked Questions for Nocc
-----------------------------------
Last updated: $Date: 2004/08/04 17:09:36 $

 Q. Nocc 0.9.6 has issues with PHP 5.0.0

 A. Because 0.9.6 is compatible with earlier versions of PHP, namely
    PHP < 4.1.0 we're still using $HTTP_GET_VARS
    So, to get Nocc working with PHP 5.0.0 you need to set the
    following in php.ini

    register_long_arrays = on

    We'll replace all $HTTP_GET_VARS with $_GET with Nocc 0.9.7 which
    will work work with PHP 5.0.0 out of the box but will require PHP
    4.1.0 or later.

-----------------------------------

 Q. Nocc keeps me asking for a correct login/password.

 A. Check that you correctly configured your POP/IMAP server in conf.php
    ex:

    $servr = "mail.isp.com:110/pop3"; for a pop3 server

    and

    $servr = "mail.isp.com:143"; for an imap server

    NOT $servr = "mail.isp.com";

    -> Check that you're allowed to connect to the POP/IMAP server manually.
    Your ISP may not allow people based on the IP.

-----------------------------------
 
 Q. Having configured Nocc, I get this error with my favourite browser:

 A. Fatal error: Call to undefined function: imap_open()
    in /opt/apache/htdocs/nocc/functions.php on line 26

    -> Please check that PHP has IMAP/c-client support (you can use a small
    PHP script with phpinfo() to see what it supports).
    Check the on-line PHP manual to configure IMAP/c-client support

    http://www.php.net/manual/ref.imap.php

-----------------------------------

 Q. What is this UCB POP Server parameter in the configuration file ?

 A. It's the standard Unix POP server that shipped with early versions of
    various Un*x operating systems flavours.
    UCB stands for University of California/Berkeley
    You can check this by running the following:

    %telnet myhost 110
    Trying...
    Connected to myhost.berkeley.edu.
    Escape character is '^]'.
    +OK UCB Pop server (version 1.6) at myhost starting.
    quit
    Connection closed by foreign host.

-----------------------------------

 Q. I get session_destroy() errors when logging out of Nocc with PHP 4.0.3
    on Win32.
    Warning: Session object destruction failed...

 A. There's a known session_destroy() bug on PHP for Win32 < 4.0.4
    The problem only affects PHP Win32, not Unix.
    See the bug: http://bugs.php.net/?id=5231

-----------------------------------

 Q. Nocc is slow with a CGI version of PHP when there're big mails

 A. Unfortunately, we tried to optimize the code but some functions are
    clearly very slow in CGI mode. We hope this will be solved in future
    PHP releases.

-----------------------------------

 Q. I get "Maximum time execution of 30 seconds exceeded" when loading
    a mailbox.

 A. It might be because the networks is slow, a large mailbox or having
    a CGI version of PHP.
    Increase max exec time in php.ini:

    max_execution_time = 300

-----------------------------------

 Q. I get "Warning: open(/tmp\sess_341b23452436243bfff454e5664756c67, O_RDWR)
    failed".

 A. Make sure you've created a valid directory in php.ini for sessions and
    make sure this directory really _exists_. :)

    session.save_path = c:\php\sessions

-----------------------------------

 Q. I get "Fatal error: Failed opening required 'lang/ en.php' [...]".

 A. This is a know bug from flawed PHP 4 install on RedHat 7.
    This is fixed with updated php-4.0.4pl1-6 RPM package or with Nocc 0.9.3
    which has a fix that suppresses extra spaces within this variable.

    See: http://www.redhat.com/bugzilla/show_bug.cgi?id=24933

-----------------------------------

 Q. When I tried to attach a file it says 'This server is not well set up !'

 A. This is because you didn't fill in the '$tmpdir' variable in conf.php
    and 'upload_tmp_dir' in 'php.ini'.
    NOCC needs at least one of these variables to be at up.

-----------------------------------

 Q. When I try yo attach a big file (>2M), I get a warning:
    "Max size of 2097152 bytes exceeded [...]"

 A. You have to increase the maximum file size in your PHP setup via php.ini:
    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 2M

-----------------------------------

 Q. When sending a mail the return-path is not set correctly.

 A. If you're running NOCC on Windows, we recommend you to set
    an SMTP server in conf.php as php mail() function on windows
    has some strange behaviour.

-----------------------------------

 Q. I get this error when reading e-mails, randomly:
    'Invalid Range End at line 450 in functions.php'

 A. New: This is fixed in 0.9.6, was replaced by its Perl-equivalent.

 Old answer (leaving it for history and might help 0.9.5 users):
 A. This bug seems to occur mainly on Linux systems when PHP was compiled
    using '--with-regex=system'. And perhaps Windows systems but we
    couldn't isolate one.
    PHP developers believe this is a bug in system's regexp libraries:
    http://bugs.php.net/?id=15486

    If you can recompile PHP, then recompile it without this option.
    If you cannot recompile PHP, then comment out the following line in
    functions.php starting with:

    [...]
    elseif (eregi('plain', $mime))
     {
       [1 line deleted]
       // Bug #511302: Comment out if you have the 'Invalid Range End' problem
       $body = eregi_replace("([#a-zA-Z0-9+-._]*)@([#a-zA-Z0-9+-_.]*)
    [...]

    If you cannot find it or if the line number is not the same, search for
    the following comment in the code:
    // Bug #511302: Comment out if you have the 'Invalid Range End' problem

    This is used to create NOCC links when it recognizes an e-mail address
    so that clicking on the link gives you the NOCC send form.

    We need help to identify more platforms where this bug occurs, you can
    find a reproducible testcase here:
    http://sf.net/tracker/?func=detail&aid=511302&group_id=12177&atid=112177