Php-module for apache - start server

Ryan Schmidt macports-2006d at ryandesign.com
Sun Oct 22 11:10:49 PDT 2006


On Oct 22, 2006, at 07:57, Ulrich Wiederhold wrote:

> I am very new with macs but I need to install zoph (www.nother.net)  
> on my
> imac (Intel CPU).
>
> For this I need new apache, php and more. So I installed darwin| 
> macports
> 1.3.2 and php5 and apache2.2.
>
> 1. How do I get a php5 Module for apache?

sudo port install php5 +apache2 +mysql5


> 2. How do I start the mysql5-Server and restart it every time I  
> start the
> mac?

sudo port install mysql5 +server

Note: Do this command *before* you install the php5 module as above.  
If you do not, you will end up with mysql5 installed without the  
server variant.

Then, to start it now, and start it at every system startup:

sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist

To stop it now, and no longer start it up at every system startup:

sudo launchctl unload -w /Library/LaunchDaemons/ 
org.macports.mysql5.plist

This is assuming you're on Mac OS X 10.4.0 or greater.


> 3. If I start apachectl, it still uses /usr/bin/apachectl from my  
> Mac-OS. I
> already added the PATH in /etc/profiles and as well in my .profile.  
> Can I
> uninstall the older versions of apache, mysql, perl etc. that came  
> with my
> macos?

MySQL does not come with Mac OS X. (It only comes with Mac OS X  
Server.) Do not attempt to uninstall any parts of the OS (including  
Perl, Apache, PHP) that Apple provided or your next update of Mac OS  
X may explode. MacPorts installs everything in a completely separate  
heirarchy (/opt/local) and thus cannot and does not interfere with  
the Apple components. Simply leave the Apple parts where they are and  
do not use them.

You could start MacPorts' Apache 2 by using /opt/local/apache2/bin/ 
apachectl. You could put /opt/local/apache2/bin into your PATH  
(before /usr/sbin) if you'd like to be able to run this by just  
typing "apachectl". However I recommend starting and stopping your  
MacPorts Apache 2 by using launch services (if you're on Mac OS X  
10.4.0 or greater). For example, to start Apache 2 now and have it  
start at every system startup:

sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist

To stop Apache 2 now and have it no longer start at system startup:

sudo launchctl unload -w /Library/LaunchDaemons/ 
org.macports.apache2.plist


> 4. If I figured out all the problems above i can install zoph. I  
> could do it
> from source in /usr/local, or is there a better way? Is it possible  
> to build
> my own zoph-package to install/uninstall it with macports?

You can certainly write a portfile. The best way to get started might  
be to read some existing portfiles to see what the syntax is like.  
You can do this by typing "port edit foo" where foo is the name of  
the port whose portfile you wish to see. To see where the files are  
stored, type "port file foo".





More information about the macports-users mailing list