# PHP 5.2.3 and libxml compile failure on Win32

- Thread: https://externals.io/message/30171
- Original archive: https://news-web.php.net/php.internals/30171
- Started by Marco on 2007-06-14T10:32:59+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #30171 — Marco — 2007-06-14T10:32:59+00:00

URL: https://externals.io/message/30171#30171

Hi All

We are having a problem compiling PHP 5.2.3 under win32.

Building PHP on Win32 using VS2005 following the instructions at
http://hu2.php.net/manual/en/install.windows.building.php the build fails
unless libxml support is disabled.

If it is configured as

cscript /nologo configure.js --enable-embed --enable-debug --without-libxml

then the build is ok. But in this case calls to `xml_parser_create()` results
fatal error in the PHP scripts BTW should disabling libxml also disables
simplexml?.

When it is built with libxml support as

cscript /nologo configure.js --enable-embed --enable-debug

then the compiler fails with errors like

w:\1\php-5.2.3\ext\dom\xml_common.h(27) : error C2143: syntax error :
missing '{' before '*'
w:\1\php-5.2.3\ext\dom\xml_common.h(32) : error C2061: syntax error :
identifier 'php_libxml_ref_obj'
w:\1\php-5.2.3\ext\dom\xml_common.h(35) : error C2059: syntax error : '}'
w:\1\php-5.2.3\ext\dom\xml_common.h(51) : error C2143: syntax error :
missing '{' before '*'
w:\1\php-5.2.3\ext\dom\xml_common.h(52) : error C2143: syntax error :
missing ')' before '*'
w:\1\php-5.2.3\ext\dom\xml_common.h(52) : error C2081: 'dom_object' : name
in formal parameter list illegal
w:\1\php-5.2.3\ext\dom\xml_common.h(52) : error C2143: syntax error :
missing '{' before '*'
w:\1\php-5.2.3\ext\dom\xml_common.h(52) : error C2059: syntax error : 'type'
w:\1\php-5.2.3\ext\dom\xml_common.h(52) : error C2059: syntax error : ')'
w:\1\php-5.2.3\ext\dom\xml_common.h(53) : error C2143: syntax error :
missing ')' before '*'
w:\1\php-5.2.3\ext\dom\xml_common.h(53) : error C2143: syntax error :
missing '{' before '*'
w:\1\php-5.2.3\ext\dom\xml_common.h(53) : error C2059: syntax error : ')'
w:\1\php-5.2.3\ext\dom\php_dom.h(71) : error C2061: syntax error :
identifier 'dom_object'
w:\1\php-5.2.3\ext\dom\php_dom.h(77) : error C2059: syntax error : '}'
w:\1\php-5.2.3\ext\dom\php_dom.h(86) : error C2143: syntax error : missing
'{' before '*'
w:\1\php-5.2.3\ext\dom\php_dom.h(87) : error C2061: syntax error :
identifier 'dom_get_doc_props'
w:\1\php-5.2.3\ext\dom\php_dom.h(87) : error C2059: syntax error : ';'
w:\1\php-5.2.3\ext\dom\php_dom.h(87) : error C2143: syntax error : missing
')' before '*'
w:\1\php-5.2.3\ext\dom\php_dom.h(87) : error C2143: syntax error : missing
'{' before '*'
w:\1\php-5.2.3\ext\dom\php_dom.h(87) : error C2059: syntax error : ')'
w:\1\php-5.2.3\ext\dom\php_dom.h(93) : error C2143: syntax error : missing
')' before '*'
w:\1\php-5.2.3\ext\dom\php_dom.h(93) : error C2143: syntax error : missing
'{' before '*'
w:\1\php-5.2.3\ext\dom\php_dom.h(93) : error C2059: syntax error : ')'

Libxml is built and the headers and the libs are placed to the win32build
folder, we are currently trying to build against  libxml 2.6.2.26

Can anyone point us in the right direction to get this resolved?

Thanks in advance

Marco

---

## #30206 — johannes@php.net — 2007-06-14T10:59:27+00:00

URL: https://externals.io/message/30171#30206 · In reply to: #30171

Hi,

I don't really know that windows stuff but did you try building PHP
using Edins zip.zip file or your own libxml2? Maybe the libs have some
compatibility issues.

And about the other question: All XML extensions in PHP 5 are based on
libxml2. If you disable building libxml2 support you can't have any of
these compiled in.

johannes


> Hi All
> 
> We are having a problem compiling PHP 5.2.3 under win32.
> 
> Building PHP on Win32 using VS2005 following the instructions at
> http://hu2.php.net/manual/en/install.windows.building.php the build fails
> unless libxml support is disabled.
> 
> If it is configured as
> 
> cscript /nologo configure.js --enable-embed --enable-debug --without-libxml
> 
> then the build is ok. But in this case calls to `xml_parser_create()` results
> fatal error in the PHP scripts BTW should disabling libxml also disables
> simplexml?.
> 
> When it is built with libxml support as
> 
> cscript /nologo configure.js --enable-embed --enable-debug
> 
> then the compiler fails with errors like
> 
> w:\1\php-5.2.3\ext\dom\xml_common.h(27) : error C2143: syntax error :
> missing '{' before '*'
> w:\1\php-5.2.3\ext\dom\xml_common.h(32) : error C2061: syntax error :
> identifier 'php_libxml_ref_obj'
> w:\1\php-5.2.3\ext\dom\xml_common.h(35) : error C2059: syntax error : '}'
> w:\1\php-5.2.3\ext\dom\xml_common.h(51) : error C2143: syntax error :
> missing '{' before '*'
> w:\1\php-5.2.3\ext\dom\xml_common.h(52) : error C2143: syntax error :
> missing ')' before '*'
> w:\1\php-5.2.3\ext\dom\xml_common.h(52) : error C2081: 'dom_object' : name
> in formal parameter list illegal
> w:\1\php-5.2.3\ext\dom\xml_common.h(52) : error C2143: syntax error :
> missing '{' before '*'
> w:\1\php-5.2.3\ext\dom\xml_common.h(52) : error C2059: syntax error : 'type'
> w:\1\php-5.2.3\ext\dom\xml_common.h(52) : error C2059: syntax error : ')'
> w:\1\php-5.2.3\ext\dom\xml_common.h(53) : error C2143: syntax error :
> missing ')' before '*'
> w:\1\php-5.2.3\ext\dom\xml_common.h(53) : error C2143: syntax error :
> missing '{' before '*'
> w:\1\php-5.2.3\ext\dom\xml_common.h(53) : error C2059: syntax error : ')'
> w:\1\php-5.2.3\ext\dom\php_dom.h(71) : error C2061: syntax error :
> identifier 'dom_object'
> w:\1\php-5.2.3\ext\dom\php_dom.h(77) : error C2059: syntax error : '}'
> w:\1\php-5.2.3\ext\dom\php_dom.h(86) : error C2143: syntax error : missing
> '{' before '*'
> w:\1\php-5.2.3\ext\dom\php_dom.h(87) : error C2061: syntax error :
> identifier 'dom_get_doc_props'
> w:\1\php-5.2.3\ext\dom\php_dom.h(87) : error C2059: syntax error : ';'
> w:\1\php-5.2.3\ext\dom\php_dom.h(87) : error C2143: syntax error : missing
> ')' before '*'
> w:\1\php-5.2.3\ext\dom\php_dom.h(87) : error C2143: syntax error : missing
> '{' before '*'
> w:\1\php-5.2.3\ext\dom\php_dom.h(87) : error C2059: syntax error : ')'
> w:\1\php-5.2.3\ext\dom\php_dom.h(93) : error C2143: syntax error : missing
> ')' before '*'
> w:\1\php-5.2.3\ext\dom\php_dom.h(93) : error C2143: syntax error : missing
> '{' before '*'
> w:\1\php-5.2.3\ext\dom\php_dom.h(93) : error C2059: syntax error : ')'
> 
> Libxml is built and the headers and the libs are placed to the win32build
> folder, we are currently trying to build against  libxml 2.6.2.26
> 
> Can anyone point us in the right direction to get this resolved?
> 
> Thanks in advance
> 
> Marco

---

## #30217 — Marco — 2007-06-18T08:04:08+00:00

URL: https://externals.io/message/30171#30217 · In reply to: #30206

Hi Johannes

Many thanks for your reply, we managed to get it to compile by using the
libxml2 from http://ctindustries.net/libxml/

Thanks for the comment on the simplexml.. it makes sense now why its
disabled.

Regards

Marco
