> >> Installing SM on a newly setup server. The Linux install includes SM > >> 1.4.0, PHP 4.3.2 and Apache 2.0.46. The IMAP server is Courier. > >> Courier works and I can connect to it with Evolution. > >> > >> The problem is that with SM installed I get an invalid user/password > >> error. I've traced the problem to the quoteimap() function in > >> src/strings.php. When adding debug statements I can see that the > >> quoteimap() function takes in my username and password but returns > > empty > >> strings in both cases. These empty strings are then used in the > >> LOGIN command sent to the IMAP server and hence the reason for the > >> invalid username/pwd error message. I installed SM 1.2.11 and the > >> exact same thing happens. I'm running SM on other servers (PHP > >> 4.2.3, Apache 1.3.27, SM 1.2.11) with no problems. > >> > >> So is this an SM, PHP and/or Apache problem? > > > > as usual, it's probably new versions of php being troublesome. for > > kicks, try changing the ereg_replace to preg_replace in that function > > (which is in the functions directory, by the way)...?? > > > Some more info... my web log shows the following error when attempting to > login. > > [client 192.168.1.10] PHP Warning: ereg_replace(): unbalanced [] at > offset 6 in /home/sqmail/squirrelmail-1.4.0/functions/strings.php on line > 426, referer: http://mail-test/src/login.php > > This would explain why the function is returning an empty string. I > personally don't see the problem with the function. Can anyone see the > problem? Can anyone provide a fix?
ahhh. that's horrible. looks like backslashes are not being treated as expected. the original: return ereg_replace('(["\\])', '\\\\1', $str); try futzing with the backslashes until you get the right results, for instance: echo '<hr>username = ' . ereg_replace('(["\])', '\\\\1', $str) . '<hr>'; exit; you very well may need to reduce the backslashes in the 2nd argument too. what did they do to php?!? others are not reporting this problem, so it might only be something different you did with your php installation. - paul ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. -- squirrelmail-users mailing list List Address: [EMAIL PROTECTED] List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995 List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users