msphpsql: conn.lo error
First time installation for sqlsrv and pdo_sqlsrv
using microsoft azure sql server
using rasparian (Debian 8)
php 7.0
im receiving conn.lo error
In file included from /usr/include/sql.h:19:0, from /tmp/pear/temp/sqlsrv/shared/xplat.h:30, from /tmp/pear/temp/sqlsrv/shared/typedefs_for_linux.h:23, from /tmp/pear/temp/sqlsrv/shared/xplat_winnls.h:24, from /tmp/pear/temp/sqlsrv/shared/FormattedPrint.h:24, from /tmp/pear/temp/sqlsrv/shared/core_sqlsrv.h:41, from /tmp/pear/temp/sqlsrv/php_sqlsrv.h:25, from /tmp/pear/temp/sqlsrv/conn.cpp:20: /usr/include/sqltypes.h:251:33: note: previous declaration as 'typedef long unsigned int UDWORD' typedef unsigned long int UDWORD; ^ Makefile:194: recipe for target 'conn.lo' failed
The so should install but instead it shows code error.
When run this sudo pecl install sqlsrv pdo_sqlsrv command
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (7 by maintainers)
I got the same error that @marufmax got, just remember to install
After that, it worked. !
As @david-puglielli stated above
when I changed SIZEOF_LONG_INT to 8 in the file /usr/include/unixodbc_conf.h
It compiled successfully!
thanks … I install this and try install SQLSRV again and it works …
Your header file defines
SIZEOF_LONG_INTas 4.SIZEOF_LONG_INTis then used in sqltypes.h to typedef unsigned long asDWORD, but the sqlsrv source typedefs unsigned int asDWORD, and these conflict because unsigned long is 8 bytes on your system and unsigned int is 4 bytes.SIZEOF_LONG_INTshould be 8. I suspect you installed unixODBC manually with certain configure flags - can you provide the commands you used to install unixODBC?The PHP drivers used to require a specific set of configure options relating to type lengths when building unixODBC, but that is no longer the case and the packaged unixODBC from apt works. If you do not specifically need to manually compile unixODBC for some other application, it would be easiest to remove it from your system and reinstall using
apt-get install unixodbc.