<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: MAMP, PHP module and LD_LIBRARY_PATH error on OS X in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/mamp-php-module-and-ld-library-path-error-on-os-x/qaa-p/13845953#M4876796</link>
    <description>&lt;P&gt;Finally now it works! Thanks to &lt;A href="http://stackoverflow.com/questions/25139599/mamp-pro-3-05-on-mavericks-updated-to-yosemite-apache-does-not-start"&gt;this post&lt;/A&gt; 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:&lt;/P&gt;
&lt;PRE class="codehilite"&gt;&lt;CODE&gt;# 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


&lt;P&gt;Thank you guys, to next issue! &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 22 Oct 2014 09:44:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-10-22T09:44:53Z</dc:date>
    <item>
      <title>MAMP, PHP module and LD_LIBRARY_PATH error on OS X</title>
      <link>https://community.sap.com/t5/technology-q-a/mamp-php-module-and-ld-library-path-error-on-os-x/qaq-p/13845952</link>
      <description>&lt;P&gt;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 &lt;A href="http://sqlanywhere-forum.sap.com/questions/4691/php-warning-php-startup-unable-to-load-dynamic-library" target="_blank"&gt;thread&lt;/A&gt;, 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 &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;/Applications/MAMP/bin/php/php5.5.17/bin/php
--info | grep -i sqlanywhere&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;is:&lt;/P&gt;
&lt;PRE class="codehilite"&gt;&lt;CODE&gt;sqlanywhere
SQLAnywhere support =&amp;gt; enabled
PHP SQLAnywhere driver version =&amp;gt; 2.0.12.0
SQLAnywhere client version =&amp;gt; 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 =&amp;gt; On =&amp;gt; On
sqlanywhere.auto_commit =&amp;gt; On =&amp;gt; On
sqlanywhere.max_connections =&amp;gt; Unlimited =&amp;gt; Unlimited
sqlanywhere.max_persistent_connections =&amp;gt; Unlimited =&amp;gt; Unlimited
sqlanywhere.verbose_errors =&amp;gt; On =&amp;gt; On


&lt;P&gt;So in Terminal app with &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;nano
/Applications/MAMP/Library/bin/envvars_&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I changed the environment variables of Apache in this manner: &lt;/P&gt;
&lt;/CODE&gt;&lt;PRE class="codehilite"&gt;&lt;CODE&gt;&lt;CODE&gt;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


&lt;P&gt;Then, to be sure, I reboot my Mac. Once rebooted I restarted MAMP but phpinfo shows always &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The SQLAnywhere client libraries could
not be loaded. Please ensure that
libdbcapi.so can be found in your
LD_LIBRARY_PATH environment variable.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;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 &lt;A href="http://sqlanywhere-forum.sap.com/questions/5831/php-module-for-osx" target="_blank"&gt;thread&lt;/A&gt;) evreything works fine.
Thank you all guys!
I appreciate any help possible!&lt;/P&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Oct 2014 11:28:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mamp-php-module-and-ld-library-path-error-on-os-x/qaq-p/13845952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-10-21T11:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: MAMP, PHP module and LD_LIBRARY_PATH error on OS X</title>
      <link>https://community.sap.com/t5/technology-q-a/mamp-php-module-and-ld-library-path-error-on-os-x/qaa-p/13845953#M4876796</link>
      <description>&lt;P&gt;Finally now it works! Thanks to &lt;A href="http://stackoverflow.com/questions/25139599/mamp-pro-3-05-on-mavericks-updated-to-yosemite-apache-does-not-start"&gt;this post&lt;/A&gt; 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:&lt;/P&gt;
&lt;PRE class="codehilite"&gt;&lt;CODE&gt;# 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


&lt;P&gt;Thank you guys, to next issue! &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Oct 2014 09:44:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mamp-php-module-and-ld-library-path-error-on-os-x/qaa-p/13845953#M4876796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-10-22T09:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: MAMP, PHP module and LD_LIBRARY_PATH error on OS X</title>
      <link>https://community.sap.com/t5/technology-q-a/mamp-php-module-and-ld-library-path-error-on-os-x/qaa-p/13845954#M4876797</link>
      <description>&lt;P&gt;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&lt;/P&gt;
&lt;P&gt;Here's my apachectl script config section. The output of printenv confirms that DYLD_LIBRARY_PATH=/Applications/SQLAnywhere17/System/lib64:/Applications/SQLAnywhere17/System/lib32:&lt;/P&gt;
&lt;P&gt;But I still get the error shown in phpinfo.... &lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;# |||||||||||||||||||| 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="&lt;A href="http://localhost:8080/server-status&amp;quot;"&gt;http://localhost:8080/server-status"&lt;/A&gt;
#
# 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  ||||||||||||||||||||
&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Feb 2019 14:45:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/mamp-php-module-and-ld-library-path-error-on-os-x/qaa-p/13845954#M4876797</guid>
      <dc:creator>former_SQLA_member1694906</dc:creator>
      <dc:date>2019-02-18T14:45:32Z</dc:date>
    </item>
  </channel>
</rss>

