You must establish a connection with the database access - * mdb. On the local machine with Windows on board - everything is fine, resists on CentOS. I have - php version 7.1.26 with the following installed modules:
[PHP Modules] apcu bz2 calendar Core ctype curl date dom exif fileinfo filter ftp gd geoip gettext hash iconv json ldap libxml mbstring mcrypt memcache mysqli mysqlnd odbc openssl pcntl pcre PDO pdo_dblib pdo_mysql PDO_ODBC pdo_sqlite Phar posix pspell readline Reflection rrd session shmop SimpleXML sockets SPL sqlite3 standard sysvmsg sysvsem sysvshm tokenizer wddx xdebug xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Xdebug Zend OPcache I execute a simple script to create a table:
<? $dbName = $_SERVER["DOCUMENT_ROOT"] . "/_dump/Rcc_db.mdb"; if (!file_exists($dbName)) { die("Could not find database file."); } // Microsoft Access $connect = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$dbName", '', ''); $query = "SELECT * FROM RIR"; $result = odbc_exec($connect, $query) or die("Couldn't execute query!"); $res=odbc_exec($connect,"create table test (f1 integer, f2 varchar(10))"); $res=odbc_exec($connect,"insert into test (f1,f2) values(1,'qwerty')"); $res=odbc_exec($connect,"insert into test (f1,f2) values(2,'asdfgh')"); ?> Nothing happens, it is created on the local, not on the server. Please tell me where to dig. PS displays "Could not execute query!" from request. Attributes on the base - 777.
MS Access Driverwhat do you have in the system? - teran