Skip to content

Commit c3c5538

Browse files
committed
Updated instructions for Linux/Debian. Slightly reformatted.
1 parent d6f764e commit c3c5538

File tree

1 file changed

+52
-63
lines changed

1 file changed

+52
-63
lines changed

Readme.md

Lines changed: 52 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -17,79 +17,68 @@ Installation Instructions
1717

1818
The assumption is that PHP is already installed and configured on the machine where the OData SDK for PHP is installed.
1919
The SDK does not have any dependency on the host OS so it can run on Windows, Linux or Mac OSX machines.
20+
The instructions below are written for Debian (verified for on Jessie / 8.1).
2021

21-
1. Create a folder named, for instance, 'ODataphp' eg: C:\PHPLib\ODataphp
22+
1. Create a folder that should contian the SDK, for instance, ```/usr/local/lib/php5/odataphp```.
23+
2. Copy the all files and folders in the SDK to the folder created above.
24+
In particular, the folder ```/usr/local/lib/php5/odataphp/framework``` should have the
25+
content seen at bottom of this file (in the directory structure section).
26+
3. Add the path to the framework folder (created in step 1/2) to the 'include_path' directive in php.ini e.g.
2227

23-
2. Copy the files and folders in the framework folder to the folder created above. Now your 'ODataphp' look like below:
28+
```
29+
include_path = ".:/usr/local/lib/php5/odataphp/framework"
30+
```
31+
4. Create a variable called 'ODataphp_path' in the php.ini file and set it to the
32+
path where the OData SDK for PHP was installed (step 1).
33+
Open php.ini and search for 'Paths and Directories' section. Just below the definition
34+
of 'include_path' directive, add the following two lines:
2435

25-
C:\PHPLib\ODataphp
26-
------------------------
27-
|
28-
|--- PHPDataSvcUtil.php
29-
|--- Azure
30-
|--- Common
31-
|--- Context
32-
|--- Credential
33-
|--- Exception
34-
|--- Extras
35-
|--- Interfaces
36-
|--- Parser
37-
|--- Resource
38-
|--- WebUtil
39-
40-
41-
3. Add the path to the folder created in step 1 to the 'include_path' directive in php.ini
42-
e.g.
43-
include_path = ".;C:\PHPLib\ODataphp"
44-
45-
4. Create a variable called 'ODataphp_path' in the php.ini file and set it to the path where the OData toolkit for PHP was installed (step 1).
46-
Open php.ini and search for 'Paths and Directories' section. Just below the definition of 'include_path' directive, add the following two lines:
47-
;OData toolkit for PHP Library Path
48-
ODataphp_path = "C:\PHPLib\ODataphp"
49-
50-
5. On Linux platform, make sure you have the php-xml module installed. This can be installed using yum as follows,
51-
yum install php-xml
52-
53-
6. Enable php_xsl.dll in php.ini.
54-
Search for 'extension=php_xsl.dll' in the php.ini file and remove the semicolon (;) in front.
55-
56-
7. Enable php_curl.dll in php.ini.
57-
Search for 'extension=php_curl.dll' in the php.ini file and remove the semicolon (;) in front.
36+
```
37+
; OData SDK for PHP Library Path
38+
ODataphp_path = "/usr/local/lib/php5/odataphp/framework"
39+
```
40+
5. Make sure you that the curl, xml and xsl modules are installed and enabled in PHP.
41+
In Deian the xml module is always included in PHP. The curl and xsl modules can be
42+
installed (and enabled) using apt-get as follows,
5843

44+
```
45+
apt-get install php5-curl php5-xsl
46+
```
5947
6048
Usage Instructions
6149
==================
6250
After the installation is completed, you can generate the proxy class for any OData Service
63-
that you want to connect to. Documentation on how to use the OData toolkit for PHP can be found in the User Manual
64-
document under the \docs directory.
51+
that you want to connect to. Documentation on how to generate the proxy class and use the SDK
52+
can be found in the User Manual document under the docs directory,
53+
e.g. ```/usr/local/lib/php5/odataphp/doc/User_Guide.htm```.
54+
55+
In addition it is probably useful to look at the samples located in ```/usr/local/lib/php5/odataphp/samples```.
6556

66-
Directorty Structure
67-
====================
57+
Directorty Structure for the framework folder
58+
=============================================
6859

6960
```
70-
|-- PHPDataSvcUtil.php [Proxy generation tool]
61+
|- PHPDataSvcUtil.php [Proxy generation tool]
62+
|
63+
|-- Azure [contain files for using OData toolkit library aganist Windows Azure tables]
64+
|
65+
|-- Common [contains commonly used class definition files for dictionary, collection,
66+
| guid, http proxy, reflection helper.Utility classes for Azure ACS and Azure
67+
| Table authentication and xsl file for code generation]
68+
|
69+
|-- Context [Contains class definition files for context tracking, AtomPub generation,
70+
| query and stream processing files]
71+
|
72+
|-- Exception [Contains class definition files for exceptions]
73+
|
74+
|-- Extras [Contains class definition files for OData Service editor]
75+
|
76+
|-- Interfaces [interface definitions]
77+
|
78+
|-- Parser [AtomPub parser]
79+
|
80+
|-- Resource [Resource file]
81+
|
82+
|-- WebUtil [Utility files for handling normal and batch http request-response]
7183
|
72-
|-- framework
73-
|
74-
|--Azure [contain files for using OData toolkit library aganist Windows Azure tables]
75-
|
76-
|--Common [contains commonly used class definition files for dictionary, collection,
77-
| guid, http proxy, reflection helper.Utility classes for Azure ACS and Azure
78-
| Table authentication and xsl file for code generation]
79-
|
80-
|--Context [Contains class definition files for context tracking, AtomPub generation,
81-
| query and stream processing files]
82-
|
83-
|--Exception [Contains class definition files for exceptions]
84-
|
85-
|--Extras [Contains class definition files for OData Service editor]
86-
|
87-
|--Interfaces [interface definitions]
88-
|
89-
|--Parser [AtomPub parser]
90-
|
91-
|--Resource [Resource file]
92-
|
93-
|--WebUtil [Utility files for handling normal and batch http request-response]
94-
|
9584
```

0 commit comments

Comments
 (0)