<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Op 31-jul-2007, om 22:17 heeft Jyrki Wahlstedt het volgende geschreven:</DIV><BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 10px; ">I don't know why but apache 2 has its own directory. So you have to add</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 10px; ">the following to your $PATH:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 10px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR style=""></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 10px; ">/opt/local/apache2/bin</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 10px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR style=""></DIV></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">And this must be put before /usr/sbin in the PATH, as otherwise the result remains the same …</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR style=""></DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 10px; ">To find out which version of an application is used you can use the</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 10px; ">following command. This prints the path to the application.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 10px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR style=""></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 10px; ">which apachectl</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 10px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR style=""></DIV></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">This command uses PATH, because of which the order is important!</DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Yes, that must be the problem, but how do I fix it? I made a new order like so:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>/opt/local/bin:</DIV><DIV>/opt/local/sbin:</DIV><DIV>/opt/local/apache2/bin:</DIV><DIV>/opt/local/bin/mysql5:</DIV><DIV>/opt/local/lib/mysql5/bin:</DIV><DIV>/opt/local/lib/mysql5/bin/mysql:</DIV><DIV>/opt/local/lib/mysql5/bin/mysqladmin:</DIV><DIV>/bin:</DIV><DIV>/sbin:</DIV><DIV>/usr/bin:</DIV><DIV>/usr/local/bin:</DIV><DIV>/usr/local/mysql/bin:</DIV><DIV>/usr/sbin</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>and entered that in the terminal:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>export PATH=/opt/local/bin:/opt/local/sbin:/opt/local/apache2/bin:/opt/local/bin/mysql5:/opt/local/lib/mysql5/bin:/opt/local/lib/mysql5/bin/mysql:/opt/local/lib/mysql5/bin/mysqladmin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/sbin</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>But even after a restart, the path is still in the wrong order:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>echo $PATH</DIV><DIV>/opt/local/lib/mysql5/bin/mysql:/opt/local/bin/mysql5:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/opt/local/lib/mysql5/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/local/bin:/opt/local/lib/mysql5/bin/mysqladmin:/opt/local/lib/mysql5/bin/mysql</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>/opt/local/lib/mysql5/bin/mysql;</DIV><DIV>/opt/local/bin/mysql5;</DIV><DIV>/usr/local/mysql/bin;</DIV><DIV>/opt/local/bin;</DIV><DIV>/opt/local/sbin;</DIV><DIV>/opt/local/lib/mysql5/bin;</DIV><DIV>/usr/local/bin;</DIV><DIV>/bin;</DIV><DIV>/sbin;</DIV><DIV>/usr/bin;</DIV><DIV>/usr/sbin;</DIV><DIV>/opt/local/bin;</DIV><DIV>/opt/local/lib/mysql5/bin/mysqladmin;</DIV><DIV>/opt/local/lib/mysql5/bin/mysql</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I don't quite understand how this comes about: I'm not even sure where many of these values come from. Based on what I've googled, I gather that these variables are specified in the system and user profile files. But if I ask 'pico /etc/profile', I get:</DIV><DIV>-----------------------------------------------------------</DIV><DIV>PATH="/opt/local/bin:/opt/local/sbin:/opt/local/lib/mysql5/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin"</DIV><DIV>export PATH</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>if [ "${BASH-no}" != "no" ]; then</DIV><DIV> [ -r /etc/bashrc ] && . /etc/bashrc</DIV><DIV>fi</DIV><DIV>-----------------------------------------------------------</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Similarly, 'pico ~/.profile' produces:</DIV><DIV>-----------------------------------------------------------</DIV><DIV>#</DIV><DIV># Your previous .profile (if any) is saved as .profile.dpsaved</DIV><DIV># Setting the path for DarwinPorts.</DIV><DIV>export PATH=/opt/local/bin:/opt/local/sbin:$PATH</DIV><DIV>-----------------------------------------------------------</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>So that should ensure that the /opt/local/bin path always comes first, right? Your help is greatly appreciated: UNIX for Dummies (3rd edition) is not much help here.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><BR class="Apple-interchange-newline"><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Elise van Looij</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN></SPAN> </DIV><BR></BODY></HTML>