⬆️ ⬇️

Install and configure Intersystems Cache on RHEL to work with PHP

Here several times in discussions of alternative, non-relational DBMS, such DBMS as InterSystems Caché have already been mentioned. This is an industrial high-performance post-relational DBMS, which allows developers to use object, relational and direct access to data, the storage of which is provided by a transaction-oriented multidimensional DBMS core. This topic will help those who want to try it in action.



On off.sayte absolutely free, we can download the Evaluation version . Unfortunately, their website only supports IE 7+, FireFox 3+, or Safari 4+, so I couldn’t even log in to Chrome.







We select in the rpm format for the required platform. After downloading, we install completely completely:

rpm -ivh cache-server-2009.1.3.704.0su-1.rh5.x86_64.rpm

During the installation, nothing will be asked - nothing terrible, it should be so. After installation, a user and group cacheserver will be created, from which the cache will be launched. To test it immediately run:

/etc/init.d/cache start .

Having received joyful [OK], we will continue its setup. With Cache, the default is your pre-configured Apache, but we do not need it, we will customize ours.

I will not describe the installation of Apache with PHP, you can do this on a bunch of other manuals, but we definitely need the php-odbc module. Install if you still have it:

yum install php-odbc

Next, create the / usr / cacheodbc directory and load the ODBC driver into it from ftp://ftp.intersystems.com/pub/cache/odbc/

Install:

gunzip ODBC-5.2.329-lnxrhamd64.tar.Z

tar xvf ODBC-5.2.329-lnxrhamd64.tar

./ODBCinstall



After that, odbc.ini will appear in / usr / cacheodbc / mgr, they need to replace the empty /etc/odbc.ini.

Now move the necessary settings from /usr/cachesys/httpd/conf/httpd.conf to our /etc/httpd/conf/httpd.conf

To the module loading section:

CSPModulePath /usr/cachesys/csp/bin/

LoadModule csp_module_sa /usr/cachesys/csp/bin/CSPa22.so

AddHandler csp-handler-sa csp cls cxw zen





In addition, we will create a virtual host “cachesys” to administer Cache:

 <VirtualHost *: 80>
	 ServerName cachesys
	 DocumentRoot "/ usr / cachesys / csp"
	 ErrorLog "/var/log/httpd/cachesys-error.log"
	 CustomLog "/var/log/httpd/cachesys-access.log" common
	 Loglevel debug
	 <Location />
	     CSP On
	     SetHandler csp-handler-sa
	 </ Location>
	 <Location "/ csp / bin / Systems /">
	     SetHandler csp-handler-sa
	 </ Location>
	 <Location "/ csp / bin / RunTime /">
	     SetHandler csp-handler-sa
	 </ Location>
	 DirectoryIndex index.csp index.php index.html index.htm
 </ Virtualhost>


')

Now copy the /usr/cacheodbc/dev/odbc/samples/php/sample.php example into your directory and restart Apache.

Try control: cachesys / csp / sys / UtilHome.csp

cachesys

Try sample.php and enjoy :)

sample.php



_________



Source: https://habr.com/ru/post/83465/



All Articles