Soalan Lazim
Frequently Asked Questions for NOCC
Last updated: $Date: 2016-09-14 17:43:49 +0200 (Mi, 14. Sep 2016) $
Q. Where can I start the automatic update of NOCC?
A. This feature is available with version 1.9.6
First you need to be logged in as a user who is allowed to start
the auto-update functionality. See config/conf.php.dist for parameter
auto_update for how to do that.
Then this user will be signaled that a new version is available
typically by a red highlighted version number in the top right corner
where the NOCC version is shown.
Moving the mouse cursor over the NOCC version shows information about
the current NOCC version used.
If a new version is available the NOCC version shown in the upper right
corner is a link to the auto update page of NOCC.
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/utils/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. 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 utils/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
utils/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
Q. NOCC pages are displayed incomplete f.ex. preferences page
A. Try to raise memory_limit variable in php.ini
memory_limit = 16M is perfect for NOCC
Q. When trying to connect to a POP3 or IMAP server, I get the following error
message: "Could not connect to server: Certificate failure for localhost:
unable to get local issuer certificate:"
A. If you connect to a POP3 or IMAP server, add "/notls" to the server string
into conf.php. I.e:
$conf->domains[$i]->in = 'localhost:143/notls';
If you connect to a POP3/SSL or IMAP/SSL server, add "/novalidate-cert" to
the server string into conf.php. I.e:
$conf->domains[$i]->in = 'localhost:993/ssl/novalidate-cert';
Q. When connecting to a POP3 or POPS server while quota are enabled into
conf.php, I get an blank page.
A. Disable quota into conf.php file. It only works with IMAP connections.
Q. When displaying an email or the inbox content, the charset is not correctly
detected causing bad body or subject display.
A. Check the mail contains the "MIME-Version : 1.0" header. If not, the charset
can't be detected du to PHP IMAP module imap_fetchstructure function
limitation.
Q. My web hosting service is using the register_globals setting set to on, so I
can't use NOCC.
A. Create a .htaccess file at NOCC's root directory with the following line:
php_flag register_globals off
If your host does not allow you to use any .htaccess file, you will have to
delete in the utils/check.php file the lines beginning with
if (ini_get('register_globals') == true)
and finishing just before
?>
But remember : running NOCC with register_globals set to on may expose you
to unwanted vulnerabilities.
Q. With NOCC hosted on a Windows server, all attachment downloaded from mails
with NOCC are garbled. After checking them, it appears they present 3 bytes
at the beginning of file that were not in the original file.
A. These three bytes are BOM, used for UTF-8 files to know how to read theses
files. But BOM is optionnal, and Windows version of PHP does not handle well
.php files with BOM.
Don't use notepad/wordpad to edit configuration files on Windows since they
may unexpectedly add the 3 BOM bytes. Always check the files you have
changed for BOM bytes, remove them and resave them as UTF-8 without BOM
using an editor like Babelpad.