cancel
Showing results for 
Search instead for 
Did you mean: 

domxml_open_file problem

woodyuj
Dabbler
Posts: 12
Registered: ‎04-08-2007

domxml_open_file problem

There seem to be some libraries missing since the server upgrade, I am now getting the message Fatal error: Call to undefined function domxml_open_file() ... when trying to open my website. Any clues or suggestions as to what has gone astray would be gratefully received.
Thanks.
9 REPLIES 9
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: domxml_open_file problem

Strange - dom support and the associated libxml/libxml2 libraries appear to be enabled in PHP. Shot in the dark but does your code make references to any $_SERVER[] or $_ENV[] values that might have changed in the upgrade?
David
David
woodyuj
Dabbler
Posts: 12
Registered: ‎04-08-2007

Re: domxml_open_file problem

I can't see anything like that - to be honest, the website was written by someone else and I'm not too familiar with PHP and CGI in general. Looking at some of the other posts, I tried altering some permissions and managed to generate the 500 error that some others have experienced. I'll keep trying, thanks for the suggestion.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: domxml_open_file problem

Item no 8 in the Customer Library Upgrade FAQ suggests some reasons for that error. Please let us know if that doesn't cover it.
David
Edit: Fixed link tags
David
Ben_Brown
Grafter
Posts: 2,839
Registered: ‎13-06-2007

Re: domxml_open_file problem

Unfortunately it seems that domxml is no longer distributed with PHP, from the php manual page:
Quote
This extension is no longer marked experimental. It will, however, never be released with PHP 5, and will only be distributed with PHP 4. If you need DOM XML support with PHP 5 you can use the DOM  extension. This domxml extension is not compatible with the DOM  extension.

I'm afraid you'll need to change your code.
dick:green Link fixed.
woodyuj
Dabbler
Posts: 12
Registered: ‎04-08-2007

Re: domxml_open_file problem

Yep, after a bit of searching in Google, I've noticed that too  Sad
Looks like I'll have to learn a bit of PHP and try and fix it....
Thanks for the help, chaps.
woodyuj
Dabbler
Posts: 12
Registered: ‎04-08-2007

Re: domxml_open_file problem

A bit of searching revealed some conversion code at http://alexandre.alapetite.fr/doc-alex/domxml-php4-php5/domxml-php4-to-php5.php.txt
I assume (not that I really know what I'm on about, but...) if Plusnet included this code in the load libraries, then it should be fairly simple to get everyone's domxml code working again with a simple call to the convertor.
Any chance, Plusnet?  Huh
Ben_Brown
Grafter
Posts: 2,839
Registered: ‎13-06-2007

Re: domxml_open_file problem

Have you tried using the script as it suggests? According to the preamble it should only need PHP5/libxml which we already have installed.
woodyuj
Dabbler
Posts: 12
Registered: ‎04-08-2007

Re: domxml_open_file problem

Not yet, but I will when I get home from work. Fingers crossed!
woodyuj
Dabbler
Posts: 12
Registered: ‎04-08-2007

Re: domxml_open_file problem

Smiley
Saved the convertor code into the same directory as index.php, amended index.php to call the convertor, job's a good 'un!
Credit and thanks to Alexandre Alapetite, http://alexandre.alapetite.fr/cv/ who wrote the convertor code. I'll try to learn enough PHP to make the proper PHP 5 changes in the future.
Thanks again for the help!
Cheesy