Page 1 of 1
PHP DOM XML Functions
Posted: Fri Jul 30, 2004 10:56 pm
by Smartweb
When I put any of the DOM XML functions that are described in the PHP documentation, I get errors saying that the function is undefined or something like that. Is there an extension that I need to install? I'm running PHP 5 on Apache 1.3 on Windows XP Professional with SP2 RC2.
Posted: Fri Jul 30, 2004 11:57 pm
by feyd
you probably need to tell the extension to run.. look through your php.ini file..
Posted: Sat Jul 31, 2004 12:58 pm
by Smartweb
These are the extensions listed in the php.ini file.
Code: Select all
;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_w32api.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_yaz.dll
;extension=php_zip.dll
The PHP documentation says this:
Note to Win32 Users: In order to enable this module on a Windows environment, you must copy one additional file from the DLL folder of the PHP/Win32 binary package to the SYSTEM32 folder of your Windows machine (Ex: C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM32). For PHP <= 4.2.0 copy libxml2.dll, for PHP >= 4.3.0 copy iconv.dll from the DLL folder to your SYSTEM32 folder.
It doesn't mention which extension to enable or install.
re
Posted: Mon Aug 02, 2004 4:57 am
by deljim
you need to have this line in your php.ini file :
extension=php_domxml.dll
and off course you need this dll! Pay attention that the dll depends on libraries... check out on internet.
Jim
Posted: Mon Aug 02, 2004 10:28 am
by Smartweb
Ok, I put that extension there and enabled it in php.ini, but now I get this error when I restart Apache:
PHP Startup: domxml: Unable to initialize module
Module compiled wiht module API=20040718, debug=0, thread-safety=1
PHP compiled with module API=20040412, debug=0, thread-safety=1
These options need to match
I still get the function undefined error.
Posted: Tue Aug 03, 2004 9:05 am
by JAM
php_domxml.dll does not (?) exist in the PHP5 /ext/ directory for what I know.
And what you are doing is to load the dll that came with a PHP4 distribution, hence the errors above.
php.net wrote:This extension is EXPERIMENTAL. The behaviour of this extension -- including the names of its functions and anything else documented about this extension -- may change without notice in a future release of PHP. Use this extension at your own risk.
Did you copy the PHP5 release over a previously installed PHP4 one by any chance or something similiar?
Posted: Tue Aug 03, 2004 9:13 am
by Smartweb
I did an Internet search for it and found an extension dll download site. It had PHP4 and PHP5 versions of the dll, and I got the php5 one.
And, no, I did not install PHP5 over PHP4. PHP5 was the first one I installed.
Posted: Wed Aug 04, 2004 12:50 pm
by JAM
Ah... I was just wondering as someone I helped once did that, and got the errors you posted above. However, I'm pretty sure that the errors comes from that you are using a extension that wasn't intended for the PHP version you would like to use.
The API=XXXX is just one thing that makes something debugging this abit easier. The date of the precompiled binary should (likely) be stated wherever you downloaded it. It wont work having a dll compilaed against an old source of PHP as there are so many changes in between them...
Posted: Thu Aug 05, 2004 11:00 pm
by Smartweb
Has anyone here found a PHP5 compatable domxml version?