![]() |
|
#1
|
|||
|
|||
apache2 - php cgi fehler - schleifeHallo,
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
|
||||
|
||||
|
My german isn't as good as it used to be...
can you please post in english? |
|
#3
|
|||
|
|||
|
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
|
||||
|
||||
|
this might work..
most of the times /cgi-bin/ is a special directory Code:
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? |
|
#5
|
|||
|
|||
|
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 Parse error: parse error in /usr/bin/php on line 6071 |
|
#6
|
||||
|
||||
|
hm, maybe there is just aproblem with the cgi module...
maybe you can re-compile PHP or download it from some place, pre-compiled |
|
#7
|
|||
|
|||
|
but on command line php does work!
I think I will downgrade to Apache 1.3 ... :-( |
|
#8
|
||||
|
||||
|
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 |
|
#9
|
|||
|
|||
|
Thank you for your help!
I'll inform you if it does work on apache 1 |
Recent GIDBlog
Meeting the populace by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
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