WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Linux, UNIX, Open Source

Linux, UNIX, Open Source Rat & Tat bei Problemen und Fragen rund um GNU/Linux, BSD und sonstige UNIXe

Microsoft KARRIERECAMPUS

Antwort
 
Themen-Optionen Ansicht
Alt 27.01.2005, 14:14   #1
coolgreyhound
Jr. Member
 
Registriert seit: 15.04.2004
Alter: 59
Beiträge: 62


Frage Apache mit PHP

Hallo Linux-Freunde!

Habe eine Woody-Server bei dem ich eine LAMP-Konfiguration brauche. Nun, installiert und eingerichtet ist ja alles. Im Root-Verzeichnis (/var/www/) vom Apache funktioniert auch eine PHP-Script (habe dazu eine phpinfo gemacht). Nur wenn ich ein Verzeichnis mache und dort die Scripts reinstelle, funktionierts leider nicht mehr.Gebe ja zu das ich nicht gerade eine Apache-Gurou bin

Verwende folgende Konfiguration:
Apache 1.3.26
PHP 4.1.2
____________________________________
(\\_/)
(O.o)
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination.
coolgreyhound ist offline   Mit Zitat antworten
Alt 27.01.2005, 14:48   #2
Sloter
Inventar
 
Registriert seit: 05.01.2000
Beiträge: 3.812


Standard

Userrechte prüfen, chmod 755.......

Ein Königreich für eine Fehlermeldung

Sloter
Sloter ist offline   Mit Zitat antworten
Alt 27.01.2005, 15:02   #3
coolgreyhound
Jr. Member
 
Registriert seit: 15.04.2004
Alter: 59
Beiträge: 62


Standard

Habe deinen Rat befolgt, aber leider, das wars nicht. Fehlermeldung habe ich keine. Wenn ich so ein Script im Browser anspreche, fragt der Browser was er damit tun soll, öffnen mit oder speichern. Obwohl das File in der Meldung eindeutig als PHP file erkannt wird.
____________________________________
(\\_/)
(O.o)
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination.
coolgreyhound ist offline   Mit Zitat antworten
Alt 27.01.2005, 15:10   #4
T.dot
Master
 
Registriert seit: 13.08.2003
Beiträge: 624


Standard

Das Problem hatte ich mal, weil ich zwar php installiert hatte aber in der httpd.conf (denke die wars) ned drinstand, was er mit PHP Dateien machen sollte - das trat aber bei allen PHP Dateien auf und nicht nur bei denen in Unterverzeichnissen.
Was genau eingetragen werden muss steht in der Step by Step Hilfe von der PHP Installation.

mfg Thomas
T.dot ist offline   Mit Zitat antworten
Alt 27.01.2005, 15:20   #5
coolgreyhound
Jr. Member
 
Registriert seit: 15.04.2004
Alter: 59
Beiträge: 62


Standard

Ja, denke ich habe alles Berücksichtigt.

Ausschnitte aus httpd.conf:
Zitat:

LoadModule php4_module /usr/lib/apache/1.3/libphp4.so

<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.shtml index.cgi index.php
</IfModule>

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
____________________________________
(\\_/)
(O.o)
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination.
coolgreyhound ist offline   Mit Zitat antworten
Alt 27.01.2005, 16:57   #6
m@rio
Master
 
Registriert seit: 10.10.2002
Beiträge: 711


Standard

Zitat:
Original geschrieben von coolgreyhound
Ausschnitte aus httpd.conf:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Und wo in der httpd.conf hast du das hinzugefügt? Eventuell innerhalb von einem <Directory></Directory> Block?
Dann gilt der Eintrag nämlich nur für jeweilige Directory.
m@rio ist offline   Mit Zitat antworten
Alt 28.01.2005, 10:41   #7
coolgreyhound
Jr. Member
 
Registriert seit: 15.04.2004
Alter: 59
Beiträge: 62


Standard

Nein, leider nicht. Habe die Anweisungen nur auskommentiert welche innerhalb der mod_mime.c liegen. Dieses Modul wird auch geladen. Die Einzige Fehlermeldung im Apachelog ist, dass er das Magic-File nicht lesen kann. Dürfte aber eine andere Baustelle sein *g*
____________________________________
(\\_/)
(O.o)
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination.
coolgreyhound ist offline   Mit Zitat antworten
Alt 28.01.2005, 21:09   #8
m@rio
Master
 
Registriert seit: 10.10.2002
Beiträge: 711


Standard

Poste mal deine httpd.conf. Am Besten ohne Leerzeilen und Comments.
Etwa so: cat httpd.conf |grep -v -e "#" -e ^$ > dateiname.txt
Domainnamen und IPs kannst du ja maskieren. Ich kann die Konfig dann mal an meinem Apache ausprobieren.
m@rio ist offline   Mit Zitat antworten
Alt 31.01.2005, 12:08   #9
coolgreyhound
Jr. Member
 
Registriert seit: 15.04.2004
Alter: 59
Beiträge: 62


Standard

Mache ich gerne

Teil1:
ServerType standalone
ServerRoot /etc/apache
LockFile /var/lock/apache.lock
PidFile /var/run/apache.pid
ScoreBoardFile /var/run/apache.scoreboard
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 100
LoadModule config_log_module /usr/lib/apache/1.3/mod_log_config.so
LoadModule mime_magic_module /usr/lib/apache/1.3/mod_mime_magic.so
LoadModule mime_module /usr/lib/apache/1.3/mod_mime.so
LoadModule negotiation_module /usr/lib/apache/1.3/mod_negotiation.so
LoadModule status_module /usr/lib/apache/1.3/mod_status.so
LoadModule autoindex_module /usr/lib/apache/1.3/mod_autoindex.so
LoadModule dir_module /usr/lib/apache/1.3/mod_dir.so
LoadModule cgi_module /usr/lib/apache/1.3/mod_cgi.so
LoadModule userdir_module /usr/lib/apache/1.3/mod_userdir.so
LoadModule alias_module /usr/lib/apache/1.3/mod_alias.so
LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so
LoadModule access_module /usr/lib/apache/1.3/mod_access.so
LoadModule auth_module /usr/lib/apache/1.3/mod_auth.so
LoadModule expires_module /usr/lib/apache/1.3/mod_expires.so
LoadModule unique_id_module /usr/lib/apache/1.3/mod_unique_id.so
LoadModule setenvif_module /usr/lib/apache/1.3/mod_setenvif.so
LoadModule perl_module /usr/lib/apache/1.3/mod_perl.so
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
ExtendedStatus On
Port 80
User www-data
Group www-data
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options SymLinksIfOwnerMatch
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Order deny,allow
Deny from all
</Limit>
</Directory>
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.shtml index.cgi index.php
</IfModule>
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
UseCanonicalName On
TypesConfig /etc/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile share/magic
</IfModule>
HostnameLookups Off
ErrorLog /var/log/apache/error.log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %v" f
ull
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %P %T" d
ebug
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combine
d
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/apache/access.log combined
____________________________________
(\\_/)
(O.o)
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination.
coolgreyhound ist offline   Mit Zitat antworten
Alt 31.01.2005, 12:09   #10
coolgreyhound
Jr. Member
 
Registriert seit: 15.04.2004
Alter: 59
Beiträge: 62


Standard

Teil2:
ServerSignature On
Alias /icons/ /usr/share/apache/icons/
<Directory /usr/share/apache/icons>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory /usr/lib/cgi-bin/>
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
<IfModule mod_autoindex.c>
IndexOptions FancyIndexing NameWidth=*
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/deb.gif .deb
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README
HeaderName HEADER
</IfModule>
<IfModule mod_mime.c>
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .se
AddLanguage cz .cz
<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja pl pt pt-br ltz ca es sv
</IfModule>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddType application/x-tar .tgz
AddType image/bmp .bmp
AddType text/x-hdml .hdml
</IfModule>
AddDefaultCharset on
<IfModule mod_setenvif.c>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
</IfModule>
<IfModule mod_perl.c>
Alias /perl/ /var/www/perl/
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
</Location>
</IfModule>
Alias /doc/ /usr/share/doc/
<Location /doc>
order deny,allow
deny from all
allow from 127.0.0.0/255.0.0.0
Options Indexes FollowSymLinks MultiViews
</Location>
<IfModule mod_proxy.c>
</IfModule>
____________________________________
(\\_/)
(O.o)
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination.
coolgreyhound ist offline   Mit Zitat antworten
Antwort


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 17:28 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag