Op 31-jul-2007, om 22:17 heeft Jyrki Wahlstedt het volgende geschreven:
I don't know why but apache 2 has its own directory. So you have to add the following to your $PATH:
/opt/local/apache2/bin
And this must be put before /usr/sbin in the PATH, as otherwise the result remains the same …
To find out which version of an application is used you can use the following command. This prints the path to the application.
which apachectl
This command uses PATH, because of which the order is important!
Yes, that must be the problem, but how do I fix it? I made a new order like so: /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 and entered that in the terminal: 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 But even after a restart, the path is still in the wrong order: echo $PATH /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 /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 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: ----------------------------------------------------------- PATH="/opt/local/bin:/opt/local/sbin:/opt/local/lib/mysql5/bin:/usr/ local/bin:/bin:/sbin:/usr/bin:/usr/sbin" export PATH if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi ----------------------------------------------------------- Similarly, 'pico ~/.profile' produces: ----------------------------------------------------------- # # Your previous .profile (if any) is saved as .profile.dpsaved # Setting the path for DarwinPorts. export PATH=/opt/local/bin:/opt/local/sbin:$PATH ----------------------------------------------------------- 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. Elise van Looij