Re: [SM-USERS] 404 after sending mail

2010-01-18 Thread bob.33

>Jürgen Knelangen schrieb:
>> Hi all!
>> 
>> After sending an email with squirrelmail i get a 404. Nevertheless the
>> mail is
>> sent and when i reload the page i return to the inbox view.
>> 
>
>Okay. Fixed.
>
>Seemed to be a cookie problem.
>get_location() returned a wrong path. After deleting all cookies everything
is
>okay.
>
>Jürgen

i'm seeing these 404 errors with the following setup:

squirrelmail-1.4.19
dovecot-1.2.8
exim-4.71
php 5.2.10

links in squirrelmail continously add more "src/" into the url such that you
might end up with a link such as 

http://mail.example.com/src/src/src/src/src/src/src/compose.php?mailbox=INBOX&startMessage=1

i fixed this dumb behaviour with
cd src && ln -s ../src
but that's pretty dirty, y'all.
eventually, the user ends up trying to go to a very broken link that will
404 such as

http://mail.example.com/src/src/src/plugins/calendar/src/compose.php?mailbox=None&startMessage=0

something afoot with get_location() i presume, but i don't know how to fix
it.  

any help much appreciated :)
-- 
View this message in context: 
http://old.nabble.com/404-after-sending-mail-tp13112479p27201673.html
Sent from the squirrelmail-users mailing list archive at Nabble.com.


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
-
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): 
https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Re: [SM-USERS] 404 after sending mail

2010-01-19 Thread bob.33



Tomas Kuliavas wrote:
> 
> 
> Please provide more information about your web service setup and
> SquirrelMail location configuration.
> 
> 1. Do you use some proxy, forwarder, mod_rewrite hacks or some
> non-standard port configuration?
> 2. Did you test SquirrelMail configuration with configtest.php utility and
> confirm that location base is detected correctly?
> 3. Did you try to reproduce issue when all plugins are disabled?
> 4. You use standard SquirrelMail package or modified one?
> 5. You use PHP DSO or CGI setup?
> 
> -- 
> Tomas
> 

1. lighttpd with no proxy or other mods. 
server.document-root=/usr/local/www/squirrelmail-1.4.19
2. configtest.php has no complaints and says, "looks fine to me!"
3. no plugins are enabled
4. using squirrelmail-1.4.19.tar.bz2 from squirrelmail.org
5. using PHP 5.2.10 (cgi-fcgi) (built: Jun 22 2009 16:18:18)
-- 
View this message in context: 
http://old.nabble.com/404-after-sending-mail-tp13112479p27212053.html
Sent from the squirrelmail-users mailing list archive at Nabble.com.


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
-
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): 
https://lists.sourceforge.net/lists/listinfo/squirrelmail-users


Re: [SM-USERS] 404 after sending mail

2010-01-19 Thread bob.33


Tomas Kuliavas wrote:
> 
> 
> bob.33 wrote:
>> 
>> 2. configtest.php has no complaints and says, "looks fine to me!"
>> 
> You look at the wrong part of page. Location base test involves human. You
> must check text written after "Base URL detected as"  and make sure that
> it matches address displayed in browser's address bar. If you open
> http://mail.example.org/src/configtest.php, line should say "Base URL
> detected as: http://mail.example.org/src (location base autodetected)" and
> not something else.
> 

ah, yes!  i understand now.  
in my case, http://mail.example.org/src/configtest.php reports thusly:
Base URL detected as: http://mail.example.org (location base autodetected)

do you think i should upgrade php from 5.2.10 => 5.2.12 (i'd rather not if
possible) or is there a fix within squirrelmail?
-- 
View this message in context: 
http://old.nabble.com/404-after-sending-mail-tp13112479p27216194.html
Sent from the squirrelmail-users mailing list archive at Nabble.com.


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
-
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): 
https://lists.sourceforge.net/lists/listinfo/squirrelmail-users


Re: [SM-USERS] 404 after sending mail

2010-01-19 Thread bob.33


Tomas Kuliavas wrote:
> 
> 
> Let's start by finding why autodetection fails. Looks like PHP_SELF is
> missing. PHP upgrade should not change things. I don't see any similar
> things in changelog. It might be one of FastCGI setup differences or some
> SquirrelMail security updates corrupt PHP_SELF.
> 
> Could you create test script with
> ---
>  header('Content-Type: text/plain;');
> var_dump($_SERVER);
> ---
> put it in SquirrelMail src directory, run it same way as you run
> configtest.php (http://mail.example.org/src/test.php) and show script
> output. Replace domain info with 'example.org'. Or test PHP settings
> according to SquirrelMail docs
> (http://www.squirrelmail.org/wiki/TestPHPSettings) and show PHP variables
> table.
> 

PHP_SELF seems to return a zero-byte string.  the script you suggested
renders thusly:

array(56) {
  ["MACHTYPE"]=>
  string(4) "i386"
  ["USER"]=>
  string(4) "root"
  ["MAIL"]=>
  string(14) "/var/mail/root"
  ["VENDOR"]=>
  string(5) "intel"
  ["SHLVL"]=>
  string(1) "2"
  ["HOME"]=>
  string(5) "/root"
  ["OLDPWD"]=>
  string(38) "/usr/local/www/squirrelmail-1.4.19/src"
  ["LSCOLORS"]=>
  string(22) "Exfxcxdxbxegedabagacad"
  ["PAGER"]=>
  string(16) "/usr/bin/less -X"
  ["ERR"]=>
  string(1) "0"
  ["GROUP"]=>
  string(5) "wheel"
  ["LOGNAME"]=>
  string(4) "root"
  ["_"]=>
  string(28) "/usr/local/etc/rc.d/lighttpd"
  ["BLOCKSIZE"]=>
  string(1) "K"
  ["TERM"]=>
  string(11) "xterm-color"
  ["PATH"]=>
  string(81)
"/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin"
  ["RC_PID"]=>
  string(5) "78684"
  ["REMOTEHOST"]=>
  string(11) "10.1.1.4"
  ["HISTSIZE"]=>
  string(4) "1000"
  ["SHELL"]=>
  string(8) "/bin/csh"
  ["HOST"]=>
  string(21) "mail.example.org"
  ["OSTYPE"]=>
  string(7) "FreeBSD"
  ["PWD"]=>
  string(34) "/usr/local/www/squirrelmail-1.4.19"
  ["CLICOLOR"]=>
  string(3) "YES"
  ["FTP_PASSIVE_MODE"]=>
  string(3) "YES"
  ["HOSTTYPE"]=>
  string(7) "FreeBSD"
  ["EDITOR"]=>
  string(2) "vi"
  ["PHP_FCGI_CHILDREN"]=>
  string(1) "1"
  ["FCGI_ROLE"]=>
  string(9) "RESPONDER"
  ["SERVER_SOFTWARE"]=>
  string(15) "lighttpd/1.4.25"
  ["SERVER_NAME"]=>
  string(18) "mail.example.org"
  ["GATEWAY_INTERFACE"]=>
  string(7) "CGI/1.1"
  ["SERVER_PORT"]=>
  string(2) "80"
  ["SERVER_ADDR"]=>
  string(12) "10.1.1.4"
  ["REMOTE_PORT"]=>
  string(5) "55400"
  ["REMOTE_ADDR"]=>
  string(11) "10.1.1.5"
  ["SCRIPT_NAME"]=>
  string(13) "/src/test.php"
  ["PATH_INFO"]=>
  string(0) ""
  ["SCRIPT_FILENAME"]=>
  string(46) "/usr/local/www/mail.example.org/src/test.php"
  ["DOCUMENT_ROOT"]=>
  string(33) "/usr/local/www/mail.example.org"
  ["REQUEST_URI"]=>
  string(13) "/src/test.php"
  ["QUERY_STRING"]=>
  string(0) ""
  ["REQUEST_METHOD"]=>
  string(3) "GET"
  ["REDIRECT_STATUS"]=>
  string(3) "200"
  ["SERVER_PROTOCOL"]=>
  string(8) "HTTP/1.1"
  ["HTTP_HOST"]=>
  string(18) "mail.example.org"
  ["HTTP_USER_AGENT"]=>
  string(95) "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7"
  ["HTTP_ACCEPT"]=>
  string(63)
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
  ["HTTP_ACCEPT_LANGUAGE"]=>
  string(14) "en-us,en;q=0.5"
  ["HTTP_ACCEPT_ENCODING"]=>
  string(12) "gzip,deflate"
  ["HTTP_ACCEPT_CHARSET"]=>
  string(30) "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
  ["HTTP_KEEP_ALIVE"]=>
  string(3) "300"
  ["HTTP_CONNECTION"]=>
  string(10) "keep-alive"
  ["HTTP_COOKIE"]=>
  string(36) "SQMSESSID=nlckfq8q13075a7vb4jj6g4os1"
  ["PHP_SELF"]=>
  string(0) ""
  ["REQUEST_TIME"]=>
  int(1263857684)
}

-- 
View this message in context: 
http://old.nabble.com/404-after-sending-mail-tp13112479p27218741.html
Sent from the squirrelmail-users mailing list archive at Nabble.com.


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
-
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): 
https://lists.sourceforge.net/lists/listinfo/squirrelmail-users


Re: [SM-USERS] 404 after sending mail

2010-01-20 Thread bob.33


Tomas Kuliavas wrote:
> Could you check http://mail.example.org/src/test.php?test and see if
> REQUEST_URI includes '?test' part?If you want you could try upgrading your
> PHP setup in desperate hope than newer version adds PHP_SELF variable.
> Correct fix is to make SquirrelMail use REQUEST_URI, when PHP_SELF is not
> available.  ["REQUEST_URI"]=>  string(26) "/src/test.php?velociraptor" 
> ["QUERY_STRING"]=>  string(12) "velociraptor"i'm running the most current
> stable version of squirrelmail available (1.4.19) and it seems that
> REQUEST_URI does in fact include qs params.in case it helps, my php.ini
> has cgi.fix_pathinfo=1 and my lighttpd.conf has the following php
> settings:  fastcgi.server = ( ".php" => (("bin-path" =>
> "/usr/local/bin/php-cgi","socket" => "/tmp/php.socket",   
> "broken-scriptfilename" => "enable"  )))i've tried variations of the
> fix_pathinfo and broken-scriptfilename, but to no avail.
-- 
View this message in context: 
http://old.nabble.com/404-after-sending-mail-tp13112479p27226471.html
Sent from the squirrelmail-users mailing list archive at Nabble.com.


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
-
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): 
https://lists.sourceforge.net/lists/listinfo/squirrelmail-users


Re: [SM-USERS] 404 after sending mail

2010-01-21 Thread bob.33


Paul Lesniewski wrote:
> 
> If you just want to paste in the new
> php_self() function in functions/strings.php, here it is:
> 
> function php_self () {
> if (sqgetGlobalVar('PHP_SELF', $php_self, SQ_SERVER)
>  && !empty($php_self)) {
> if (sqgetGlobalVar('QUERY_STRING', $query_string, SQ_SERVER)
>  && !empty($query_string)) {
> $php_self .= '?' . $query_string;
> }
> return $php_self;
> }
> else if (sqgetGlobalVar('REQUEST_URI', $req_uri, SQ_SERVER)
>   && !empty($req_uri)) {
> if (strpos($req_uri, '?') === FALSE
>  && sqgetGlobalVar('QUERY_STRING', $query_string, SQ_SERVER)
>  && !empty($query_string)) {
> $req_uri .= '?' . $query_string;
> }
> return $req_uri;
> }
> return '';
> }
> -- 
> Paul Lesniewski
> 

bravo, my brothers!  that seems to have fixed everything.  

-- 
View this message in context: 
http://old.nabble.com/404-after-sending-mail-tp13112479p27249586.html
Sent from the squirrelmail-users mailing list archive at Nabble.com.


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
-
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): 
https://lists.sourceforge.net/lists/listinfo/squirrelmail-users


Re: [SM-USERS] 404 after sending mail

2010-01-24 Thread bob.33


Paul Lesniewski wrote:
> 
> Thanks for being so helpful.  I have slightly rewritten this function,
> and although the ultimate functionality should be identical, it'd be
> good to have other people test it.  Do you mind?  Here it is:
> 
> # most non-coding lines removed for brevity by bob.33
> 
> function php_self() {
> $request_uri = '';
> $request_uri = '';
> if (!sqgetGlobalVar('PHP_SELF', $request_uri, SQ_SERVER)
>  || empty($request_uri)) {
> $request_uri = '';
> if (!sqgetGlobalVar('REQUEST_URI', $request_uri, SQ_SERVER)
>  || empty($request_uri)) {
> // TODO: anyone have any other ideas?  maybe
> $_SERVER['SCRIPT_NAME']???
> //
> return '';
> }
> }
> $query_string = '';
> if (strpos($request_uri, '?') === FALSE
>  && sqgetGlobalVar('QUERY_STRING', $query_string, SQ_SERVER)
>  && !empty($query_string)) {
> $request_uri .= '?' . $query_string;
> }
> return $request_uri;
> }
> 

the new fxn does work as expected, but only if the following line is
commented out

$_SERVER['SCRIPT_NAME']???

thanks for the help.  my lighttpd+freebsd chassis is available for
squirrelmail testing anytime.


-- 
View this message in context: 
http://old.nabble.com/404-after-sending-mail-tp13112479p27280180.html
Sent from the squirrelmail-users mailing list archive at Nabble.com.


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
-
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): 
https://lists.sourceforge.net/lists/listinfo/squirrelmail-users