oci

libaio.so.1: cannot open shared object file

时光毁灭记忆、已成空白 提交于 2019-12-03 06:34:43
问题 I have a simple test program that when I run I get: ./hello: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory I link it like this: $(CC) $(CCFLAGS) -o hello hello.o -L../ocilib-3.9.3/src/.libs -L../instantclient_11_2 -locilib My LD_LIBRARY_PATH contains this: LD_LIBRARY_PATH=../ocilib-3.9.3/src/.libs:../instantclient_11_2:/usr/lib /usr/lib looks like this: Linux$ ls -l /usr/lib/libaio* lrwxrwxrwx 1 root root 15 Nov 5 2008 /usr/lib

Connecting to Oracle DB using Ruby

╄→гoц情女王★ 提交于 2019-12-03 01:32:29
I am stuck with connecting to Oracle DB, have read lots of stuff but no help on result. I have remote Oracle DB, I am connecting to it using DBVisualizer setting connection like this: DB Type : Oracle Driver (jdbc) : Oracle thin Database URL: jdbc:oracle:thin:@10.10.100.10:1521/VVV.LOCALDOMAIN UserIdf: SomeUser Pass: SomePass Connection works ok. What I do in Ruby is : require 'oci8' require 'dbi' ... conn = OCI8.new('SomeUser','SomePass','//10.10.100.10:1521/VVV.LOCALDOMAIN') ... What I get is: ORA-12545: Connect failed because target host or object does not exist oci8.c:360:in oci8lib.so

libaio.so.1: cannot open shared object file

喜欢而已 提交于 2019-12-02 20:07:40
I have a simple test program that when I run I get: ./hello: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory I link it like this: $(CC) $(CCFLAGS) -o hello hello.o -L../ocilib-3.9.3/src/.libs -L../instantclient_11_2 -locilib My LD_LIBRARY_PATH contains this: LD_LIBRARY_PATH=../ocilib-3.9.3/src/.libs:../instantclient_11_2:/usr/lib /usr/lib looks like this: Linux$ ls -l /usr/lib/libaio* lrwxrwxrwx 1 root root 15 Nov 5 2008 /usr/lib/libaio.so.1 -> libaio.so.1.0.1 -rwxr-xr-x 1 root root 2632 Sep 16 2005 /usr/lib/libaio.so.1.0.0 -rwxr-xr

Creating a function to grab data from an Oracle database (array by ID)

强颜欢笑 提交于 2019-12-02 11:27:29
问题 I'm trying to create a function that will simply allow me to pass an SQL statement into it, and it will generate an array based on a unique ID I pass it: function oracleGetGata($query, $id="id") { global $conn; $sql = OCI_Parse($conn, $query); OCI_Execute($sql); OCI_Fetch_All($sql, $results, null, null, OCI_FETCHSTATEMENT_BY_ROW); return $results; } For example I'd like this query $array = oracleGetData('select * from table') to return something like: [1] => Array ( [Title] => Title 1

PHP7.0 - unable to load dynamic library oci8.so (Ubuntu)

半城伤御伤魂 提交于 2019-12-02 08:25:11
After following the install instructions for oracle instant client, php is not able to load the oci8 extension. http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst I am getting an error. PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/oci8.so' - libmql1.so: cannot open shared object file: No such file or directory in Unknown on line 0 I have verified both oci8.so and libmql1.so locations. Am I missing something? I'm using Ubuntu 16.04 and php version 7.1 There are few directories in /usr/lib/php/ for example 20131226 for php5.6

Creating a function to grab data from an Oracle database (array by ID)

心不动则不痛 提交于 2019-12-02 05:57:55
I'm trying to create a function that will simply allow me to pass an SQL statement into it, and it will generate an array based on a unique ID I pass it: function oracleGetGata($query, $id="id") { global $conn; $sql = OCI_Parse($conn, $query); OCI_Execute($sql); OCI_Fetch_All($sql, $results, null, null, OCI_FETCHSTATEMENT_BY_ROW); return $results; } For example I'd like this query $array = oracleGetData('select * from table') to return something like: [1] => Array ( [Title] => Title 1 [Description] => Description 1 ) [2] => Array ( [Title] => Title 2 [Description] => Description 2 ) [3] =>

oci_bind_by_name doesn't work with LIKE clause

不想你离开。 提交于 2019-12-02 04:27:19
问题 My code is something like this: $s = ociparse($conn, "SELECT u.email, u.city FROM tickets t, users u WHERE t.userId = u.userId AND u.city LIKE '%:city%'"); $city = $_GET['city']; oci_bind_by_name($s, ":city", $city); Apparently, it can't replace the ":city" The warning I get: Warning: oci_bind_by_name(): ORA-01036: illegal variable name/number in C:\xampp\htdocs\phpOracle\tickets.php on line 41 回答1: You need to bind it like this, you have to concatenate the % signs with it and you cannot have

Oracle 11.1.0.7 and WAMP oci_connect failure

帅比萌擦擦* 提交于 2019-12-02 01:29:07
问题 I'm trying to configure a simple connection between my local WAMP server and some Oracle 11.1.0.7 I have. Apparently PHP has all sorts of solutions and magic situations where it fails to start. I'm running the latest 32bit version from WAMP (I fetched it today again just to check) The db machine is also 32bit, not local here are my attempts in connecting to the database, everytime I got the same error : $db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = some.ip.addr)(PORT

oci_bind_by_name doesn't work with LIKE clause

▼魔方 西西 提交于 2019-12-01 23:04:29
My code is something like this: $s = ociparse($conn, "SELECT u.email, u.city FROM tickets t, users u WHERE t.userId = u.userId AND u.city LIKE '%:city%'"); $city = $_GET['city']; oci_bind_by_name($s, ":city", $city); Apparently, it can't replace the ":city" The warning I get: Warning: oci_bind_by_name(): ORA-01036: illegal variable name/number in C:\xampp\htdocs\phpOracle\tickets.php on line 41 You need to bind it like this, you have to concatenate the % signs with it and you cannot have your bound variable wrapped in single quotes: $s = ociparse($conn, "SELECT u.email, u.city FROM tickets t,

PHP, IIS, Oracle (OCI) not working

烂漫一生 提交于 2019-12-01 14:29:30
We are migrating from a Windows SBS 2011 to Windows Server 2012 R2. We have an internal website that connects to our Oracle database using PHP. I am trying to migrate this to the new server and so far I have: Installed IIS Server Role Installed PHP Downloaded Oracle Instant Client to C:\instantclient Added C:\instantclient to PATH System Variable Added php_oci8.dll to php.ini and checked that PHP is actually using this php.ini Restarted server I am still getting error messages like oci_ commands not being recognised etc. I'm lost. I've searched online and the instructions match what I have