-
Notifications
You must be signed in to change notification settings - Fork 4
/
INSTALL.txt
113 lines (73 loc) · 3.61 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
NuoDB PHP PDO Driver install instructions
=========================================
The NuoDB PHP PDO Driver is supported on both Windows and Linux.
Linux Install
-------------
The NuoDB PHP PDO Driver is located in your NuoDB installation. You must manually install and configure the NuoDB PHP PDO Driver. There are two versions of the NuoDB PHP PDO Driver that is provided for Linux. In the directory /opt/nuodb/drivers/php_pdo you will find the following files:
INSTALL.txt <-- this file
php-5.3.NTS <-- contains NuoDB PHP PDO Driver for PHP version 5.3 Non Thread Safe
php-5.4.NTS <-- contains NuoDB PHP PDO Driver for PHP 5.4 Non Thread Safe
sample <-- contains an example program.
Note: If your PHP version does not match the provided versions, the source code is available on GitHub which you can use to build your own NuoDB PHP PDO Driver tat matches your particular version of PHP.
You should call the phpinfo() function to determine what version of PHP you are running. If you are using PHP from the command line, you can do the following command:
$ php -i | grep "PHP Version"
PHP Version => 5.3.10-1ubuntu3.6
$ php -i | grep "Thread Safety"
Thread Safety => disabled
If you are running PHP from a web server, create a phpinfo.php file that contains:
<?php
phpinfo();
?>
Put that file on your web server and browse it.
for:
32-bit Windows
64-bit Linux
The NuoDB PHP PDO Driver is a shared library that is dynamically loaded by the PHP executable. This shared library conforms to the PHP PDO extension API and must be copied to your PHP extension directory. If you don't know the location of your extension directory, then you can use the following command to find the location:
php -i | grep extension_dir
The NuoDB PHP PDO Driver shared library names are:
pdo_nuodb.so on Linux.
php_pdo_nuodb.dll on Windows.
There are two versions of the NuoDB PHP PDO Driver shared library for Windows. One that build using Microsoft Visual C++ 9 (MSVC9) compiler and another that was build using the Microsoft Visual C++ 10 (MSVC10) compiler. The MSVC9 one is located in:
C:\Program Files\NuoDB\drivers\php_pdo\vc9
The MSVC10 one is located in:
C:\Program Files\NuoDB\drivers\php_pdo\vc10
You should use the version that matches the MSVC compiler version of your PHP executable. To find out MSVC compiler version that was used to build your PHP executable, use the following command:
php -i | findstr Compiler
After you have copied the NuoDB PHP PDO driver to the extension directory, you need to modify your PHP configuration to automatically load the NuoDB PHP PDO driver when PHP runs. You can do this by adding the following line to your php.ini. On Linux:
extension=pdo_nuodb.so
On Windows:
extension=php_pdo_nuodb.dll
Checking the PDO driver
After you have modified your PHP configuration, you can check if the NuoDB PHP PDO driver is loading correctly with the following command:
php -i | grep PDO
Which should show 'nuodb' in the list of PDO drivers and should also show "PDO Driver for NuoDB => enabled".
Using the PDO driver
If you have run the NuoDB quick start (run-quickstart), then you can use the example.php script to display information from the example "hockey" database. Example execution output:
~/> php -c example.php
Array
(
[ID] => 2
[0] => 2
[NUMBER] => 11
[1] => 11
[NAME] => GREGORY CAMPBELL
[2] => GREGORY CAMPBELL
[POSITION] => Forward
[3] => Forward
[TEAM] => Bruins
[4] => Bruins
)
Array
(
[ID] => 25
[0] => 25
[NUMBER] => 1
[1] => 1
[NAME] => MAX SUMMIT
[2] => MAX SUMMIT
[POSITION] => Fan
[3] => Fan
[TEAM] => Bruins
[4] => Bruins
)
done