Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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
91127
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
91127
accept rate: 100%

Hi, I'm trying to do the same, but with SQLAnywhere 17 on High Sierra. And I'm using a non-MAMP apache (one installed with brew). Similar issues. I get the impression that the error message "The SQLAnywhere client libraries could not be loaded. Please ensure that libdbcapi.so can be found in your LD_LIBRARY_PATH environment variable." is slightly misleading in that it's really looking for libdbcapi.dylib

Here's my apachectl script config section. The output of printenv confirms that DYLD_LIBRARY_PATH=/Applications/SQLAnywhere17/System/lib64:/Applications/SQLAnywhere17/System/lib32:

But I still get the error shown in phpinfo....

# |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||
# --------------------                              --------------------
# 
# the path to your httpd binary, including options if necessary
HTTPD='/usr/local/opt/httpd/bin/httpd'
#
# pick up any necessary environment variables
if test -f /usr/local/opt/httpd/bin/envvars; then
  . /usr/local/opt/httpd/bin/envvars
else
. "/Applications/SQLAnywhere17/System/bin64/sa_config.sh"
fi
printenv
#
# a command that outputs a formatted text version of the HTML at the
# url given on the command line.  Designed for lynx, however other
# programs may work.  
LYNX="lynx -dump"
#
# the URL to your server's mod_status status page.  If you do not
# have one, then status and fullstatus will not work.
STATUSURL="http://localhost:8080/server-status"
#
# Set this variable to a command that increases the maximum
# number of file descriptors allowed per child process. This is
# critical for configurations that use many file descriptors,
# such as mass vhosting, or a multithreaded server.
ULIMIT_MAX_FILES=""
# --------------------                              --------------------
# ||||||||||||||||||||   END CONFIGURATION SECTION  ||||||||||||||||||||
permanent link

answered 18 Feb '19, 14:45

alexlake's gravatar image

alexlake
1317917
accept rate: 11%

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:

×95
×70
×31

question asked: 21 Oct '14, 11:28

question was seen: 4,593 times

last updated: 18 Feb '19, 14:45