LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-30-2007, 01:19 PM   #1
mcupples
Member
 
Registered: Jun 2006
Location: Orlando
Distribution: FC3, FC5, CentOS4, Ubuntu 6.06
Posts: 57

Rep: Reputation: 15
php 5 - centos 4 - enabling dom


i have a base install of centos 4 on my server and one of the developers needs php to be compiled with --enable-dom.

how do i go about doing this since i didn't compile it myself? is it possible for me to install two versions of php simply?

what's the quickest way to get this done?
 
Old 08-31-2007, 05:21 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,938

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
DOM support is included by default in php5 unless it's compiled with the "--disable-dom" option. You can run:
Code:
 php -i|grep DOM
to see if it's enabled.
You can also run:
Code:
php -i|grep configure
to find out the configure options in case you need to re-compile it.

Regards
 
Old 09-04-2007, 09:00 AM   #3
mcupples
Member
 
Registered: Jun 2006
Location: Orlando
Distribution: FC3, FC5, CentOS4, Ubuntu 6.06
Posts: 57

Original Poster
Rep: Reputation: 15
ok craziness. i installed a fresh copy of php 5.2.3 and it runs fine from the command line. apache sees a different version, though. it's running 5.1.6.

how do i make apache use the newer one?
 
Old 09-04-2007, 09:17 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,938

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
How did you installed the newer php? From source, or using your package manager?
Anyway look for the line "LoadModule php5_module ..." inside httpd.conf of whatever it's called in centos and change it to point to the new libphp5.so installed by php 5.2.3.
 
Old 09-04-2007, 10:04 AM   #5
mcupples
Member
 
Registered: Jun 2006
Location: Orlando
Distribution: FC3, FC5, CentOS4, Ubuntu 6.06
Posts: 57

Original Poster
Rep: Reputation: 15
Question

that's an excellent idea - however it doesn't appear to work. here's what i did:

Code:
[root@w5 home]# updatedb
[root@w5 home]# locate libphp5.so
/usr/lib/httpd/modules/libphp5.so
[root@w5 home]# locate libphp5
/home/wemuhtat/php-5.2.3/sapi/apache/libphp5.module.in
/home/wemuhtat/php-5.2.3/sapi/apache_hooks/libphp5.module.in
/usr/lib/httpd/modules/libphp5.so
is there something special i'm supposed to do to libphp5.module.in to make it into a .so file? as of now there is only one lbphp5.so which is confusing.
 
Old 09-04-2007, 04:31 PM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,938

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
You didn't answer how you installed php-5.2.3. Also did you restart after apache after php installation?
 
Old 09-05-2007, 10:07 AM   #7
mcupples
Member
 
Registered: Jun 2006
Location: Orlando
Distribution: FC3, FC5, CentOS4, Ubuntu 6.06
Posts: 57

Original Poster
Rep: Reputation: 15
yeah i just noticed that. i'm now a supreme moron for not answering your question - apologies, no idea why i didn't. before i start over with this - since i did the whole ./configure, make, make install route on both apache and php, do i need to uninstall it before i can install it again or can i just do it over without deleting anything?
 
Old 09-06-2007, 02:07 AM   #8
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,938

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
I guess you compiled php running ./configure with the "--with-apxs2=...". If that's the case, then it's strange that "locate libphp5.so" didn't find it. It should exist under both libs/ and .libs/ subdirectories in the place you extracted php sources (I presume from your post that it's /home/wemuhtat/php-5.2.3).
You can do the whole ./confgure, make, make install from the beginning overwriting your previous attempt (running make clean before anything else).
I suggest you if you're going to start from the beginning, to install php-5.2.4 that fixes some bugs and security issues of the previous release.
 
  


Reply

Tags
centos, disable, dom, enable, php


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
Enable DOM with PHP janhouse00 Linux - Server 1 04-23-2007 03:09 AM
PHP Form Arrays and Javascript DOM firemankurt Programming 2 01-07-2007 11:58 AM
php with DOM suport bm1 Linux - Software 0 05-17-2004 07:32 AM
how to recompile php to activate --with-dom phamtranquocvie Linux - Newbie 8 03-16-2004 12:17 PM
XML php dom amirspl Programming 2 09-20-2003 06:04 AM


All times are GMT -5. The time now is 08:38 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration