php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sietse at wizdom dot nu
New email:
PHP Version: OS:

 

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

I came across a conflict when linking libphp5.so.

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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-03 12:12 UTC] sietse at wizdom dot nu
MySQl Bug #26818
 [2007-03-04 18:24 UTC] iliaa@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC