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

Notices

Tags used in this thread
Popular LQ Tags , , , ,

Reply
 
Thread Tools
Old 08-30-2007, 02:19 PM   #1
mcupples
Member
 
Registered: Jun 2006
Location: Orlando
Distribution: FC3, FC5, CentOS4, Ubuntu 6.06
Posts: 57
Thanked: 0
php 5 - centos 4 - enabling dom


[Log in to get rid of this advertisement]
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?
mcupples is offline  
Tag This Post , , , ,
Reply With Quote
Old 08-31-2007, 06:21 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 5,040
Thanked: 222
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
bathory is online now     Reply With Quote
Old 09-04-2007, 10:00 AM   #3
mcupples
Member
 
Registered: Jun 2006
Location: Orlando
Distribution: FC3, FC5, CentOS4, Ubuntu 6.06
Posts: 57
Thanked: 0

Original Poster
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?
mcupples is offline     Reply With Quote
Old 09-04-2007, 10:17 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 5,040
Thanked: 222
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.
bathory is online now     Reply With Quote
Old 09-04-2007, 11:04 AM   #5
mcupples
Member
 
Registered: Jun 2006
Location: Orlando
Distribution: FC3, FC5, CentOS4, Ubuntu 6.06
Posts: 57
Thanked: 0

Original Poster
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.
mcupples is offline     Reply With Quote
Old 09-04-2007, 05:31 PM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 5,040
Thanked: 222
You didn't answer how you installed php-5.2.3. Also did you restart after apache after php installation?
bathory is online now     Reply With Quote
Old 09-05-2007, 11:07 AM   #7
mcupples
Member
 
Registered: Jun 2006
Location: Orlando
Distribution: FC3, FC5, CentOS4, Ubuntu 6.06
Posts: 57
Thanked: 0

Original Poster
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?
mcupples is offline     Reply With Quote
Old 09-06-2007, 03:07 AM   #8
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 5,040
Thanked: 222
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.
bathory is online now     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 12:23 PM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration