GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 27-Nov-2003, 05:56
inna inna is offline
New Member
 
Join Date: Nov 2003
Posts: 5
inna is an unknown quantity at this point

apache2 - php cgi fehler - schleife


Hallo,

ich habe ein hoechst seltsames Problem mit dem Apache2.
Ich muss php als cgi (nicht als dso) zum laufen
bringen.
Dafuer habe ich in meiner httpd.conf folgendes stehen:

Alias /cgi-bin/ /usr/local/apache2/cgi-bin/
ADDType application/x-httpd-php .php
Action application/x-httpd-php /cgi-bin/php

(wenn ich ScriptAlias statt Alias benutze, versucht der Apache das php selbst als SKRIPT auszufuehren, gibt dann die fehlermeldung
Warning: Unexpected character in input: '_' (ASCII=4) state=1 in /var/www/web1/html/cgi-bin/php on line 6068
u.s.w.)

Mit obigen Angaben erhalte ich ein 500 internal server error und in der error_log steht (LogLevel debug)
------------------ SCHNIPP -----------------
[Thu Nov 27 12:22:15 2003] [error] [client 129.143.13.82] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Thu Nov 27 12:22:15 2003] [debug] core.c(2694): [client 129.143.13.82] r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /index.php
----------------- SCHNAPP -----------------------------------

Nun habe ich beim besten Willen keine Ahnung, was den Apache dazu bewegen koennte, solche seltamen redirects durchzufuehren, ihr vielleicht?

System: RedHat 7.3 (kann ich nicht aendern)
Apache 2.048, php 4.3.4

Kann auch gerne die gesamte httpd.conf schicken.

Irgendwer Ideen?
Bin verzweifelt, ich kompilier schon seit ner guten Woche an dem Kram.
(ich brauche php als cgi weil ich den MapServ drauf laufen lassen will, der geht momentan nur mit php als cgi...)

Inna
  #2  
Old 27-Nov-2003, 06:08
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
My german isn't as good as it used to be...

can you please post in english?
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #3  
Old 27-Nov-2003, 07:16
inna inna is offline
New Member
 
Join Date: Nov 2003
Posts: 5
inna is an unknown quantity at this point
Oh sorry, I'm already so stressed with that problem,
that I forgot that this is actually a forum in english
language...
OK, here the problem in english again :-) :

I have a somewhat strange problem with the apache2 webserver
I have to run php as a cgi (not as a dso)

For that my httpd.conf has the following lines:

Alias /cgi-bin/ /usr/local/apache2/cgi-bin/
ADDType application/x-httpd-php .php
Action application/x-httpd-php /cgi-bin/php

(if I use ScriptAlias instead of Alias, Apache tries to execute the php program itself as SCRIPT. That leads to the following error:
Warning: Unexpected character in input: '_' (ASCII=4) state=1 in /var/www/web1/html/cgi-bin/php on line 6068
and so on)

With the above config in the httpd.conf I get an
500 internal server error and in the error_log I have (LogLevel debug):
------------------ CUT -----------------
[Thu Nov 27 12:22:15 2003] [error] [client 129.143.13.82] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Thu Nov 27 12:22:15 2003] [debug] core.c(2694): [client 129.143.13.82] r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /cgi-bin/php/index.php
[Thu Nov 27 12:22:15 2003] [debug] core.c(2700): [client 129.143.13.82] redirected from r->uri = /index.php
----------------- CUT -----------------------------------

Now I have absolutely NO idea, why apache does such strange redirects. Maybe YOU have an idea?

System: RedHat 7.3 (can't change it)
Apache 2.048, php 4.3.4

I can also send you, the complete httpd.conf if you like.

Does anyone has any idea?
I'm somewhat distressed, I'm compiling already a whole week on that aapche...
(I need php as cgi, because I want to run MapServ on it, this program does only run with php as a cgi...)

Inna
  #4  
Old 27-Nov-2003, 07:58
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
this might work..

most of the times /cgi-bin/ is a special directory

Code:
ScriptAlias /php/ /usr/local/apache2/cgi-bin/ ADDType application/x-httpd-php .php Action application/x-httpd-php /php/php

and I checked the docs and it must be ScriptAlias, but because you set the path to cgi-bin it was executed.

also, this: /usr/local/apache2/cgi-bin/
it isn't a symlink that is looping?
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #5  
Old 27-Nov-2003, 09:07
inna inna is offline
New Member
 
Join Date: Nov 2003
Posts: 5
inna is an unknown quantity at this point
It didn't work.

I set the following:
ScriptAlias /php/ /usr/bin/php
ADDType application/x-httpd-php .php
Action application/x-httpd-php /php/php

But php still gets executed:

Warning: Unexpected character in input: '' (ASCII=4) state=1 in /usr/bin/php on line 6068

Warning: Unexpected character in input: ' in /usr/bin/php on line 6069

Warning: Unexpected character in input: '' (ASCII=4) state=1 in /usr/bin/php on line 6069

Warning: Unexpected character in input: '' (ASCII=4) state=1 in /usr/bin/php on line 6070

Warning: Unexpected character in input: '' (ASCII=2 state=1 in /usr/bin/php on line 6071

Parse error: parse error in /usr/bin/php on line 6071
  #6  
Old 27-Nov-2003, 09:28
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
hm, maybe there is just aproblem with the cgi module...

maybe you can re-compile PHP or download it from some place, pre-compiled
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #7  
Old 27-Nov-2003, 09:36
inna inna is offline
New Member
 
Join Date: Nov 2003
Posts: 5
inna is an unknown quantity at this point
but on command line php does work!

I think I will downgrade to Apache 1.3 ... :-(
  #8  
Old 27-Nov-2003, 09:45
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
as you might know PHP isn't ready for Apache 2 yet

I still see a lot of bugs comming in about apache2 on php.net

Please let me know if it's working on apache 1.3.2*
because if that doesn't work you might want to try asking php-install@lists.php.net
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #9  
Old 27-Nov-2003, 09:55
inna inna is offline
New Member
 
Join Date: Nov 2003
Posts: 5
inna is an unknown quantity at this point
Thank you for your help!

I'll inform you if it does work on apache 1
 
 

Recent GIDBlogMeeting the populace by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimizing your web server with Turck MMCache for PHP JdS Web Hosting Forum 2 07-Jan-2004 07:48
Automate a data change php form mjfmn MySQL / PHP Forum 4 20-Oct-2003 09:37
[Linux] Installing PHP --with-mcrypt JdS Web Hosting Forum 0 20-Aug-2003 08:40
PHP in HTML jrobbio Web Design Forum 4 24-Jul-2003 06:05
All the big PHP script collections that matter jrobbio MySQL / PHP Forum 5 06-Jun-2003 16:14

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 15:24.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.