|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40703 PHP 5.2.1 - MySQL 5.2.3 - Internal Function Conflict in base64.h
Submitted: 2007-03-03 09:18 UTC Modified: 2007-03-04 18:24 UTC
From: sietse at wizdom dot nu Assigned:
Status: Closed Package: XMLRPC-EPI related
PHP Version: 5.2.1 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
1 + 44 = ?
Subscribe to this entry?

 [2007-03-03 09:18 UTC] sietse at wizdom dot nu
Hi, I was compiling php 5.2.1 against mysql 5.2.3 with embedded mysqli support.

I came across a conflict when linking

Seems that both MySQL's NDB (include/base64.h) and PHP's XMLRPC (ext/xmlrpc/libxmlrpc/base64.h) both define internal base64_encode() and base64_decode() functions.

I think gcc4.x will be able to fix this, as you have the ability to set visibility of internal functions. But good practice is always to name your internal functions as explicitely and descriptively as possible.

I have opened the same bug @ MySQL. They should name there internal functions more explicitely too.

To quickly patch, add:
#define base64_encode base64_encode_bla
#define base64_decode base64_decode_bla

to either MySQL's include/base64.h OR PHP's ext/xmlrpc/libxmlrpc/base64.h

Reproduce code:
Compile php5.2.1 with mysqli-embedded support against Mysql 5.2.3 with ndb plugin.

Expected result:
succesful compile and linking

Actual result:
linker error message, conflicting symbols.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-03 12:12 UTC] sietse at wizdom dot nu
MySQl Bug #26818
 [2007-03-04 18:24 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Sep 19 09:01:24 2020 UTC