PHP-Installation

Alles, was PHP betrifft, kann hier besprochen werden.

PHP-Installation

Postby Vössli » 26. July 2005 15:21

Hallo

meine PHP5.0-Installation läuft nicht. Ich habe Apache erfolgreich installiert (server=localhost) und PHP wird auch erkannt.
greife ich aber nun auf file://....index.php zu dann wird der code des PHP-Scripts angezeigt
bei http://localhost/index.php kommt die Meldung:
Programm kann nicht gestartet werden.

Möglicherweise wird das php-cgi.exe (also das PHP-Programm) nicht gefunden? Ich hab die php.ini, die apache-config-datei und Path-variablen nach Anleitung eingestellt

Ich bin Euch für jeden Hinweis dankbar

LG
Vössli
Vössli
 
Posts: 18
Joined: 26. July 2005 15:03

Postby Wiedmann » 26. July 2005 15:42

Ich habe Apache erfolgreich installiert (server=localhost) und PHP wird auch erkannt.

Was meinst du mit "wird auch erkannt"?

greife ich aber nun auf file://....index.php zu dann wird der code des PHP-Scripts angezeigt

Das ist normal. Man kann ein PHP-Script nciht über "file://" aufrufen.

bei http://localhost/index.php kommt die Meldung:
Programm kann nicht gestartet werden.

An die Anleitung im PHP-Manual hast du dich gehalten?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Vössli » 27. July 2005 13:39

Ich meine Apache erkennt das PHP-Modul und zeigt es im Startfenster an.
Für das Setup hab ich mich ans Manual gehalten (und an ein Buch)
Ach ja, ich hab vergessen zu erwähnen daß ich PHP noch nie benutzt habe
Vössli
 
Posts: 18
Joined: 26. July 2005 15:03

Postby Wiedmann » 27. July 2005 13:47

Ich meine Apache erkennt das PHP-Modul und zeigt es im Startfenster an.

Was zeigt der Apache da (genau) an und in welchem Startfenster?

Möglicherweise wird das php-cgi.exe (also das PHP-Programm) nicht gefunden?

Da du PHP ja wohl als Modul installiert hast, ist das CGI uninteressant.

bei http://localhost/index.php kommt die Meldung:
Programm kann nicht gestartet werden.

Die Meldung lautet wirklich genau so? Das muss aber IMHO am Script liegen.

Erzeug doch mal die folgende Datei (eine Zeile):
Code: Select all
<?php phpinfo(); ?>

Speicher sie in htdocs ab als "test.php" und rufe sie dann auf mit http://localhost/test.php.

Was passiert?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Vössli » 28. July 2005 10:00

Im "Apache Service Monitor" unten in der Statuszeile steht "Apache 2.0 /PHP 5.0.4" bzw. beim Start des Servers im Comandline-fenster: "PHP Modul ist geladen"
Es liegt aber nicht am Script )-: da die selbe Fehlermeldung
In der PHP.ini und der Apache.conf hab ich die notwendigen Pfade eingestellt, allerdings sind noch eine Menge Optionen unbesetzt - muß man hier eigentlich alle Optionen konfigurieren ?(zB.: On oder Off)
Vössli
 
Posts: 18
Joined: 26. July 2005 15:03

Postby Wiedmann » 28. July 2005 10:10

und der Apache.conf hab ich die notwendigen Pfade eingestellt

Was hast du in der "httpd.conf" konfiguriert für PHP?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Vössli » 29. July 2005 13:09

Meine Installation:

php5ts.dll , pfp5ts.lib , php5apache2.dll, php5isapi.dll und php5nsapi.dll
in [Windows/System]

php5apach2.dll in [apache/modules] und [Windows/system]
php5ts.dll zur Sicherheit nochmal in [apache/bin] kopiert

-------------------------------------------------------
php.ini-recommended in php.ini umbenannt, und in [C:\] sowie in den [PHP-Ordner] kopiert, und die Path-Variable auf [PHP-Ordner] gesetzt]

- extension_dir = "c:\php\php-5.0.4-Win32" (ich habe die Ext-Dateien alle im PHP-Hauptordner)
- extension=php_gd2.dll (im php-ordner)
- register_globals = On
- doc_root = "c:\programme\apache group\apache2\htdocs"
-------------------------------------------------------
Apache.conf:

(- AddModule mod_php5.c führt zur Fehlermeldung: "Requestet
operation has failed" - also laß ich das weg)
- AddType application/x-httpd-php .php
- LoadModule php5_module modules/php5apache2.dll
- DocumentRoot "C:/Programme/Apache Group/Apache2/htdocs"
- <Directory "C:/Programme/Apache Group/Apache2/htdocs">
- DirectoryIndex index.php index.html index.html.var
- LoadModule php5_module "C:/php/php-5.0.4-Win32/php5apache2.dll"
- PHPIniDir "C:/"


Möglicherweise sind aber auch Dienste inaktiv;
bei der Installation mußte ich feststellen daß es nur klappt wenn der DNS-Client-Dienst gestartet ist
Vössli
 
Posts: 18
Joined: 26. July 2005 15:03

Postby Mars_DS » 29. July 2005 14:39

php5ts.dll , pfp5ts.lib , php5apache2.dll, php5isapi.dll und php5nsapi.dll
in [Windows/System]


speicher die mal in [windows/System32]

php.ini-recommended in php.ini umbenannt, und in [C:\] sowie in den [PHP-Ordner] kopiert, und die Path-Variable auf [PHP-Ordner] gesetzt]

- extension_dir = "c:\php\php-5.0.4-Win32" (ich habe die Ext-Dateien alle im PHP-Hauptordner)
- extension=php_gd2.dll (im php-ordner)
- register_globals = On
- doc_root = "c:\programme\apache group\apache2\htdocs"


php.ini mal ins c:/windows kopieren.
extension_dir ok, aber register_globals ist bei mir noch off und doc_root ist ebenfalls ohne eintrag, also stells mal versuchsweise um.
was die einzelne extension betrifft, da ist bei mir auch noch ; davor.

- LoadModule php5_module modules/php5apache2.dll
- LoadModule php5_module "C:/php/php-5.0.4-Win32/php5apache2.dll"


da stellt sich die frage, warum 2mal von 2 verschiedenen orten laden?? wenn die datei noch im ursprungspfad vorhanden ist, dann stell vor den anderen pfad erstmal # davor.

oder versuchs direkt damit (nur pfade anpassen!!!!!!):
Code: Select all
# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php .phtml .php3 .php4
AddType application/x-httpd-php-source .phps
# configure the path to php.ini
PHPIniDir "c:/Windows"
Mars_DS
 
Posts: 2
Joined: 29. July 2005 14:15

Postby jakimo72 » 29. July 2005 21:13

Kleiner Vorschlag:
Wenn Du PHP als Entwicklungssystem verwenden möchstest,
warum lädst Du Dir nich einfach XAMPP für Windows herunter
und installierst es?
Danach ist alles eingetragen und installiert.

Wenn Du PHP als Rootserver einsetzen möchtest, dann würde ich
auf Windows verzichten...
User avatar
jakimo72
 
Posts: 151
Joined: 07. February 2005 13:25
Location: Hamburg-Barmbek


Return to PHP

Who is online

Users browsing this forum: No registered users and 16 guests