Page 1 of 1

Is DOM really PHP 5 core?

Posted: Sat Jan 20, 2007 8:50 am
by Ambush Commander
I always thought it was, and the manual seems to think so, but I got a bug report from a user who complained that DOMDocument was available. Here's their config:

Code: Select all

PHP Version: 5.0.4
PHP OS: Linux
Error Reporting: 2039 (E_USER_NOTICE | E_USER_WARNING | E_USER_ERROR | E_COMPILE_WARNING | E_COMPILE_ERROR | E_CORE_WARNING | E_CORE_ERROR | E_PARSE | E_WARNING | E_ERROR)
Register Globals: On
Short Tags: On
Display Errors: On
Loaded Extensions:

   standard         SPL              zlib             openssl       
   libxml           apache2handler   ctype            curl          
   ftp              gd               gettext          imap          
   ldap             fileinfo         mysql            pcre          
   posix            readline         session          sysvsem       
   sysvshm          tokenizer        xml              xmlrpc        
   yp               bcmath           eAccelerator     zip           
   imlib2
I am confuzzled. Is this a bug in PHP 5.0.4? Are the variants of PHP 5 that have dom forcefully taken out?

Posted: Sat Jan 20, 2007 9:01 am
by Kieran Huggins
do the functions work?

Maybe it was compiled --without DOM

Posted: Sat Jan 20, 2007 9:04 am
by Ambush Commander
Can it be taken out? (Well, I guess it can, because I've got this bug report)

Posted: Sat Jan 20, 2007 9:06 am
by Weirdan
ask him for his ./configure string (available via phpinfo()). Perhaps it was compiled --without-dom

Posted: Sat Jan 20, 2007 9:07 am
by Ambush Commander
This is irrelevant, look inside the /usr/share/doc/libphp5_common5-5.0.4/configure_command file. urpmi is your friend, use it to install extensions not shown below.

Posted: Sat Jan 20, 2007 9:32 am
by feyd
DOMDocument shows up in the class lists, not the loaded extension lists. ;)

get_declared_classes()

Posted: Sat Jan 20, 2007 10:54 am
by Ambush Commander
Well, I assume that if DOMDocument doesn't exist, then the 'dom' extension isn't loaded. True, DOMDocument doesn't show up in the extensions list, but dom should.

Anyway, I've fixed it. Surprising that you can't even count on dom being present on PHP5 installs.