cgi Problem mit Apache

Alles, was den Apache betrifft, kann hier besprochen werden.

cgi Problem mit Apache

Postby haense » 06. March 2005 16:38

Hallo leute,

ich hab ein sunlog (weblog) am laufen. Es funktionier auch fast alles, jedoch erhalte ich folgende Meldung, wenn ich eine Kategorie löschen, bzw. den Bilderordner wechseln möchte:

Code: Select all
Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual page for CGI security.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.


Kann mir hier jemand helfen? So wie ich das verstehe, besteht hier ein falscher Zugriff auf die php.exe, bin mir aber nicht wirklich sicher. Vermutlich brauch ich noch etwas für meine httpd.conf

Gruzzz
haense
 
Posts: 8
Joined: 24. February 2005 11:03

Postby deepsurfer » 06. March 2005 17:42

hast du VHOST bei dir laufen ??
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby haense » 07. March 2005 11:26

yep hab ich, irgendwie muss da noch was rein, gell? ;-)

gruzz
haense
 
Posts: 8
Joined: 24. February 2005 11:03

Postby deepsurfer » 07. March 2005 16:28

scheint so... kannst du die VHOST sektion für den betreffenden bereich mal posten... vermutlich hast du die CGI Anweisungen für den VHOST vergessen.
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby haense » 07. March 2005 19:09

yep sowas hab ich vermutet, hab aber nirgends ein beispiel gefunden

Code: Select all
NameVirtualHost *

<VirtualHost *>
   ServerName meine.domain.com
   DocumentRoot "C:\_wwwroot\irgendwo"
   ErrorLog "C:\_wwwroot\irgendwo\error.log"
</VirtualHost>


thx
haense
 
Posts: 8
Joined: 24. February 2005 11:03

Postby petitprince » 07. March 2005 20:12

Du benutzt die falschen Slashes

Code: Select all
\


Du musst innerhalb der httpd.conf Backslashes

Code: Select all
/


(also die über der Sieben ;-)) benutzen.

petitprince
petitprince
 
Posts: 74
Joined: 10. January 2005 22:31

Postby haense » 07. March 2005 20:31

hehehe, sehr aufmerksam

petitprince wrote:Du benutzt die falschen Slashes

Code: Select all
\


Du musst innerhalb der httpd.conf Backslashes

Code: Select all
/


(also die über der Sieben ;-)) benutzen.

petitprince


erstens, ist der Slash / über der Sieben, und nicht der Backslash \
und zweitens gehts auch mit dem Backslash
und drittens löst das mein Problem nicht

Aber danke
haense
 
Posts: 8
Joined: 24. February 2005 11:03

Postby petitprince » 07. March 2005 20:39

"Slash" und "Backslash" habe ich in der Tat vertauscht. Wenn Apache sich innerhalb der httpd.conf mittlerweile auch mit Windows-Slashs konfigurieren läßt, ist das schön, die Standard-Konfigurationsdatei von XAMPP benutzt allerdings weiterhin Unix-konforme Slashs.

petitprince
petitprince
 
Posts: 74
Joined: 10. January 2005 22:31

Postby haense » 09. March 2005 20:15

na, deepsurfer? :) wie siehts aus?
wieder zeit für computer&co.
Image
haense
 
Posts: 8
Joined: 24. February 2005 11:03

Postby deepsurfer » 10. March 2005 08:53

bei mir siehts gut aus... :P

durch eine nochmalige recherche (google sei dank) kam ich auf diesen Text

PHP Manual:
Case 2: using --enable-force-cgi-redirect
This compile-time option prevents anyone from calling PHP directly with a url like http://my.host/cgi-bin/php/secretdir/script.php. Instead, PHP will only parse in this mode if it has gone through a web server redirect rule.

Usually the redirection in the Apache configuration is done with the following directives:

copy to clipboard
Action php-script /cgi-bin/php
AddHandler php-script .php

This option has only been tested with the Apache web server, and relies on Apache to set the non-standard CGI environment variable REDIRECT_STATUS on redirected requests. If your web server does not support any way of telling if the request is direct or redirected, you cannot use this option and you must use one of the other ways of running the CGI version documented here.


Folglich beide Einträge in der httpd.conf einfügen, entweder als Systemeintrag oder zum VHOST.



Quelle aus Google:
GOOGLE Suchlink mit Ergebnissen
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian


Return to Apache

Who is online

Users browsing this forum: No registered users and 92 guests