Author Topic: Dom Xml ????  (Read 8885 times)

Offline lox

  • Newbie
  • *
  • Posts: 5
Dom Xml ????
« on: June 13, 2008, 08:48:04 PM »
Hello,

What is that DOM XML requirement??

"This extension has been moved to the ยป PECL repository and is no longer bundled with PHP as of PHP 5.0.0. " PHP manuel

Any work around? My ISP don't provide that "extra" extension...
Lox

Offline lox

  • Newbie
  • *
  • Posts: 5
Dom Xml ????
« Reply #1 on: June 15, 2008, 06:33:47 PM »
Any plan to make it work with a standard PHP 5 install?
Lox

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Dom Xml ????
« Reply #2 on: June 17, 2008, 11:52:17 AM »
Anything that can be done in DOM can be done in Simplexml, it's just a few function changes.  And RC 0.2 should be all php 5.  Just because it's in the PECL repo doesn't mean it's not supported.
 
  

Offline lox

  • Newbie
  • *
  • Posts: 5
Dom Xml ????
« Reply #3 on: June 22, 2008, 10:28:23 PM »
Quote from: bpat1434;12618
Anything that can be done in DOM can be done in Simplexml, it's just a few function changes.


Sure it is.

Quote from: bpat1434;12618
And RC 0.2 should be all php 5.


Glad to read that

Quote from: bpat1434;12618
Just because it's in the PECL repo doesn't mean it's not supported.


To spread roundcube it is better to have it compatible with standard PHP5 install. Very few webhosting companies provide PECL, none to my knowledge.
Lox

Offline andrewpk

  • Newbie
  • *
  • Posts: 3
"DOM XML: NOT OK" Solution?
« Reply #4 on: July 15, 2008, 06:32:22 PM »
I have a fresh installation of Fedora Core 9 on a home server that I'm just playing around with. I'd love to get RoundCube up and running too but the "DOM XML:  NOT OK" message that appears on the "Check Environment" page is confounding me.

Could someone give me a step-by-step on how to fix this issue? I've poked around the PHP site to try and find a solution there but only ended up more confused.

Thanks in advance for help and advice.
« Last Edit: July 15, 2008, 06:49:01 PM by andrewpk »

Offline lox

  • Newbie
  • *
  • Posts: 5
Dom Xml ????
« Reply #5 on: July 15, 2008, 07:53:36 PM »
Quote from: andrewpk;12915
I have a fresh installation of Fedora Core 9 on a home server that I'm just playing around with. I'd love to get RoundCube up and running too but the "DOM XML:  NOT OK" message that appears on the "Check Environment" page is confounding me.

Could someone give me a step-by-step on how to fix this issue? I've poked around the PHP site to try and find a solution there but only ended up more confused.

Thanks in advance for help and advice.


Find a Dom XML package for your distro, recompile php with Dom XML support or wait next roundcube version that will not need that extension anymore as stated above in this thread.

Cheers
Lox

Offline andrewpk

  • Newbie
  • *
  • Posts: 3
Dom Xml ????
« Reply #6 on: July 15, 2008, 08:40:33 PM »
Thanks very much for your suggestion. I managed to get as far as downloading the domxml extension from cvs but now I run into the message "configure: error: Either use deprecated dom or new dom5 extension." A quick google search turned up the suggestion to reinstall libxml2, which didn't work for me.

Any other ideas are certainly welcome but I'm coming to terms with the fact that I may have to go without RoundCube until this is fixed. This PHP stuff is somewhat beyond my expertise.

Thanks again.

Offline lox

  • Newbie
  • *
  • Posts: 5
Dom Xml ????
« Reply #7 on: July 15, 2008, 08:54:48 PM »
Quote from: andrewpk;12919
Thanks very much for your suggestion. I managed to get as far as downloading the domxml extension from cvs but now I run into the message "configure: error: Either use deprecated dom or new dom5 extension." A quick google search turned up the suggestion to reinstall libxml2, which didn't work for me.

Any other ideas are certainly welcome but I'm coming to terms with the fact that I may have to go without RoundCube until this is fixed. This PHP stuff is somewhat beyond my expertise.

Thanks again.


Well it is not a Linux Help forum. so you should find one.

(What I can tell you is that when you compile a package and the compiler complains about a package dependencie, you should then install the package-dev package. (libxml2-dev) )
Lox

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Dom Xml ????
« Reply #8 on: July 15, 2008, 09:52:11 PM »
Well, DOM is included in the php 5 core, so if you're running php 5.x, you've got DOM.  If you're running php4, you need to get the PECL extension DOMXML.  If you didn't configure php with the "--with-dom[=DIR]" or "--with-dom-xslt[=DIR]" then you don't have it, and need to reconfigure php (should be easy).

Create a new php file called info.php with this as it's only content:
<?php

phpinfo
();


Now, save it, and upload it to your server.  THen from the command-line, go and get the php 4 source you're using (or better yet, get the php5 source ;) ). Extract it and enter the folder.  Then type:
Code: [Select]
./configure --helpThat will list every single command you can run.  Just scroll thorugh and make sure that what you see in the php info output in the browser is available in that version of PHP (I'm pretty-sure everything is).

So, once you've confirmed everythin in the phpinfo "configure line" is there, then you can just copy that entire blob of text, set it to the command line, add "--with-dom" and/or "--with-dom-xslt" (specifying the path to libxslt using "=/some/path" after the --with parameter if libxslt isn't in your path).  Then run it, then make, make test, make install and you're done!

Now, things to note:
1.) I'm not going to guarantee that will work 100%
2.) You need to back-up your php.ini
3.) You might want to let someone more technically saavy do this for you if you can (i.e. a hosting company)

So, if you're on shared hosting, you're SOL unless you can get them to enable DOM in php4 (otherwise, it's avaiable in PHP 5).  If you're on a VPS or dedicated and you have shell access, you should be able to do this.
 
  

Offline andrewpk

  • Newbie
  • *
  • Posts: 3
Dom Xml ????
« Reply #9 on: July 15, 2008, 11:16:41 PM »
Thank you so much for such a thorough reply, it explained a lot for me!

Based on all your explanation I finally got everything working. I did get PHP5 running, it's my own server physically located in my apartment, which is good in that I can tinker with things, bad in that I don't have anyone more technically savvy (or in my case competent) to call.

Basically PHP5 installation worked, but I had to install some modules individually.

I'm very excited to have RoundCube up and running and I thank you as well as everyone else who offered suggestions. I appreciate your tolerance of my PHP ignorance.

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Dom Xml ????
« Reply #10 on: July 16, 2008, 07:50:59 AM »
Yes, some extensions (Apache has modules, php has extensions) do require that you enable them manually.  Personally, I don't spend time compiling php to my system.  On both my dedicated server and my home-based dev server I use the Atomic Rocket Turtle's repo for CentOS.  I can then just do:
Code: [Select]
yum install php php-gd php-imap php-imagick php-mysql php-pgsql php-pdoto install php and all those extensions.  And later if I need to add another one (like php-pdo-pgsql) I can just do:
Code: [Select]
yum install php-pdo-pgsqlSo it makes things much much easier to maintain.