"Christmas - the time to fix the computers of your loved ones" « Lord Wyrm

Konfiguration PHP auf IIS 6 Fehler ?

voyager 14.07.2004 - 18:04 2100 14
Posts

voyager

kühler versilberer :)
Avatar
Registered: Nov 2001
Location: Stmk/Austria
Posts: 3131
hoffe mal das ich hier richtig bin, habe folgendes Prob :

hab nen IIS 6 (W2k3 srv) laufen, und will darauf PHP zum laufen bekommen

hab das PHP windows packerl (installer) downgeloaded und installiert, nur kommt die fehlermeldun "Service Unavailable" wenn ich die Test - Startseite aufrufe :

Code: PHP
<?php phpinfo()?>

auf kommandozeile funktioniert der php aufruf


weis jemand rat bzw. hat das schon mal wer zum laufen gebracht ?

spunz

Super Moderator
Super Moderator
Avatar
Registered: Aug 2000
Location: achse des bösen
Posts: 11121
steht was im log?

voyager

kühler versilberer :)
Avatar
Registered: Nov 2001
Location: Stmk/Austria
Posts: 3131
2004-07-14 15:59:13 192.168.0.62 4099 192.168.0.20 80 HTTP/1.1 GET / 503 1 AppOffline
2004-07-14 15:59:19 192.168.0.62 4100 192.168.0.20 80 HTTP/1.1 GET /index2.php 503 1 AppOffline
2004-07-14 16:08:56 127.0.0.1 3340 127.0.0.1 80 HTTP/1.1 GET / 503 1 AppOffline

grassi3000

radeon gefrierer
Avatar
Registered: Apr 2003
Location: AT/NÖ/Traisen
Posts: 1161
im verwaltungsprogramm musst du bei der standardwebseite unter eigenschaften noch irgendwo einstellen, dass er .php mit der php.exe behandelt.

genaueres steht in ner install.txt im php ordner afair.

[quote]Windows NT/2000/XP and IIS 4 or newer and PWS 4 on NT Workstation or W2K non server editions

To install PHP on an NT/2000/XP Server running IIS 4 or newer,
follow these instructions. You have two options to set up
PHP, using the CGI binary (php.exe) or with the ISAPI module.

In either case, you need to start the Microsoft Management
Console (may appear as 'Internet Services Manager', either
in your Windows NT 4.0 Option Pack branch or the Control
Panel=>Administrative Tools under Windows 2000). Then
right click on your Web server node (this will most probably
appear as 'Default Web Server'), and select 'Properties'.

If you want to use the CGI binary, do the following:
Under 'Home Directory', 'Virtual Directory', or
'Directory', click on the 'Configuration' button,
and then enter the App Mappings tab.

Click Add, and in the Executable box, type:
c:\php\php.exe (assuming that you have unzipped PHP in c:\php\).

In the Extension box, type the file name extension you want
associated with PHP scripts.
Leave 'Method exclusions'
blank, and check the Script engine checkbox. You may also
like to check the 'check that file exists' box - for a small
performance penalty, IIS (or PWS) will check that the script
file exists and sort out authentication before firing up php.
This means that you will get sensible 404 style error messages
instead of cgi errors complaing that php did not output any data.

You must repeat from 'Click Add...' for each extension you
want associated with PHP scripts.
(.php is recommended. although .phtml and .php3 may be
required for legacy applications.)

Set up the appropriate security. (This is done in Internet
Service Manager), and if your NT Server uses NTFS file system,
add execute rights for I_USR_ to the directory that contains
php.exe

!NOTE!: Since 4.1.2, the php.ini setting cgi.force_redirect defaults to '1'
which effectively prevents the cgi from working within IIS. You need to set
up at least a minimal php.ini file with the following directive:

cgi.force_redirect = 0

If it doesn't work immidiately, make sure you have the php.ini file in the
right place (%SYSTEMROOT%\php.ini).


To use the ISAPI module, do the following:

If you don't want to perform HTTP Authentication using PHP,
you can (and should) skip this step. Under ISAPI Filters,
add a new ISAPI filter. Use PHP as the filter name, and
supply a path to the php4isapi.dll.

Under 'Home Directory', click on the 'Configuration' button.
Add a new entry to the Application Mappings. Use the path
to the php4isapi.dll as the Executable, supply .php as the
extension, leave Method exclusions blank, and check the
Script engine checkbox.

Stop IIS completely (net stop iisadmin)
Start IIS again (net start w3svc)[/quote]
Ohne einer dieser zusätzlichen Konfigurationen ging es bei mir unter XP nie. (das Fettgedruckte müsste für dich reichen.
Bearbeitet von grassi3000 am 14.07.2004, 18:37

voyager

kühler versilberer :)
Avatar
Registered: Nov 2001
Location: Stmk/Austria
Posts: 3131
das war scho vorher drin
:150

nur gehts leider trotzdem net

Philipp

Here to stay
Registered: Jul 2001
Location: Wien
Posts: 1764
PHP nicht mit den automatischen Installer installieren, da PHP dann im langsamen CGI Modus installiert wird. Stattdessen sollte man das ZIP Archiv nehmen.

1) Das ZIP Archiv muss nach c:\php\ entpackt werden
2) Alle Dateien von c:\php\dlls\ nach c:\windows\system32\ kopieren
3) Alle Dateien von c:\php\sapi\ nacho c:\windows\system32\ kopieren
4) c:\php\php.ini nach c:\windows\php.ini kopieren
5) IIS öffnen und "Neue Webdiensterweiterung" hinzufügen
6) Diese Erweiterung "PHP" nennen
7) Den Pfad c:\windows\system32\php4isapi.dll einstellen
8) Den Status auf "Zugelassen" stellen
9) Mit rechter Mausstaste auf den "Websites" Ordner klicken und "Eigenschaften" anwählen
10) Auf "Basisverzeichnis" klicken und "Konfiguration" auswählen
11) Auf "Hinzufügen" klicken und c:\windows\system32\php4isapi.dll einstellen und .php setzten
12) Auf "OK" klicken
13) Diese Einstellung bei allen Websites durchführen und IIS neustarten

Jetzt sollte PHP4 im ISAPI Modus (als IIS Modul) laufen :)

Philipp

Here to stay
Registered: Jul 2001
Location: Wien
Posts: 1764
So sieht es z.B. auf meinen Testserver mit PHP5 aus:
click to enlarge click to enlarge

voyager

kühler versilberer :)
Avatar
Registered: Nov 2001
Location: Stmk/Austria
Posts: 3131
funzt leider net, hast vielleicht ne php.ini die geht ?

Philipp

Here to stay
Registered: Jul 2001
Location: Wien
Posts: 1764
Im zip solltest es eine php.ini-dist Datei geben. Diese musst du in php.ini umbenennen und nach c:\windows kopieren.

Kommt noch immer der gleiche Fehler? Hast du PHP auch als Webdiensterweiterung hinzugefügt?

Also so:
click to enlarge

voyager

kühler versilberer :)
Avatar
Registered: Nov 2001
Location: Stmk/Austria
Posts: 3131
webdiensterweiterung is drin

hab die dist genommen jetzt, geht trotzdem net (is unbenannt)

muss i bei der php.ini nix konfigurieren ?

Philipp

Here to stay
Registered: Jul 2001
Location: Wien
Posts: 1764
Nein, sollte ohne Änderung laufen.

voyager

kühler versilberer :)
Avatar
Registered: Nov 2001
Location: Stmk/Austria
Posts: 3131
achso :( dann is leider no irgendwo der wurm drin :(


EDIT : is vielleicht wer auf der downunder , der mir dabei helfen kann ;) hab den server eh mit draussen
Bearbeitet von voyager am 14.07.2004, 19:42

watchout

Legend
undead
Avatar
Registered: Nov 2000
Location: Off the grid.
Posts: 6845
Zitat von voyager
EDIT : is vielleicht wer auf der downunder , der mir dabei helfen kann ;) hab den server eh mit draussen
meld' dich dann bei mir ;) hab zwar kein' iis (wozu eigentlich brauchst das krüpplwerk?), aber da lässt sich sicher was machen...

Philipp

Here to stay
Registered: Jul 2001
Location: Wien
Posts: 1764
Zitat von watchout
wozu eigentlich brauchst das krüpplwerk?
Vielleicht weil es der schnellste Webserver unter Windows ist ;). Die Windows Fassung von Apache kommt nicht einmal annähernd an IIS 6.0 bzw. Apache/Unix heran.

voyager

kühler versilberer :)
Avatar
Registered: Nov 2001
Location: Stmk/Austria
Posts: 3131
habs deswegen, weil ich auf dem server auch den IIS FTP laufen hab, der unter w2k3 einer der schnellsten ftp server atm ist, will damit nur logs auswerten , schau das log (MS SQL SERVER) derzeit über access berichte an
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz