This is the first post for my tiny knowledge base. If you have any questions, please post it in the comments. Suggestion how to improve the knowledge base will be very usefull.
Requirements:
- installed PHP version;
- firebird database version;
1. install php-devel package (needed for phpize. If you already have phpize command, you don’t need it)
2. get the php source code for the exact version as you are running <– thats important, since some php-devel packages don’t include all the external packages
3. unpack the source and go to ext/interbase directory
4. run: phpize
5. run: ./configure –with-interbase=shared,/opt/firebird
6. run: make
7. this will create interbase.so module (most probably in .libs subdirectory)
8. Copy the interbase.so module to PHP’s module directory.
9. Restart apache server.
Point your browser to a php script containing phpinfo(); function. If you see the interbase section, everything went jussssst fine.
Please, post your comments
Regards.
Trackback URL
i have error after make:
/bin/sh /home/test/php-5.2.6/ext/interbase/libtool –mode=compile gcc -I. -I/home/test/php-5.2.6/ext/interbase -DPHP_ATOM_INC -I/home/test/php-5.2.6/ext/interbase/include -I/home/test/php-5.2.6/ext/interbase/main -I/home/test/php-5.2.6/ext/interbase -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/opt/firebird/include -DHAVE_CONFIG_H -g -O2 -c /home/test/php-5.2.6/ext/interbase/interbase.c -o interbase.lo
gcc -I. -I/home/test/php-5.2.6/ext/interbase -DPHP_ATOM_INC -I/home/test/php-5.2.6/ext/interbase/include -I/home/test/php-5.2.6/ext/interbase/main -I/home/test/php-5.2.6/ext/interbase -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/opt/firebird/include -DHAVE_CONFIG_H -g -O2 -c /home/test/php-5.2.6/ext/interbase/interbase.c -fPIC -DPIC -o .libs/interbase.o
In file included from /usr/include/php/main/php.h:33,
from /home/test/php-5.2.6/ext/interbase/interbase.c:29:
/usr/include/php/main/php_config.h:2250:1: warning: “_GNU_SOURCE” redefined
/home/test/php-5.2.6/ext/interbase/interbase.c:27:1: warning: this is the location of the previous definition
/home/test/php-5.2.6/ext/interbase/interbase.c:47: warning: parameter names (without types) in function declaration
/home/test/php-5.2.6/ext/interbase/interbase.c:184: error: ‘ibase’ undeclared here (not in a function)
/home/test/php-5.2.6/ext/interbase/interbase.c:184: error: initializer element is not constant
/home/test/php-5.2.6/ext/interbase/interbase.c:184: error: (near initialization for ‘ibase_module_entry.post_deactivate_func’)
/home/test/php-5.2.6/ext/interbase/interbase.c:185: error: initializer element is not constant
/home/test/php-5.2.6/ext/interbase/interbase.c:185: error: (near initialization for ‘ibase_module_entry.globals_id’)
/home/test/php-5.2.6/ext/interbase/interbase.c:186: warning: initialization makes integer from pointer without a cast
/home/test/php-5.2.6/ext/interbase/interbase.c:187: warning: initialization makes integer from pointer without a cast
/home/test/php-5.2.6/ext/interbase/interbase.c:188: warning: excess elements in struct initializer
/home/test/php-5.2.6/ext/interbase/interbase.c:188: warning: (near initialization for ‘ibase_module_entry’)
/home/test/php-5.2.6/ext/interbase/interbase.c:188: warning: excess elements in struct initializer
/home/test/php-5.2.6/ext/interbase/interbase.c:188: warning: (near initialization for ‘ibase_module_entry’)
/home/test/php-5.2.6/ext/interbase/interbase.c:189: warning: excess elements in struct initializer
/home/test/php-5.2.6/ext/interbase/interbase.c:189: warning: (near initialization for ‘ibase_module_entry’)
/home/test/php-5.2.6/ext/interbase/interbase.c: In function ‘PHP_GINIT_FUNCTION’:
/home/test/php-5.2.6/ext/interbase/interbase.c:458: error: invalid type argument of ‘->’
/home/test/php-5.2.6/ext/interbase/interbase.c:458: error: invalid type argument of ‘->’
/home/test/php-5.2.6/ext/interbase/interbase.c:459: error: invalid type argument of ‘->’
/home/test/php-5.2.6/ext/interbase/interbase.c:459: error: invalid type argument of ‘->’
/home/test/php-5.2.6/ext/interbase/interbase.c:460: error: invalid type argument of ‘->’
make: *** [interbase.lo] Error 1
[test@localhost interbase]$ /interbase.c:460: error: invalid type argument of ‘->’
-bash: /interbase.c:460:: No such file or directory
what operational system are you using? is this x86_64?