Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#39048 closed defect (fixed)

php52: build error with libxml2 @2.9.0

Reported by: coolkutex@… Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: php52


Operating System Mac OS X 10.6.8 Processor: 2.8 Ghz Quad-Core Intel Xeon XCode: 3.2.6

Problem Description:

In summary, I want to downgrade the current version of php5.3.15 on my development Mac to 5.2. I have a mediawiki site that was setup using php 5.2 on a SUSE linux Server 10 machine that need to be moved across to a Mac OS X Lion Server (Live Server). I want to downgrade and do all the testing on this development machine before implementing it on the live server. I followed the instructions I found on this website below

The output of the command "sudo port install php52 +mysql5 +sqlite" returned the following with an error:

$ sudo port install php52 +mysql5 +sqlite
--->  Computing dependencies for php52
--->  Dependencies to be installed: apache2 apr apr-util db46 db_select expat libiconv mysql5 openssl zlib readline ncurses tcp_wrappers sqlite3 libedit pcre bzip2 perl5 perl5.12 gdbm gettext autoconf213 gawk m4 curl curl-ca-bundle libidn freetype gsed jpeg libmcrypt libpng libtool libxml2 xz libxslt mhash pkgconfig tiff
--->  Fetching archive for apr
--->  Attempting to fetch apr-1.4.6_1.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch apr-1.4.6_1.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing apr @1.4.6_1
--->  Activating apr @1.4.6_1
--->  Cleaning apr
--->  Fetching archive for db_select
--->  Attempting to fetch db_select-0.1_2.darwin_10.noarch.tbz2 from
--->  Attempting to fetch db_select-0.1_2.darwin_10.noarch.tbz2.rmd160 from
--->  Installing db_select @0.1_2
--->  Activating db_select @0.1_2
--->  Cleaning db_select
--->  Fetching archive for db46
--->  Attempting to fetch db46-4.6.21_8.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch db46-4.6.21_8.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing db46 @4.6.21_8
--->  Activating db46 @4.6.21_8
--->  Cleaning db46
--->  Fetching archive for expat
--->  Attempting to fetch expat-2.1.0_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch expat-2.1.0_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing expat @2.1.0_0
--->  Activating expat @2.1.0_0
--->  Cleaning expat
--->  Fetching archive for libiconv
--->  Attempting to fetch libiconv-1.14_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch libiconv-1.14_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing libiconv @1.14_0
--->  Activating libiconv @1.14_0
--->  Cleaning libiconv
--->  Fetching archive for zlib
--->  Attempting to fetch zlib-1.2.8_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch zlib-1.2.8_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing zlib @1.2.8_0
--->  Activating zlib @1.2.8_0
--->  Cleaning zlib
--->  Fetching archive for openssl
--->  Attempting to fetch openssl-1.0.1e_1.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch openssl-1.0.1e_1.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing openssl @1.0.1e_1
--->  Activating openssl @1.0.1e_1
--->  Cleaning openssl
--->  Fetching archive for ncurses
--->  Attempting to fetch ncurses-5.9_2.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch ncurses-5.9_2.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing ncurses @5.9_2
--->  Activating ncurses @5.9_2
--->  Cleaning ncurses
--->  Fetching archive for readline
--->  Attempting to fetch readline-6.2.000_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch readline-6.2.000_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing readline @6.2.000_0
--->  Activating readline @6.2.000_0
--->  Cleaning readline
--->  Fetching archive for tcp_wrappers
--->  Attempting to fetch tcp_wrappers-20_2.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch tcp_wrappers-20_2.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing tcp_wrappers @20_2
--->  Activating tcp_wrappers @20_2
--->  Cleaning tcp_wrappers
--->  Configuring mysql5
--->  Building mysql5
--->  Staging mysql5 into destroot
--->  Installing mysql5 @5.1.68_0
The MySQL client has been installed.
If you also want a MySQL server, install the mysql5-server port.
--->  Activating mysql5 @5.1.68_0
--->  Cleaning mysql5
--->  Fetching archive for libedit
--->  Attempting to fetch libedit-20121213-3.0_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch libedit-20121213-3.0_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing libedit @20121213-3.0_0
--->  Activating libedit @20121213-3.0_0
--->  Cleaning libedit
--->  Fetching archive for sqlite3
--->  Attempting to fetch sqlite3- from
--->  Attempting to fetch sqlite3- from
--->  Installing sqlite3 @
--->  Activating sqlite3 @
--->  Cleaning sqlite3
--->  Fetching archive for apr-util
--->  Attempting to fetch apr-util-1.5.1_0+mysql5.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch apr-util-1.5.1_0+mysql5.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch apr-util-1.5.1_0+mysql5.darwin_10.x86_64.tbz2 from
--->  Fetching distfiles for apr-util
--->  Verifying checksum(s) for apr-util
--->  Extracting apr-util
--->  Configuring apr-util
--->  Building apr-util
--->  Staging apr-util into destroot
--->  Installing apr-util @1.5.1_0+mysql5
--->  Activating apr-util @1.5.1_0+mysql5
--->  Cleaning apr-util
--->  Fetching archive for bzip2
--->  Attempting to fetch bzip2-1.0.6_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch bzip2-1.0.6_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing bzip2 @1.0.6_0
--->  Activating bzip2 @1.0.6_0
--->  Cleaning bzip2
--->  Fetching archive for pcre
--->  Attempting to fetch pcre-8.32_1.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch pcre-8.32_1.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing pcre @8.32_1
--->  Activating pcre @8.32_1
--->  Cleaning pcre
--->  Fetching archive for gettext
--->  Attempting to fetch gettext- from
--->  Attempting to fetch gettext- from
--->  Installing gettext @
--->  Activating gettext @
--->  Cleaning gettext
--->  Fetching archive for gdbm
--->  Attempting to fetch gdbm-1.10_2.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch gdbm-1.10_2.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing gdbm @1.10_2
--->  Activating gdbm @1.10_2
--->  Cleaning gdbm
--->  Fetching archive for perl5.12
--->  Attempting to fetch perl5.12-5.12.4_2.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch perl5.12-5.12.4_2.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing perl5.12 @5.12.4_2
--->  Activating perl5.12 @5.12.4_2
--->  Cleaning perl5.12
--->  Fetching archive for perl5
--->  Attempting to fetch perl5-5.12.4_0+perl5_12.darwin_10.noarch.tbz2 from
--->  Attempting to fetch perl5-5.12.4_0+perl5_12.darwin_10.noarch.tbz2.rmd160 from
--->  Installing perl5 @5.12.4_0+perl5_12
--->  Activating perl5 @5.12.4_0+perl5_12
--->  Cleaning perl5
--->  Fetching archive for apache2
--->  Attempting to fetch apache2-2.2.24_0+preforkmpm.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch apache2-2.2.24_0+preforkmpm.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing apache2 @2.2.24_0+preforkmpm
--->  Activating apache2 @2.2.24_0+preforkmpm
--->  Cleaning apache2
--->  Fetching archive for gawk
--->  Attempting to fetch gawk-4.0.2_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch gawk-4.0.2_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing gawk @4.0.2_0
--->  Activating gawk @4.0.2_0
--->  Cleaning gawk
--->  Fetching archive for m4
--->  Attempting to fetch m4-1.4.16_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch m4-1.4.16_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing m4 @1.4.16_0
--->  Activating m4 @1.4.16_0
--->  Cleaning m4
--->  Fetching archive for autoconf213
--->  Attempting to fetch autoconf213-2.13_1.darwin_10.noarch.tbz2 from
--->  Attempting to fetch autoconf213-2.13_1.darwin_10.noarch.tbz2.rmd160 from
--->  Installing autoconf213 @2.13_1
--->  Activating autoconf213 @2.13_1
--->  Cleaning autoconf213
--->  Fetching archive for curl-ca-bundle
--->  Attempting to fetch curl-ca-bundle-7.30.0_0.darwin_10.noarch.tbz2 from
--->  Attempting to fetch curl-ca-bundle-7.30.0_0.darwin_10.noarch.tbz2.rmd160 from
--->  Installing curl-ca-bundle @7.30.0_0
--->  Activating curl-ca-bundle @7.30.0_0
--->  Cleaning curl-ca-bundle
--->  Fetching archive for libidn
--->  Attempting to fetch libidn-1.26_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch libidn-1.26_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing libidn @1.26_0
--->  Activating libidn @1.26_0
--->  Cleaning libidn
--->  Fetching archive for curl
--->  Attempting to fetch curl-7.30.0_0+ssl.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch curl-7.30.0_0+ssl.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing curl @7.30.0_0+ssl
--->  Activating curl @7.30.0_0+ssl
--->  Cleaning curl
Portfile changed since last build; discarding previous state.
--->  Fetching archive for freetype
--->  Attempting to fetch freetype-2.4.11_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch freetype-2.4.11_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing freetype @2.4.11_0
--->  Activating freetype @2.4.11_0
--->  Cleaning freetype
--->  Fetching archive for gsed
--->  Attempting to fetch gsed-4.2.2_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch gsed-4.2.2_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing gsed @4.2.2_0
--->  Activating gsed @4.2.2_0
--->  Cleaning gsed
--->  Fetching archive for jpeg
--->  Attempting to fetch jpeg-9_1.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch jpeg-9_1.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing jpeg @9_1
--->  Activating jpeg @9_1
--->  Cleaning jpeg
--->  Fetching archive for libmcrypt
--->  Attempting to fetch libmcrypt-2.5.8_1.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch libmcrypt-2.5.8_1.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing libmcrypt @2.5.8_1
--->  Activating libmcrypt @2.5.8_1
--->  Cleaning libmcrypt
--->  Fetching archive for libpng
--->  Attempting to fetch libpng-1.5.15_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch libpng-1.5.15_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing libpng @1.5.15_0
--->  Activating libpng @1.5.15_0
--->  Cleaning libpng
--->  Fetching archive for libtool
--->  Attempting to fetch libtool-2.4.2_3.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch libtool-2.4.2_3.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing libtool @2.4.2_3
--->  Activating libtool @2.4.2_3
--->  Cleaning libtool
--->  Fetching archive for xz
--->  Attempting to fetch xz-5.0.4_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch xz-5.0.4_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing xz @5.0.4_0
--->  Activating xz @5.0.4_0
--->  Cleaning xz
--->  Fetching archive for libxml2
--->  Attempting to fetch libxml2-2.9.0_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch libxml2-2.9.0_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing libxml2 @2.9.0_0
--->  Activating libxml2 @2.9.0_0
--->  Cleaning libxml2
--->  Fetching archive for libxslt
--->  Attempting to fetch libxslt-1.1.27_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch libxslt-1.1.27_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing libxslt @1.1.27_0
--->  Activating libxslt @1.1.27_0
--->  Cleaning libxslt
--->  Fetching archive for mhash
--->  Attempting to fetch mhash- from
--->  Attempting to fetch mhash- from
--->  Installing mhash @
--->  Activating mhash @
--->  Cleaning mhash
--->  Fetching archive for pkgconfig
--->  Attempting to fetch pkgconfig-0.28_0.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch pkgconfig-0.28_0.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing pkgconfig @0.28_0
--->  Activating pkgconfig @0.28_0
--->  Cleaning pkgconfig
--->  Fetching archive for tiff
--->  Attempting to fetch tiff-4.0.3_1.darwin_10.x86_64.tbz2 from
--->  Attempting to fetch tiff-4.0.3_1.darwin_10.x86_64.tbz2.rmd160 from
--->  Installing tiff @4.0.3_1
--->  Activating tiff @4.0.3_1
--->  Cleaning tiff
--->  Building php52
Error: for port php52 returned: command execution failed
Please see the log file for port php52 for details:
To report a bug, follow the instructions in the guide:
Error: Processing of port php52 failed

Please my questions are: 1: What can I do to resolve this problem? 2: Are there possible alternative ways of downgrading from php 5.3 to 5.2 without going through mac ports? 3: Since this procedure is targeted towards a live Lion server, must XCode and MacPorts be installed on the server? This might be risky for other running websites (I may be wrong). 4: My ultimate aim is to migrate this mediawiki website (built using version 1.14 and mysql 5.0.26 on the old SUSE server) to the live Mac Lion server. This is the last stage of our migration process at work. Please are there possible alternatives?

This is because when the mediawiki website is migrated to either this dev mac or the Lion server both running php 5.3, any attempt to edit any page on the mediawiki site results in the error message below:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function "Revision::insertOn". MySQL returned error "1048: Column 'old_text' cannot be null (localhost)".

but everything works well with the mediawiki site when installed on MAMP and php version set to 5.2.17 from preferences. So the problem is not the database but the php version. The mediawiki is still running smoothly on the old SUSE Linux 10 server.

I already have mysql Server version: 5.0.96 MySQL Community Server (GPL) installed on this dev machine. I have tried uninstalling it before running the macport command but still it doesn't work. I don't know what else to do.

Any help to solving this problem will be greatly appreciated as I have tried many things for weeks now to achieve my ultimate aim of getting the mediawiki site to work without errors as i have done for other websites including a drupal site.

Thanks so much.

Attachments (1)

main.log (308.7 KB) - added by coolkutex@… 6 years ago.
Main log file of the error

Download all attachments as: .zip

Change History (9)

comment:1 Changed 6 years ago by mf2k (Frank Schima)

Port: php52 added
Resolution: invalid
Status: newclosed

Trac is not for tech support. Use the macports-users mailing list instead.

If you are reporting an error for installing php52, you need to attach the main.log so we can see the error.

Last edited 6 years ago by mf2k (Frank Schima) (previous) (diff)

Changed 6 years ago by coolkutex@…

Attachment: main.log added

Main log file of the error

comment:2 Changed 6 years ago by cooljeanius (Eric Gallager)

This is the error from the relevant part of the log:

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_php52/php52/work/php-5.2.17/ext/dom/node.c: In function ‘dom_canonicalization’:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_php52/php52/work/php-5.2.17/ext/dom/node.c:1953: error: dereferencing pointer to incomplete type
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_php52/php52/work/php-5.2.17/ext/dom/node.c:1955: error: dereferencing pointer to incomplete type
:info:build make: *** [ext/dom/node.lo] Error 1
:info:build make: *** Waiting for unfinished jobs....
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_php52/php52/work/php-5.2.17/ext/dom/documenttype.c: In function ‘dom_documenttype_internal_subset_read’:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_php52/php52/work/php-5.2.17/ext/dom/documenttype.c:218: error: dereferencing pointer to incomplete type
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_php52/php52/work/php-5.2.17/ext/dom/documenttype.c:218: error: dereferencing pointer to incomplete type
:info:build make: *** [ext/dom/documenttype.lo] Error 1
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_php52/php52/work/php-5.2.17'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_php52/php52/work/php-5.2.17" && /usr/bin/make -j7 -w all 
:info:build Exit code: 2

comment:3 Changed 6 years ago by larryv (Lawrence Velázquez)

Cc: ryandesign@… added

comment:4 Changed 6 years ago by mf2k (Frank Schima)

Resolution: invalid
Status: closedreopened

comment:5 Changed 6 years ago by mf2k (Frank Schima)

Cc: ryandesign@… removed
Owner: changed from macports-tickets@… to ryandesign@…
Status: reopenednew

comment:6 Changed 6 years ago by ryandesign (Ryan Schmidt)

Status: newassigned
Summary: Error: for port php52 returned: command execution failedphp52: build error with libxml2 @2.9.0

The php52 build error you've encountered is an incompatibility with libxml2 @2.9.0. The php52 port built fine last I checked it, but that was three days before the libxml2 port was updated to version 2.9.0. Here is the discussion about this problem, and the patch for PHP 5.4. I'll work on backporting this patch to PHP 5.2 and incorporating it into the php52 port.

However, I strongly urge you to reconsider your approach. You should not be running PHP 5.2 in production; it is far too old. The developers of PHP announced the end of support for PHP 5.2 in December 2010. It is undoubtedly full of bugs and security problems that have already been fixed in newer versions of PHP. At this time, you should be running PHP 5.4 in production (e.g. the MacPorts php54 port) and testing your sites with pre-release versions of PHP 5.5 (e.g. the php55 port) in preparation for PHP 5.5 becoming the new stable version.

MySQL 5.0.x is also very old. Per Oracle policy, "active support" for MySQL 5.0 ended at the end of 2009. You should be running MySQL 5.5 (the mysql55 port) or 5.6 (not yet in MacPorts; see #37976), or considering switching to a MySQL fork like MariaDB (the mariadb port) or Percona (the percona port).

You should also ensure you're running the current version of MediaWiki, 1.20.5. The developers of MediaWiki are constantly announcing major security vulnerabilities in older versions; running anything older than the current versions will undoubtedly expose your server and your users to the possibility of attack. Contact the developers of MediaWiki if you need help upgrading your current MediaWiki installation to the latest version.

comment:7 Changed 6 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: assignedclosed

Fixed the php52 bug in r105920. Thanks for reporting the problem.

comment:8 in reply to:  6 Changed 6 years ago by cooljeanius (Eric Gallager)

Replying to ryandesign@…:

You should also ensure you're running the current version of MediaWiki, 1.20.5.

If that's the case, the mediawiki port should be updated to 1.20.5 then (it's currently at 1.17.0). brb, checking to see if there's already a ticket for this... edit: there wasn't yet, so I made one: #39053

Last edited 6 years ago by cooljeanius (Eric Gallager) (previous) (diff)
Note: See TracTickets for help on using tickets.