You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Umar <un...@gmail.com> on 2010/08/29 09:00:12 UTC

[users@httpd] Strange problem with mod_fcgid

Dear Users,

I am facing strange problem with mod_fcgid while using mod_rewrite.

Here is my rewrite rule.

RewriteRule ^/.*-jobs-apply-(\d+) /imran.php [L]

When i am trying to access http://www.mysite.org/netadmin30-jobs-apply-293

Its not working.

Here is the rewrite log

119.158.119.130 - - [29/Aug/2010:06:48:43 +0500]
[www.mysite.org/sid#28932018][rid#289af058/initial] (2) init rewrite engine
with requested uri /abcd-jobs-apply-200
119.158.119.130 - - [29/Aug/2010:06:48:43 +0500]
[www.mysite.org/sid#28932018][rid#289af058/initial] (3) applying pattern
'^/.*-jobs-apply-(\d+)' to uri '/abcd-jobs-apply-200'
119.158.119.130 - - [29/Aug/2010:06:48:43 +0500]
[www.mysite.org/sid#28932018][rid#289af058/initial] (2) rewrite
'/abcd-jobs-apply-200' -> '/imran.php'
119.158.119.130 - - [29/Aug/2010:06:48:43 +0500]
[www.mysite.org/sid#28932018][rid#289af058/initial] (2) local path result:
/imran.php
119.158.119.130 - - [29/Aug/2010:06:48:43 +0500]
[www.mysite.org/sid#28932018][rid#289af058/initial] (2) prefixed with
document_root to /usr/local/www/mydata/imran.php
119.158.119.130 - - [29/Aug/2010:06:48:43 +0500]
[www.mysite.org/sid#28932018][rid#289af058/initial] (1) go-ahead with
/usr/local/www/mydata/imran.php [OK]

Here is www error log

[Sun Aug 29 06:48:43 2010] [warn] [client 119.158.119.130] (53)Software
caused connection abort: mod_fcgid: error reading data from FastCGI server
[Sun Aug 29 06:48:43 2010] [error] [client 119.158.119.130] Premature end of
script headers: imran.php


But if i change my rewrite rule something like this.

RewriteRule ^/netadmin30-jobs-apply-(\d+) /imran.php [L]

Then its work perfect, that means problem with ^/.*

Would you please help how i can solve this

Regards,

Umar
-- 
View this message in context: http://old.nabble.com/Strange-problem-with-mod_fcgid-tp29564057p29564057.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Strange problem with mod_fcgid

Posted by Nick Kew <ni...@webthing.com>.
On 29 Aug 2010, at 13:45, Tears ! wrote:

> Dear Nick,
> 
> which script is broken imran.php ?
> 
> The same thing is work with mod_php
> 
> In imran.php i simply added
> 
> <?php
> 
> print_r($_GET);
> 
> ?>
> 
> I am sure problem with mod_fcgid not php

OK, that's plausible.  If you're not on the latest mod_fcgid,
please upgrade before you do anything more!

It would still be helpful to know exactly what the difference is.  If you
could fix up your PHP to print both GET and ENV, then run it with
both working and failing variants of your rewrite rules, we'd have
(with a bit of luck) a startingpoint for investigation.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Strange problem with mod_fcgid

Posted by Tears ! <un...@gmail.com>.
Dear Nick,

which script is broken imran.php ?

The same thing is work with mod_php

In imran.php i simply added

<?php

print_r($_GET);

?>

I am sure problem with mod_fcgid not php

Regards,

Umar

On Sun, Aug 29, 2010 at 1:09 PM, Nick Kew <ni...@webthing.com> wrote:

>
> On 29 Aug 2010, at 08:00, Umar wrote:
>
> > [Sun Aug 29 06:48:43 2010] [error] [client 119.158.119.130] Premature end
> of
> > script headers: imran.php
>
> Your script is broken.  You need to fix it.
>
> > But if i change my rewrite rule something like this.
> >
> > Then its work perfect, that means problem with ^/.*
>
> Debugging technique Lesson 1: find out what's different in what the
> script sees.  You can do that by plugging in a simple echo-everything
> script in place of the one you're debugging.
>
> --
> Nick Kew
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Umar Draz
Network Administrator

Re: [users@httpd] Strange problem with mod_fcgid

Posted by Nick Kew <ni...@webthing.com>.
On 29 Aug 2010, at 08:00, Umar wrote:

> [Sun Aug 29 06:48:43 2010] [error] [client 119.158.119.130] Premature end of
> script headers: imran.php

Your script is broken.  You need to fix it.

> But if i change my rewrite rule something like this.
> 
> Then its work perfect, that means problem with ^/.*

Debugging technique Lesson 1: find out what's different in what the
script sees.  You can do that by plugging in a simple echo-everything
script in place of the one you're debugging.

-- 
Nick Kew
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org