Php-module for apache - start server

Mark Duling mark.duling at biola.edu
Sun Oct 22 13:16:27 PDT 2006


"Ulrich Wiederhold" <wubuwei at gmx.net> on Sunday, October 22, 2006 at 5:57
AM -0800 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?

The INSTALL file for zoph says it requires PHP4.  But hopefully it works
with PHP5.  Install it like this ans watch for some additional
instructions at the end of the install.

port install php5 +apache2 +mysql5

It has worked fine for me in the past.  Right now I'm having trouble
geting PHP5 to work with my new MacBook Pro and I haven't found the
problem yet.  Perhaps it is just my machine though.
>
>2. How do I start the mysql5-Server and restart it every time I start the
>mac?

Install using the server variant like this:

port install mysql5 +server

The server variant installs a LaunchD item.  A ui_msg during install will
tell you to do something like this to activate the startupitem.

sudo launchctl load -w /Library/LaunchDaemons/ .....
>
>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?

Set your path to have MacPorts paths in front of the rest and it will
always find MacPort's apachectl first.  Just turn off Personal Web Sharing
in System Preferences so Apple's Apache isn't running.

http://trac.macosforge.org/projects/macports/wiki/InstallingMacPorts
>
>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?

Making your own port is the way to go.  Something like below probably. 
The destroot section you'll need to modify, it is only an example.  Use a
local repository by editing /opt/local/etc/ports/sources.conf to have a
'file:///' entry locating yor local repository.

file:///Users/johndoe/dports
rsync://rsync.darwinports.org/dpupdate/dports

Then run 'portindex' from that directory and then install like any other
port.  After you get thePortfile modified properly and tested it can be
committed.

Mark


# $Id: Portfile

PortSystem 1.0
name             zoph
version          0.6
categories       www
maintainers      darwinports at opendrwin.org
description     Web based digital image presentation and management system.
long_description ${description}

homepage        http://www.nother.net/zoph/
platforms       darwin
master_sites    sourceforge
checksums       md5 7e139b32bd477cccf43454cb4c07c16d

depends_lib     port:mysql5 \
                port:apache2 \
                port:php5 \
                port:perl5.8 \
                port:p5-dbi \
                port:p5-dbd-mysql \
                port:p5-image-size \
                port:imagemagick \
                port:jhead

use_configure   no
build {}

variant mysql4 {
        depends_lib-delete      port:mysql5
        depends_lib-append    port:mysql4
}

set appdir ${prefix}/share/${name}
set docdir ${prefix}/share/doc/${name}

destroot {
# Comments describing what is being installed ......
        xinstall -m 755 -d ${destroot}${appdir}
        xinstall -m 755 -d ${destroot}${docdir}
        system "cd ${worksrcpath} && cp -R . ${destroot}${appdir}"
        system "cp ${worksrcpath}/docs/* ${destroot}${docdir}"
}




More information about the macports-users mailing list