954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

mysqli + mysql functions (PHP5/MySQL 4.0)

When attempting to compile PHP 5.0.4 with MySQL 4.0, I received some strange errors from attempting to use --with-mysql and --with-mysqli. After getting it to configure correctly, where it finds mysql and mysqli support, when I run make I get these odd compile errors:

==
/usr/src/php-5.0.4/ext/mysqli/php_mysqli.h:48: error: syntax error before "MYSQL_STMT"
/usr/src/php-5.0.4/ext/mysqli/php_mysqli.h:48: warning: no semicolon at end of struct or union
/usr/src/php-5.0.4/ext/mysqli/php_mysqli.h:52: error: syntax error before '}' token
/usr/src/php-5.0.4/ext/mysqli/php_mysqli.h:52: warning: data definition has no type or storage class
/usr/src/php-5.0.4/ext/mysqli/php_mysqli.h:85: error: `LOCAL_INFILE_ERROR_LEN' undeclared here (not in a function)
/usr/src/php-5.0.4/ext/mysqli/php_mysqli.h:113: error: syntax error before '*' token
/usr/src/php-5.0.4/ext/mysqli/mysqli.c:91: error: syntax error before '*' token
/usr/src/php-5.0.4/ext/mysqli/mysqli.c: In function `php_clear_stmt_bind':
/usr/src/php-5.0.4/ext/mysqli/mysqli.c:93: error: `stmt' undeclared (first use in this function)
/usr/src/php-5.0.4/ext/mysqli/mysqli.c:93: error: (Each undeclared identifier is reported only once
/usr/src/php-5.0.4/ext/mysqli/mysqli.c:93: error: for each function it appears in.)
/usr/src/php-5.0.4/ext/mysqli/mysqli.c: In function `mysqli_objects_free_storage':
/usr/src/php-5.0.4/ext/mysqli/mysqli.c:139: error: syntax error before ')' token
/usr/src/php-5.0.4/ext/mysqli/mysqli.c: In function `mysqli_read_property':
/usr/src/php-5.0.4/ext/mysqli/mysqli.c:204: error: `MYSQL_STMT' undeclared (first use in this function)
/usr/src/php-5.0.4/ext/mysqli/mysqli.c:204: error: syntax error before ')' token
/usr/src/php-5.0.4/ext/mysqli/mysqli.c:204: error: syntax error before ')' token
/usr/src/php-5.0.4/ext/mysqli/mysqli.c: In function `zm_startup_mysqli':
/usr/src/php-5.0.4/ext/mysqli/mysqli.c:457: error: `STMT_ATTR_UPDATE_MAX_LENGTH' undeclared (first use in this function)
/usr/src/php-5.0.4/ext/mysqli/mysqli.c:515: error: `MYSQL_NO_DATA' undeclared (first use in this function)
/usr/src/php-5.0.4/ext/mysqli/mysqli.c: In function `php_mysqli_fetch_into_hash':
/usr/src/php-5.0.4/ext/mysqli/mysqli.c:624: error: syntax error before ')' token
==

If I try and compile with 4.0, I get those errors for mysqli. If I try and compile with 4.1, I get those errors with mysql.

Ideally, i'd like this to work for 4.1 (having both mysql and mysqli functions). Any suggestions are appreciated.

fsn812
Junior Poster in Training
93 posts since Jan 2004
Reputation Points: 41
Solved Threads: 2
 

you're trying to compile the mysql server yourself? huh?

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

No, attempting to compile PHP5 with both mysql and mysqli functions.

fsn812
Junior Poster in Training
93 posts since Jan 2004
Reputation Points: 41
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You