Is DOM really PHP 5 core?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Is DOM really PHP 5 core?

Post 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?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

do the functions work?

Maybe it was compiled --without DOM
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Can it be taken out? (Well, I guess it can, because I've got this bug report)
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

ask him for his ./configure string (available via phpinfo()). Perhaps it was compiled --without-dom
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

DOMDocument shows up in the class lists, not the loaded extension lists. ;)

get_declared_classes()
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post 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.
Post Reply