Page 1 of 1

PHP 4.2.3 unter Debian kompilieren

Posted: 2003-06-26 15:45
by purado
Hallo,
ich muss für ein Uni-Projekt ein phpBB2 so anpassen, dass Formeln in der natürlichen Schreibweise dargestellt werden können.
Dazu muss ich mathmlrender verwenden.
http://www.math.mcgill.ca/~drew/mathmlrender/
Das nur als kleine Einleitung in meine Problematik, bevor Antworten wie "Wieso willst Du PHP upaten?" kommen.
Nachdem ich es nun endlich geschafft habe, die Voraussetzungen für mathmlrender unter Debian zu installieren, will ich nun PHP 4.2.3 neu kompilieren. Diese Version brauche ich, damit mathmlrender funktioniert.
Ich habe nun zunächst folgendes testweise versucht:

Code: Select all

./configure --with-mathmlrender=shared
make
make install
Das funktioniert soweit auch prima, keine Fehlermeldungen.
Leider sagt mir phpinfo(), dass immer noch PHP 4.1.2 installiert ist.
Was mache ich falsch, bzw. was muss ich machen damit das PHP 4.2.3 auch wirklich im System installiert und verwendet wird?
--> Muss ich bei einer Neukompilation (oder Neukompilierung?) alle Optionen beim configure anhängen? Das habe ich versucht, habe mir aus phpinfo() alle Optionen, mit denen PHP 4.1.2 unter Debian kompiliert ist kopiert und es mit diesen und --with-mathmlrender=shared versucht. Da kommt leider eine Fehlermeldung...

Wäre sehr froh über Antworten :-)

Danke und viele Grüße,
Henning

Re: PHP 4.2.3 unter Debian kompilieren

Posted: 2003-06-26 15:51
by sternenjaeger
Hi,

hast du es schon einmal mit den "inoffiziellen" PHP 4.2.3 deb Dateien versucht zu installieren? Einfach mal in diese /etc/apt/sources.list Datei eintragen:

deb http://debian.moolfreet.com ./

danach ein apt-get update und dann über apt-get updaten/installieren.

Re: PHP 4.2.3 unter Debian kompilieren

Posted: 2003-06-26 15:54
by gamecrash
Da brauchste gar keine inoffiziellen DEBs (denen ich grundsätzlich nicht immer trauen würde), kannst einfach das php4 aus unstable nehmen, das is auch 4.2.3...

Re: PHP 4.2.3 unter Debian kompilieren

Posted: 2003-06-26 15:58
by purado
Okay, danke...
Ist es mit dieser Methode auch möglich weitere Optionen beim configure (--with-mathmlrender=shared) einfügen?
Und wenn ja, wie?

Sorry, benutze zum ersten Mal Debian... :roll:

Henning

Re: PHP 4.2.3 unter Debian kompilieren

Posted: 2003-06-26 16:03
by captaincrunch
Dazu brauchst du dir Source-Debs. Sofern du die hast kannst du im Unterverzeichnis "debian" die Datei "rules" mit den zusätzlichen Optionen versehen, und dann das Paket per dpkg-buildpackage bauen lassen.

Re: PHP 4.2.3 unter Debian kompilieren

Posted: 2003-06-26 16:29
by purado
CaptainCrunch wrote:Dazu brauchst du dir Source-Debs. Sofern du die hast kannst du im Unterverzeichnis "debian" die Datei "rules" mit den zusätzlichen Optionen versehen, und dann das Paket per dpkg-buildpackage bauen lassen.
Ich muss aber laut mathmlrender-Anleitung noch die PHP-Sourcen patchen... Ich glaube nicht, dass das mit den Source-Debs gehts?
Die ganz unten beschriebene Möglichkeit ("If you have a pre-packaged PHP that you don't want to disturb") wollte ich eigentlich verwenden, aber leider werden beim kompilieren mit make keine so-Dateien erzeugt, sondern nur mathmlrender.sa und .a. Und das sind doch statische Dateien? Vielleicht kann mir jemand in der Richtung helfen, das wäre nämlich die eleganteste Variante...

Henning


Code: Select all

4. Building mathmlrender with PHP

Follow these steps to build a PHP with mathmlrender

1. Obtain the PHP sources from http://www.php.net/.  I've tested with version
   4.2.1, slightly older and newer ones should also work.  Uncompress it
   somewhere so you can build it.

2. Copy/move the entire mathmlrender tree into the ext/ subdirectory of the
   PHP source tree.

3. Patch the PHP source with the included patch phpcpp.patch.  This makes one
   change to PHP's dynlib.m4 file, which makes it search for files to compile
   ending with '.cpp' in addition to '.c'.  This is necessary as much of
   mathmlrender is implemented in C++ to use GtkMathView.  Follow these steps
   to apply the patch:
       cd php-4.2.1
       patch -p1 <ext/mathmlrender/phpcpp.patch

4. Run the 'buildconf' script in the PHP source root to make it find
   mathmlrender and include it in PHP's build process.

5. Configure and build PHP as per the directions included with PHP.  You will
   need to supply either --with-mathmlrender or --with-mathmlrender=shared to
   configure in order to enable mathmlrender.

   If you have a pre-packaged PHP that you don't want to disturb and only want
   to add mathmlrender as a shared object, then make sure you compile using
   the same version of PHP that you already have, and use
   --with-mathmlrender=shared.  Then, copy the resulting shared object to
   wherever it needs to go, and enable it in your php.ini file.  Check your
   distribution's documentation.