AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Tutorials Delphi Apache und PHP installieren [English]
Tutorial durchsuchen
Ansicht
Themen-Optionen

Apache und PHP installieren [English]

Ein Tutorial von Meflin · begonnen am 25. Okt 2004 · letzter Beitrag vom 25. Okt 2004
Antwort Antwort
Benutzerbild von Meflin
Meflin
Registriert seit: 21. Aug 2003
Hi,
hab jetzt für einen freund in malaysia eine anleitung (auf englisch) geschrieben, wie man das macht. uhnd da dachte ich mir, kann ichs auch gleich ganz veröffentlichen:
Code:
Installing Apache & PHP
-----------------------

First of all, download the PHP Windows Installer and the Apache Webserver from this
locations:
PHP 4.3.8: [url]http://www.php.net/get/php-4.3.8-installer.exe/from/a/mirror[/url]
Apache  : [url]http://mirrorspace.org/apache/httpd/binaries/win32/apache_2.0.51-win32-x86-no_ssl.msi[/url]

Then install the Apache Webserver by following the setup instructions (use "localhost"
as servername). In conclusion you must install PHP. Therefor follow the setup instructions
again (it will show a message that it was unable to configure Apache, but it's ok
because this feature isn't inmplementet jet in the installer).

Now you have to configure the webserver to get it working properly (first you may check
whether it's installed corectly or not. To do so, open your browser and navigate to
[url]http://localhost/[/url] or [url]http://127.0.0.1/[/url] A "Apache is running" screen should appear!):
Open the apache httpd.conf file. You find it in the Apache startmenu entry > Configure
Apache Server > Edit the Apache http.conf configuration file! Use the search function of
your editor to find "DocumentRoot". You'll find this:

   # DocumentRoot: The directory out of which you will serve your
   # documents. By default, all requests are taken from this directory, but
   # symbolic links and aliases may be used to point to other locations.
   #
   DocumentRoot "C:/"

Set this variable's value to the directory path you want to use as a server, e.g. like this:

   DocumentRoot "C:/MyServer"

Attention: slashes have to be / and NOT \ like usual in windows!
You have to create this directory manually! Repeat the search and you'll find this:

   # This should be changed to whatever you set DocumentRoot to.
   #
   <Directory "C:/">

Like explained in the comment, type the same directory as before here again!
Finally add this code to the end of the configuration file:

   ScriptAlias /php/ "c:/php/"
   AddType application/x-httpd-php .php
   AddType application/x-httpd-php .php3 
   AddType application/x-httpd-php .php4
   AddType application/x-httpd-php .phtml
   Action application/x-httpd-php "/php/php.exe"

You only have to customize the folder in the first line to where you have installed PHP!
Now files called .php, .php3, .php4 and .phtml are parsed through the PHP interpreter.
For further information on configurating Apache read the fine comments inside the
configuration file!

For testing your PHP scripts you have to put them into your DocumentRoot directory and
open them in your browser with [url]http://localhost/file.php[/url] , where localhost substitudes
the same as your DocumentRoot directory but only with this method the scripts get executed!

Simply ask me if you have problems! Have Fun,

Meflin
edit: ohne [code] funktioniert das preformat nicht richtig...
 
Benutzerbild von nailor
nailor
 
#2
  Alt 25. Okt 2004, 21:50
als alternative Möglichkeit möchte ich hier Bei Google suchenXAMPP empfehlen.
Michael N.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:19 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz