I had previously enabled the PHP module for Apache by editing nf in /etc/apache2. In the /etc directory, I renamed to php.ini, then added the following lines: extension=pdo_odbc.so With the extensions installed, I enabled them in php.ini. I built pdo_odbc.so similarly: $ cd ext/pdo_odbc At this point, I copied modules/odbc.so to /usr/lib/php/extensions/no-debug-non-zts-20100525. The environment variables work around what appear to be broken sections of the configure script. I built odbc.so with the following commands in the PHP source directory: $ cd ext/odbc Although you can download that version from a PHP mirror, I downloaded 5.6.26 to fix crashes in pdo_odbc. I downloaded autconf 2.69 from a GNU mirror, then built and installed it to /usr/local using configure and make as follows: $. The phpize utility used for building a PHP extension depends on GNU autoconf. I don't actually remember how I installed them, but I think I downloaded the source from, then copied the following header files to /usr/local/include: OS X ships with the iODBC libraries in /usr/lib, but not the headers. Alternatively, you can install Xcode from the Mac App Store. This opened a prompt that installed them to /Library/Developer. To get a C compiler, I installed the command line developer tools with a command like the following: $ xcode-select -install If you're comfortable coloring a little outside the lines (i.e., using sudo and the command line), you can build the odbc.so or pdo_odbc.so extension (depending on which API you prefer), and use it with Apple's version of Apache and PHP. Some people use Homebrew, MacPorts, or Fink to get their tools back. However, this support was removed in OS X 10.9: $ php -r 'phpinfo() ' |grep 'ODBC Support' I highly recommend giving it a try! Brand new to WordPress and looking to build a custom theme?Ĭheck out my complete series called How to Code HTML To WordPress.In OS X 10.8 and earlier, PHP was built with ODBC support, making it easy to connect to a Caché database: $ php -r 'phpinfo() ' |grep 'ODBC Support' There are tons of themes, settings, and plugins to use to help your workflow. You can find out more about this at which is a handy framework for configuring your shell environment. You can freely use this but in my own case I made use of an alternate configuration called. bash_profile file within your root directory. How To Edit Your PATH Environment Variables On Mac OS X.Add to the PATH on Mac OS X 10.8 Mountain Lion and up. ![]()
0 Comments
Leave a Reply. |