Re: [SM-USERS] Nginx Configuration and 404 Error

2016-01-27 Thread sah62
More info: I've discovered an issue with the value returned from the
$_SERVER['PHP_SELF'] variable. For some reason the value contains the path
to a particular file concatendated to itself, like this:

/squirrelmail/src/left_main.php/squirrelmail/src/left_main.php

This causes HTTP 404 errors when attempting to process (delete, move, etc)
displayed messages because the path to the PHP source files ends up being
invalid. The fix is to replace PHP_SELF with SCRIPT_NAME in the
functions/strings.php file at line 1514 inside the php_self() function.That
is, change this:

if (!sqgetGlobalVar('PHP_SELF', $request_uri, SQ_SERVER)

to this:

if (!sqgetGlobalVar('SCRIPT_NAME', $request_uri, SQ_SERVER)

I entered a bug report in SourceForge
(https://sourceforge.net/p/squirrelmail/bugs/2829/) that was closed as
invalid with this comment:

"While the various CGI variables provided by PHP can seem like a web of
confusion, they are never given in such incorrect fashion unless you have a
botched server-side configuration. This problem is not a SquirrelMail
problem; it is a mistake in your Nginx/FCGI configuration."

So back to my original question: can someone please help me figure out
what's broken in my Nginx/FCGI configuration? It's working just fine for
other services I'm running on the same server, like Drupal.



--
View this message in context: 
http://squirrelmail.5843.n7.nabble.com/Nginx-Configuration-and-404-Error-tp26248p26252.html
Sent from the squirrelmail-users mailing list archive at Nabble.com.

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
-
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] Nginx Configuration and 404 Error

2016-01-27 Thread Paul Lesniewski
On 1/27/16, sah62  wrote:
> More info: I've discovered an issue with the value returned from the
> $_SERVER['PHP_SELF'] variable. For some reason the value contains the path
> to a particular file concatendated to itself, like this:
>
> /squirrelmail/src/left_main.php/squirrelmail/src/left_main.php
>
> This causes HTTP 404 errors when attempting to process (delete, move, etc)
> displayed messages because the path to the PHP source files ends up being
> invalid. The fix is to replace PHP_SELF with SCRIPT_NAME in the
> functions/strings.php file at line 1514 inside the php_self() function.That
> is, change this:
>
> if (!sqgetGlobalVar('PHP_SELF', $request_uri, SQ_SERVER)
>
> to this:
>
> if (!sqgetGlobalVar('SCRIPT_NAME', $request_uri, SQ_SERVER)
>
> I entered a bug report in SourceForge
> (https://sourceforge.net/p/squirrelmail/bugs/2829/) that was closed as
> invalid with this comment:
>
> "While the various CGI variables provided by PHP can seem like a web of
> confusion, they are never given in such incorrect fashion unless you have a
> botched server-side configuration. This problem is not a SquirrelMail
> problem; it is a mistake in your Nginx/FCGI configuration."
>
> So back to my original question: can someone please help me figure out
> what's broken in my Nginx/FCGI configuration? It's working just fine for
> other services I'm running on the same server, like Drupal.

Make sure you literally looked at the contents of $_SERVER['PHP_SELF']
and not some SquirrelMail interpretation thereof such as $PHP_SELF.
If the former does in fact include that duplicate path, you need to
review your Nginx configuration.  Asking for help in the Nginx mailing
list might be more appropriate in that case.

-- 
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
-
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] Nginx Configuration and 404 Error

2016-01-27 Thread sah62
OK, problem solved. There are a great number of nginx configuration guides
that suggest this configuration setting if you're using FastCGI:

fastcgi_param PATH_INFO $fastcgi_script_name;

Commenting out this setting fixed the problem for me. I'd like to thank Paul
Lesniewski for pointing me in the right direction.



--
View this message in context: 
http://squirrelmail.5843.n7.nabble.com/Nginx-Configuration-and-404-Error-tp26248p26254.html
Sent from the squirrelmail-users mailing list archive at Nabble.com.

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
-
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