Hello everybody! Today I'm trying to install php module of SQL Anywhere on MAMP for Mac OS X. I'm currently on Mac OS X 10.10 Yosemite, MAMP 3.0.7.1, php 5.5.17 and SQLAnywhere 16 Developer Edition. As guide I have followed Phil Mitchell post on this thread, but instead of download the module 2.0.10, I used version 2.0.12. For phpize and php instructions I have used the path of MAMP: /Applications/MAMP/bin/php/php5.5.17/. The output of my

/Applications/MAMP/bin/php/php5.5.17/bin/php --info | grep -i sqlanywhere

is:

sqlanywhere
SQLAnywhere support => enabled
PHP SQLAnywhere driver version => 2.0.12.0
SQLAnywhere client version => The SQLAnywhere client libraries could not be loaded. Please ensure that libdbcapi.so can be found in your LD_LIBRARY_PATH environment variable.
sqlanywhere.allow_persistent => On => On
sqlanywhere.auto_commit => On => On
sqlanywhere.max_connections => Unlimited => Unlimited
sqlanywhere.max_persistent_connections => Unlimited => Unlimited
sqlanywhere.verbose_errors => On => On

So in Terminal app with

nano /Applications/MAMP/Library/bin/envvars_

I changed the environment variables of Apache in this manner:

if test "x$DYLD_LIBRARY_PATH" != "x" ; then
  DYLD_LIBRARY_PATH="/Applications/SQLAnywhere16/System/lib64:/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
else
  DYLD_LIBRARY_PATH="/Applications/SQLAnywhere16/System/lib64:/Applications/MAMP/Library/lib"
fi
export DYLD_LIBRARY_PATH

Then, to be sure, I reboot my Mac. Once rebooted I restarted MAMP but phpinfo shows always

The SQLAnywhere client libraries could not be loaded. Please ensure that libdbcapi.so can be found in your LD_LIBRARY_PATH environment variable.

Someone can help me please? I need this module at work! In another Mac I've already set up the php module but there the module is installed on the Apache built in with Snow Leopard Server and when I changed "/System/Library/LaunchDaemons/org.apache.httpd.plist" as decribed in another post (written always by Phil Mitchell in this thread) evreything works fine. Thank you all guys! I appreciate any help possible!

asked 21 Oct '14, 11:28

AndreW13's gravatar image

AndreW13
76127
accept rate: 100%


Finally now it works! Thanks to this post on Stack Overflow I understand the problem...MAMP don't start Apache if exist envvars file since Mac OS X Yosemite Beta 5, so the developers have changed its name from "envvars" to "envvars_" to disable it. For now the only method to activate SQL Anywhere php module in Mac OS X Yosemite and MAMP, once compiled as described in my precedent post, is to modify "apachectl" file in this manner:

# pick up any necessary environment variables
if test -f /Applications/MAMP/Library/bin/envvars; then
  . /Applications/MAMP/Library/bin/envvars
else
. "/Applications/SQLAnywhere16/System/bin64/sa_config.sh"
fi

Thank you guys, to next issue!

permanent link

answered 22 Oct '14, 09:44

AndreW13's gravatar image

AndreW13
76127
accept rate: 100%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×85
×47
×24

question asked: 21 Oct '14, 11:28

question was seen: 1,514 times

last updated: 22 Oct '14, 09:44