PHP5/LibXML2/DOM XML Encoding Problem

avaz

Verified User
Joined
Jun 16, 2008
Messages
8
Hi all,

If anyone could help me out here, I would greatly appreciate it.

Have DA on FreeBSD 7.0-STABLE.
CustomBuild with Apache 2, PHP 5.2.6, etc.

Had to add XSL/XML support for a friend of mine who hosts his site on this server. However been encountering the following warnings, errors:

Code:
Warning: DOMDocument::loadXML() [domdocument.loadxml]: Unsupported encoding windows-1251 in Entity, line: 1 in /usr/home/spain/domains/well-spain.ru/public_html/searchtour/funcs/domxml-php4-to-php5.php on line 61

Warning: DOMDocument::load() [domdocument.load]: Unsupported encoding windows-1251 in /usr/home/spain/domains/well-spain.ru/public_html/searchtour/funcs/auto_offers.xsl, line: 1 in /usr/home/spain/domains/well-spain.ru/public_html/searchtour/funcs/domxml-php4-to-php5.php on line 463

Catchable fatal error: Argument 1 passed to XSLTProcessor::importStylesheet() must be an instance of DOMDocument, boolean given, called in /usr/home/spain/domains/well-spain.ru/public_html/searchtour/funcs/domxml-php4-to-php5.php on line 463 and defined in /usr/home/spain/domains/well-spain.ru/public_html/searchtour/funcs/domxml-php4-to-php5.php on line 471


Anyways, I have been researching Google. Came across suggestions such as recompile libxml and libxlst having options --with-iconv.
Not sure what config file to edit for those in CustomBuild.

I have iconv, libxml2, libxlt all compiled thru CustomBuild.
Here is a link for phpinfo():

Link removed since the issue has been resolved, see below

As you notice, in my PHP configuration I do have necessary options in php config
Code:
...
--enable-libxml \
--with-libxml-dir=/usr/local/lib \
--enable-xslt \
--with-xsl=/usr/local/lib \
....

Suggestions and help would be appreciated.
 
Last edited:
Resolved

ISSUE RESOLVED.

Anyways steps I took were:

1) In FreeBSD, added its own libxml2, iconv, libxslt ports
Code:
#pkg_add -r -f iconv
#pkg_add -r -f libiconv
#pkg_add -r -f libxml2
#pkg_add -r -f libxslt

2)
From PHP configuration Removed:
Code:
....
--enable-libxml \
--enable-xslt \
....

Left it with:
Code:
...
--with-libxml-dir=/usr/local \
--with-xsl=/usr/local \
...

3)
Code:
#./build clean
#./build php n

Works fine now.
 
ISSUE RESOLVED.

2)
From PHP configuration Removed:
Code:
....
--enable-libxml \
--enable-xslt \
....

Left it with:
Code:
...
--with-libxml-dir=/usr/local \
--with-xsl=/usr/local \
...

Sorry, but i dont understand in witch file you removed this lines?
 
Back
Top