Thema: Delphi [PHP/Firebird] Zugriff

Einzelnen Beitrag anzeigen

Benutzerbild von Marcel Gascoyne
Marcel Gascoyne

Registriert seit: 18. Nov 2003
Ort: Uetersen
271 Beiträge
 
Delphi 2005 Architect
 
#6

Re: [PHP/Firebird] Zugriff

  Alt 28. Dez 2004, 13:43
In den meisten Linux-Distributionen, wie z.b. SuSE ist PHP ohne Firebird Support dabei. Um nun PHP mit Firebird zum Laufen zu bekommen mache ich es bisher immer so das ich weder Apache noch PHP mitinstalliere.

Wir brauchen nun folgende Zustaten für unsere Installation:

1.) Apache Quellcode (http://httpd.apache.org)
2.) PHP Quellcode (http://de.php.net)

Als erstes entpacken wir den Apache Quellcode und compilieren uns den Webserver:

Zitat:
root@linux-entw:/usr/src> tar xvfz apache_1.3.33.tar.gz
root@linux-entw:/usr/src> cd apache_1.3.33
root@linux-entw:/usr/src/apache_1.3.33> ./configure --prefix=/usr/local/httpd --enable-rule=SHARED_CORE --enable-module=so --enable-module=rewrite
root@linux-entw:/usr/src/apache_1.3.33> make
root@linux-entw:/usr/src/apache_1.3.33> make install
Nun wird PHP entpackt und entsprechend konfiguriert, compiliert und installiert:

Zitat:
root@linux-entw:/usr/src> tar xvfz php-4.3.10.tar.gz
root@linux-entw:/usr/src> cd php-4.3.10
root@linux-entw:/usr/src/php-4.3.10> ./configure --prefix=/usr/local/php --with-apxs=/usr/local/httpd/bin/apxs --with-zlib --with-bz2 --with-gd --with-jpeg-dir --with-png-dir --with-gettext --with-interbase=/opt/firebird --with-mysql --with-pear --enable-experimental-zts --with-config-file-path=/etc
root@linux-entw:/usr/src/php-4.3.10> make
root@linux-entw:/usr/src/php-4.3.10> make install
root@linux-entw:/usr/src/php-4.3.10> cp php.ini-recommended /etc/php.ini
Nun ist in der Datei /usr/local/httpd/conf/httpd.conf das PHP Modul einzutragen und der
Handler zu registrieren:

Zitat:
...
#
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
...
# Example:
# LoadModule foo_module libexec/mod_foo.so
LoadModule php4_module libexec/libphp4.so
...
#
# To enable type maps, you might want to use
#
#AddHandler type-map var

# PHP
AddType application/x-httpd-php php

...
Ggf. können noch anpassungen in der PHP Konfigurationsdatei /etc/php.ini vorgenommen werden.
Der Apache mit PHP- und Firebird Support kann nun gestartet werden: /usr/local/httpd/bin/apachectl start

Gruß,
Marcel
Marcel Gascoyne
Der Fehler sitzt immer vor der Tastatur
  Mit Zitat antworten Zitat