LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-12-2004, 01:24 PM   #1
phamtranquocvie
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Rep: Reputation: 0
how to recompile php to activate --with-dom


Hello there,

I just installed Linux 9. Now I want to write a page that uses this class: xslt_class which takes a xml file and a xslt file and transform to a html file. This class requires that my php be recompiled using this option: --with-dom. An online instruction says I need to go to
/usr/local/src and type the following command:
./configure --with-dom --with-apache=../apache_1.3.12
to recompile. However, configure is no where to be found. could you please help me activate --with-dom. Thank you very much.
 
Old 03-12-2004, 03:41 PM   #2
pingswept
Member
 
Registered: May 2003
Location: Cambridge, MA
Distribution: SuSE, RedHat, and OpenBSD
Posts: 116

Rep: Reputation: 15
You need to download and unpack the PHP source first.

You can get the source here:
www.php.net/downloads.php

Unpacking the source is covered (though not in much detail) in the PHP installation instructions:
www.php.net/manual/en/installation.php
 
Old 03-15-2004, 11:27 PM   #3
phamtranquocvie
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Hello,
My system already has php installed by default. You suggested to download and install it again. I wonder that will cause any problem. If I want to remove it before installing the new one, where would I find it to delete. Thanks.
 
Old 03-15-2004, 11:29 PM   #4
phamtranquocvie
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
By the way, is there any way I can recompile the existing php instead of intalling the new php? Thanks

Last edited by phamtranquocvie; 03-15-2004 at 11:33 PM.
 
Old 03-15-2004, 11:34 PM   #5
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
by Linux 9 do you mean Redhat 9?
 
Old 03-15-2004, 11:41 PM   #6
phamtranquocvie
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Yes, it is Redhat 9. Thanks
 
Old 03-15-2004, 11:55 PM   #7
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Grab the source RPM
http://ftp.redhat.com/pub/redhat/lin...2-17.2.src.rpm
Install it, you should see a php4.spec file in /usr/src/redhat/SPEC
open it up, under the build() section you should see a list of configure options, add your option there.
to build it, type "rpmbuild -bb php4.spec", install dependencies if required.
After its done you'll see a bunch of php-* packages in /usr/src/redhat/RPMS/i386, reinstall them over your current ones.
 
Old 03-16-2004, 01:01 PM   #8
phamtranquocvie
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Hello,
thank you for the instructions. I did exactly what you said and added --with-dom-xslt=DIRECTORY_OF_XSLT and --with-dom-exslt=DIRECTORY_OF_EXSLT to php.spec. However, I still cannot use class_xslt.php. It complains the following error message:
Fatal error: Call to undefined function: xslt_create() in /home/phamtranquocviet/web/196/hw4/class_xslt.php on line 85.

In windows, I got the same error, and it worked when I turned on the xslt feature by adding the following lines to php.ini:
extension=php_domxml.dll
extension=php_xslt.dll
extension=php_sockets.dll

Now, I checked and made sure similar options were in php.spec. Could you please tell me why it does not work in Redhat? Thank you very much.
 
Old 03-16-2004, 01:17 PM   #9
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
ok I dunno much about PHP, check out the documentation
http://au.php.net/manual/en/ref.xslt.php
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install/activate PHP Ook Slackware - Installation 1 10-16-2004 01:22 PM
php with DOM suport bm1 Linux - Software 0 05-17-2004 08:32 AM
How to install/activate PHP Pug405 Linux - Software 2 05-01-2004 05:02 PM
Anyone know how to activate Netatalk equivalent ?Recompile kernel? alphasure Linux - Networking 2 01-09-2004 03:18 PM
XML php dom amirspl Programming 2 09-20-2003 07:04 AM


All times are GMT -5. The time now is 10:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration