FirebirdSQL / php-firebird

Firebird PHP driver
Other
66 stars 15 forks source link

Undeclared identifier errors #9

Closed KKSzymanowski closed 3 years ago

KKSzymanowski commented 3 years ago

Hi,

I'm trying to compile this extension on MacOS 11.0.1 (Big Sur) for PHP 7.4 and I'm running some compilation errors namely undefined identifiers SQL_BOOLEAN and blr_bool.

/Users/jakub/Code/php-firebird/ibase_query.c:245:22: error: use of undeclared identifier 'blr_bool'
                case blr_bool:
                     ^
/Users/jakub/Code/php-firebird/ibase_query.c:246:34: error: use of undeclared identifier 'SQL_BOOLEAN'
                    a->el_type = SQL_BOOLEAN;
                                 ^
/Users/jakub/Code/php-firebird/ibase_query.c:584:22: error: use of undeclared identifier 'SQL_BOOLEAN'
                case SQL_BOOLEAN:
                     ^
/Users/jakub/Code/php-firebird/ibase_query.c:776:18: error: use of undeclared identifier 'SQL_BOOLEAN'
            case SQL_BOOLEAN:
                 ^
/Users/jakub/Code/php-firebird/ibase_query.c:781:32: error: use of undeclared identifier 'SQL_BOOLEAN'
                var->sqltype = SQL_BOOLEAN;
                               ^
/Users/jakub/Code/php-firebird/ibase_query.c:869:18: error: use of undeclared identifier 'SQL_BOOLEAN'
            case SQL_BOOLEAN:
                 ^
/Users/jakub/Code/php-firebird/ibase_query.c:1373:14: error: use of undeclared identifier 'SQL_BOOLEAN'
        case SQL_BOOLEAN:
             ^
/Users/jakub/Code/php-firebird/ibase_query.c:1972:18: error: use of undeclared identifier 'SQL_BOOLEAN'
            case SQL_BOOLEAN:
                 ^
/Users/jakub/Code/php-firebird/ibase_query.c:1999:18: error: use of undeclared identifier 'SQL_BOOLEAN'
            case SQL_BOOLEAN:
                 ^

Do you know how can I solve this? I've ran following commands:

git clone https://github.com/FirebirdSQL/php-firebird.git
cd php-fireberd
phpize
CPPFLAGS="-I/Library/Frameworks/firebird.framework/Versions/A/Headers" ./configure
make
AlexPeshkoff commented 3 years ago

On 12/7/20 3:34 PM, Kuba Szymanowski wrote:

Hi,

I'm trying to compile this extension on MacOS 11.0.1 (Big Sur) for PHP 7.4 and I'm running some compilation errors namely undefined identifiers |SQL_BOOLEAN| and |blr_bool|.

|/Users/jakub/Code/php-firebird/ibase_query.c:245:22: error: use of undeclared identifier 'blr_bool' case blr_bool: ^ /Users/jakub/Code/php-firebird/ibase_query.c:246:34: error: use of undeclared identifier 'SQL_BOOLEAN' a->el_type = SQL_BOOLEAN; |

Almost for sure that means very old (from fb 2.1) ibase.h.

KKSzymanowski commented 3 years ago

I'm using Firebird 2.5 because that's what the client has installed. Do you know if the Firebird 3.0 driver would work when connecting to Firebird 2.5 database?

mrotteveel commented 3 years ago

@KKSzymanowski The Firebird 3 driver can connect just fine to Firebird 2.5 and older (assuming use of TCP/IP).

KKSzymanowski commented 3 years ago

Ok, I'll try the newer driver and post any progress here. Thanks for quick responses.

KKSzymanowski commented 3 years ago

It worked with Firebird 3. Turned out it was not what I needed and I had to compile pdo_firebird extension found in PHP source code but nevertheless thanks for the support.