PHP 4.2.3 unter Debian kompilieren

FreeBSD, Gentoo, openSUSE, CentOS, Ubuntu, Debian
Post Reply
purado
Posts: 25
Joined: 2002-08-28 12:42
 

PHP 4.2.3 unter Debian kompilieren

Post 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
sternenjaeger
Posts: 40
Joined: 2003-06-13 19:03
 

Re: PHP 4.2.3 unter Debian kompilieren

Post 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.
Last edited by sternenjaeger on 2003-06-26 15:55, edited 1 time in total.
gamecrash
Posts: 339
Joined: 2002-05-27 10:52
 

Re: PHP 4.2.3 unter Debian kompilieren

Post 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...
purado
Posts: 25
Joined: 2002-08-28 12:42
 

Re: PHP 4.2.3 unter Debian kompilieren

Post 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
captaincrunch
Userprojekt
Userprojekt
Posts: 7066
Joined: 2002-10-09 14:30
Location: Dorsten
Contact:
 

Re: PHP 4.2.3 unter Debian kompilieren

Post 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.
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
purado
Posts: 25
Joined: 2002-08-28 12:42
 

Re: PHP 4.2.3 unter Debian kompilieren

Post 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.
Post Reply