-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparams.json
More file actions
1 lines (1 loc) · 2.79 KB
/
params.json
File metadata and controls
1 lines (1 loc) · 2.79 KB
1
{"name":"sybase.php.howto","tagline":"Page explaining simple steps to provide connectivity between PHP and Sybase or SQL Anywhere databases","body":"### Foreword\r\nI decided to write this howto, because it took me some time to configure php to work with Sybase trying many approaches from php documentation and tutorials on the web. . What I present here is just one way of doing things, there are alternatives to that, but IMHO it's the least troublesome way (no module compiling, no strange dependencies etc.). Note that as a result you will be using sqlanywhere module for PHP by SAP company that provides compiled modules for all PHP versions > 5.1. It's not the sybase_ct module present in PHP documentation, but it provides all functionalities for interacting with the database.\r\n\r\n### Background\r\nThis tutorial has following assumptions:\r\n\r\n1. There's a need to connect to Sybase/SQL Anywhere database version 9 or above.\r\n1. The database is on a remote server.\r\n1. The connection is made from a Linux server running Apache 2+ and PHP 5.1+ using mod_php.\r\n\r\nFollowing configuration was tested for RHEL Linux, but you should be able top use it on any Linux distribution. It should also be applicable to MacOS and Windows+Apache+PHP configuration.\r\n\r\n### The Steps\r\n1. Make sure you have Apache and PHP installed and configured properly.\r\n1. Download the SQL Anywhere Database Client from _SQL Anywhere Database Client Download_ page (http://www.sybase.com/detail?id=1087327) selecting your platform.\r\n1. Unpack the archive\r\n1. From the clientxxxx directory (where xxxx is client version number) run setup script.\r\n1. You can leave all questions on their defaults (the client package will be installed in /opt/sqlanywhere12).\r\n1. Add this line to your httpd configuration script (on RHEL/CentOS/Fedora this is _/etc/sysconfig/httpd_).\r\n`source /opt/sqlanywhere12/bin32/sa_config.sh`\r\nIt will provide proper paths to SQLAnywhere libraries.\r\n1. Download appropriate compiled php module for your plaftorm and PHP version from _The SAP Sybase SQL Anywhere PHP Module_ page (http://scn.sap.com/docs/DOC-40537).\r\n1. Copy the module to php modules directory (on RHEL/CentOS/Fedora this it's _/usr/lib/php/modules_, check phpinfo() output or php.ini script to see where your modules are stored.\r\n1. Add configuration entry to load the module (on RHEL/CentOS/Fedora run `echo \"extension=php-5.x.x_sqlanywhere_r.so\" > /etc/php.d/sqlanywhere.ini`)\r\n1. Restart httpd service.\r\n\r\nYou should now be able to see the **sqlanywhere** section in your phpinfo() output.\r\n\r\n### Further reading\r\n\r\nFor code examples and API reference check http://dcx.sybase.com/index.html#1201/en/dbprogramming/php-support.html","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}