ID:               28376
 Comment by:       lars dot a dot johansson at se dot atlascopco dot com
 Reported By:      jedihudzilla at hotmail dot com
 Status:           Assigned
 Bug Type:         Compile Failure
 Operating System: Linux/Mandrake 10
 PHP Version:      5CVS-2004-05-12 (dev)
 Assigned To:      georg
 New Comment:

Thanks Aaron, now it compiles. 
I spent 5 hours yesterday with this problem. The time wasn't wasted, as
I learned a lot about CVS, configure, make etc.


Previous Comments:
------------------------------------------------------------------------

[2004-06-05 22:51:59] agifford at infowest dot com

POSSIBLE FIX:

For PHP 5.0.0RC2 with MySQL 4.1.2 the following change to the PHP
source file /ext/mysqli/mysqli_prop.c at line 191 fixed the issue for
me (so far as I can tell - my mysql PHP web scripts appear to be
working all right):

Change it FROM:

MYSQLI_MAP_PROPERTY_LONG_LONG(stmt_num_rows_read, STMT,
stmt->result->row_count);

Change it TO:

MYSQLI_MAP_PROPERTY_LONG_LONG(stmt_num_rows_read, STMT,
stmt->result.rows);

Looking at mysql.h, I see that the MYSQL_STMT structure's "result"
member is of type MYSQL_DATA, which is a structure, not a pointer, and
it has a member named "rows" but not one named "row_count".

Hope this helps!

-Aaron out.

------------------------------------------------------------------------

[2004-06-05 22:38:15] agifford at infowest dot com

I see the exact same problem building PHP5 (5.0.0RC2) from the FreeBSD
port (mod_php5) using MYSQLI with the latest FreeBSD MYSQL 4.1 port
(4.1.2) under FreeBSD 5.0.  It's probably related to the incompatible
API changes MySQL recently made for the 4.1.2 alpha release (see
http://lists.mysql.com/announce/199 for some info), but I don't know
enought to go looking.

------------------------------------------------------------------------

[2004-05-12 19:43:55] jedihudzilla at hotmail dot com

Description:
------------
Using the latest snapshot of PHP5 and MySQL 4.1.2  (it's
4.1.2-alpha-nightly-20040512) I get a compile failure with PHP.  MySQL
was configured with:
  --prefix=/usr/local/mysql.

PHP was configured with 
  --with-mysqli=/usr/local/mysql/bin/mysql_config
  --prefix=/usr/local/php

With this it gets to compiling mysqli_prop.c then errors out:

/home/foo/php5-200405121430/ext/mysqli/mysqli_prop.c: In function
'stmt_num_rows_read':
/home/foo/php5-200405121430/ext/mysqli/mysqli_prop.c:191: error:
invalid type argument of '->'
/home/foo/php5-200405121430/ext/mysqli/mysqli_prop.c:191: error:
invalid type argument of '->'
/home/foo/php5-200405121430/ext/mysqli/mysqli_prop.c:191: error:
invalid type argument of '->'
make: *** [ext/mysqli/mysqli_prop.lo] Error 1

I had previously tried with the pre-built MySQL binary for 4.1.1, which
let PHP compile fine.  This seemed to be because PHP disabled the
prepared statement code as it was < 4.1.2, which was why I downloaded
the MySQL CVS build.

This also fails with PHP5 RC2, which was what I was using before I
tried the PHP CVS snapshot.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28376&edit=1

Reply via email to