LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   php 5 - centos 4 - enabling dom (https://www.linuxquestions.org/questions/linux-server-73/php-5-centos-4-enabling-dom-581027/)

mcupples 08-30-2007 01:19 PM

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?

bathory 08-31-2007 05:21 AM

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

mcupples 09-04-2007 09:00 AM

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?

bathory 09-04-2007 09:17 AM

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.

mcupples 09-04-2007 10:04 AM

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.

bathory 09-04-2007 04:31 PM

You didn't answer how you installed php-5.2.3. Also did you restart after apache after php installation?

mcupples 09-05-2007 10:07 AM

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?

bathory 09-06-2007 02:07 AM

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.


All times are GMT -5. The time now is 09:58 AM.