php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44502 Compiling ok with MySQL 5.0
Submitted: 2008-03-22 03:34 UTC Modified: 2008-03-23 13:18 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: nickg78 at gmail dot com Assigned:
Status: Suspended Package: Compile Failure
PHP Version: 6CVS-2008-03-22 (snap) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nickg78 at gmail dot com
New email:
PHP Version: OS:

 

 [2008-03-22 03:34 UTC] nickg78 at gmail dot com
Description:
------------
While trying to compile PHP 6 with mysql or mysqli, compile fails with error /ext/mysql/php_mysql.c:2086: error: 'MYSQL_TYPE_VARCHAR' undeclared (first use in this function)

Reproduce code:
---------------
These are the configure options for MySQL that were working with no problems while compiling PHP 5.0-5.2:

./configure --with-mysqli --with-mysql=/usr





Expected result:
----------------
Successful PHP compile



Actual result:
--------------
ext/mysql/php_mysql.c: In function 'php_mysql_fetch_hash':
ext/mysql/php_mysql.c:2086: error: 'MYSQL_TYPE_VARCHAR' undeclared (first use in this function)
ext/mysql/php_mysql.c:2086: error: (Each undeclared identifier is reported only once
ext/mysql/php_mysql.c:2086: error: for each function it appears in.)
make: *** [ext/mysql/php_mysql.lo] Error 1

MySQL version is 4.1.22


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-22 05:05 UTC] nickg78 at gmail dot com
Finally after some further testing, it appears that the problem does not occur with MySQL 5.0, but only with 4.1

I upgraded my MySQL version to 5.0 and now PHP is compiled without errors. Please ignore this bug report if PHP 6.0 is officially announced to be incompatible with MySQL 4.1 but I have not found anything mentioning this.
 [2008-03-23 12:03 UTC] felipe@php.net
Looks that it was added in 5.0.3 version, here's a patch:
http://felipe.ath.cx/diff/mysql.diff (non tested)

Changing mysql/php_mysql.c, mysqli/mysqli.c and mysqli/mysqli_api.c
 [2008-03-23 13:18 UTC] johannes@php.net
I don't think we should make the code complexer (even if it's just a little) for supporting MySQL libraries odler than 5.0 with PHP 6. There are three reasons for that:

- The active support lifecycle from MySQL/Sun ended 2006-12-31, the extended will end 2009-12-31 (http://mysql.com/about/legal/lifecycle/)
- You can use --with-mysql=mysqlnd and --with-mysqli=mysqlnd to use MySQLnd library which is not dependant from an external library, and I hope it will be default with PHP 6
- It will take quite some time until PHP 6 will be released.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 01:01:24 2019 UTC