Having a pretty rough time getting php5 installed

John Korchok jkorchok at hotmail.com
Fri Aug 8 20:44:52 PDT 2008


Hi,

I'm not a MacPorts expert like many of the others on this list, but you'll
make your life easier and longer if you install an entire MAMP setup in
Macports rather than trying to tie it in bits and pieces with other software
installed from source. 

PHP installed with MacPorts expects to find Apache and MySQL in the MacPorts
locations. The +mysql5 parameter does prepare PHP for MySQL, but doesn't
tell it that your particular copy is installed somewhere else. It is
possible to do what you want, but you would probably spend more time getting
it to work than if you built PHP from source. 

Yes, an earlier version of Apache is already installed on your system, but
Macports will get you the current version. Most likely you only need to copy
over your httpd.conf with minor tweaks from your old installation to get a
Macports version of Apache 2 operating the same way. I've never tried
duplicating an old installation of MySQL to a MacPorts version, so I can't
help you there.

You're on to the correct way of setting up PHP with the features that you
want, using the +sqllite etc. parameters, but all those parameters will
install to or be looking for the MacPorts version in /opt/local, not any
earlier version you had installed elsewhere. 

Other more experienced hands might try copying your working installation to
another machine, but I'm sure if I did it I would waste a lot of time
getting it working. Installing and debugging locally, then shipping the
hardware is most time-efficient in my experience.

John Korchok

> -----Original Message-----
> From: Scott Haneda [mailto:talklists at newgeo.com] 
> Sent: Friday, August 08, 2008 11:17 PM
> To: John Korchok
> Cc: <macports-users at lists.macosforge.org>
> Subject: Re: Having a pretty rough time getting php5 installed
> 
> Maybe I'm not understanding this entirely. I already have 
> mysql 5 installed from source and running. I also have apache 
> 2 running as part if the built in os install.
> 
> I don't need to have those installed. They are running and 
> configured as I need them to be.
> 
> I thought the +mysql5 meant php would gain support for 
> mysql5. Same with the other +options.
> 
> So if I only want php5 with certain built in features like 
> works with apache 2 and mysql5 and sqllite etc. How do I do that?
> 
> Then once I have the php working as I need it how do I pull 
> those chunks to my live server?
> 
> Maybe you can also explain a little about your colo test and 
> migration system.
> 
> I have little trouble installing mysql and a few others from source.  
> Php5 on the other hand, in order to give it at least a little 
> support for things like gd and the rest there are too many 
> other little things to compile alongside,each needing other 
> compiles as well. Trying to avoid that headache.
> 
> Thanks.
> 
> --
> Scott
> Iphone says hello.
> 
> On Aug 8, 2008, at 7:57 PM, "John Korchok" 
> <jkorchok at hotmail.com> wrote:
> 
> > Hi Scott,
> >
> > Try
> > sudo port install mysql5 +server
> > sudo port install apache2
> > sudo port install php5 +apache2 +mysql5 +whateverelse in that order.
> >
> > I work with colo machines, but my preferred work method is 
> to install 
> > all the software using macports on the machine inhouse, test 
> > everything and then swap with the machine at the colo 
> location. Near 
> > 0% downtime this way.
> >
> > If you want to add services in the future run sudo port 
> install php5 
> > +apache2 +mysql5 +whateverelse +newstuff but test it on the local 
> > machine first to work out any bugs.
> >
> > John Korchok
> >
> >> -----Original Message-----
> >> From: macports-users-bounces at lists.macosforge.org
> >> [mailto:macports-users-bounces at lists.macosforge.org] On Behalf Of 
> >> Scott Haneda
> >> Sent: Friday, August 08, 2008 10:31 PM
> >> To: macports-users at lists.macosforge.org
> >> Subject: Having a pretty rough time getting php5 installed
> >>
> >> I am running PPC Dual G5 OS X 10.5 Leopard Downloaded and 
> installed 
> >> xcode today, so it should be as current as I can get.
> >>
> >> sudo port -v
> >> MacPorts 1.600
> >>
> >> Ran the update and it seemed to update fine, or not need it:
> >> DEBUG: MacPorts base dir: /opt/local/var/macports/sources/ 
> >> rsync.macports.org/release/base
> >> DEBUG: Setting user: root
> >>
> >> MacPorts base version 1.600 installed
> >> DEBUG: Updating using rsync
> >> receiving file list ... done
> >> ... ...
> >> The MacPorts installation is not outdated and so was not updated
> >> DEBUG: Setting ownership to root
> >> selfupdate done!
> >>
> >> And here is what I want to install:
> >> sudo port install php5 +apache2 +mysql5 +pear +imap +sqlite +tidy
> >>
> >> * As a side note, this is a test machine, an identical one is at a 
> >> colo fascility, and I do not want to run ports on that 
> machine, but 
> >> take the install from this machine, to that machine, how 
> would I do 
> >> that, and how would I change the path and final location 
> of php5 to 
> >> something other than /opt
> >>
> >> ** In the future, if I need to add some other config 
> option to php5, 
> >> like maybe I want to add pspell or something, what would 
> that process 
> >> be to get it on the live server?
> >>
> >> ports runs, and then bails on me, here is what it says:
> >> Password:
> >> --->  Fetching apr
> >> --->  Attempting to fetch apr-1.3.2.tar.bz2 from 
> >> ---> http://www.apache.org/dist/apr  Verifying checksum(s) for apr 
> >> ---> Extracting apr  Configuring apr  Building apr with target all 
> >> ---> Staging apr into destroot  Installing apr 1.3.2_0+darwin_9 
> >> ---> Activating apr 1.3.2_0+darwin_9  Cleaning apr  Fetching db46 
> >> ---> Attempting to fetch patch.4.6.21.1 from
> >> --->
> >> http://www.oracle.com/technology/products/berkeley-db/db/update/4.6
> >> ---> .21/  Attempting to fetch db-4.6.21.tar.gz from 
> >> ---> http://download-west.oracle.com/berkeley-db/
> >> --->  Verifying checksum(s) for db46
> >> --->  Extracting db46
> >> --->  Applying patches to db46
> >> --->  Configuring db46
> >> --->  Building db46 with target all
> >> --->  Staging db46 into destroot
> >> --->  Installing db46 4.6.21_1
> >> --->  Activating db46 4.6.21_1
> >> --->  Cleaning db46
> >> --->  Fetching expat
> >> --->  Attempting to fetch expat-2.0.1.tar.gz from 
> >> ---> http://downloads.sourceforge.net/expat
> >> --->  Verifying checksum(s) for expat  Extracting expat  
> Configuring 
> >> ---> expat  Building expat with target all  Staging expat into 
> >> ---> destroot  Installing expat 2.0.1_0  Activating expat 2.0.1_0  
> >> ---> Cleaning expat  Fetching gperf  Attempting to fetch 
> >> ---> gperf-3.0.3.tar.gz from http://ftp.gnu.org/gnu/gperf  
> Verifying 
> >> ---> checksum(s) for gperf Extracting gperf  Configuring gperf  
> >> ---> Building gperf with
> >> target all
> >> ---> Staging gperf into destroot  Installing gperf 3.0.3_0
> >> Activating
> >> ---> gperf 3.0.3_0  Cleaning gperf  Fetching libiconv  
> Attempting to 
> >> ---> fetch libiconv-1.12.tar.gz from 
> http://ftp.gnu.org/gnu/libiconv 
> >> ---> Verifying checksum(s) for libiconv  Extracting libiconv
> >> Applying
> >> ---> patches to libiconv  Configuring libiconv  Building
> >> libiconv with
> >> ---> target all  Staging libiconv into destroot  
> Installing libiconv 
> >> ---> 1.12_0  Activating libiconv 1.12_0  Cleaning libiconv 
>  Fetching 
> >> ---> zlib  Attempting to fetch zlib-1.2.3.tar.bz2 from 
> >> ---> http://www.zlib.net/  Verifying checksum(s) for zlib  
> Extracting 
> >> ---> zlib  Applying patches to zlib  Configuring zlib  
> Building zlib 
> >> ---> with target all  Staging zlib into destroot  Installing zlib
> >> ---> 1.2.3_1  Activating zlib 1.2.3_1  Cleaning zlib
> >> Fetching openssl
> >> ---> Attempting to fetch openssl-0.9.8h.tar.gz from 
> >> ---> http://www.openssl.org/source/  Verifying checksum(s)
> >> for openssl
> >> ---> Extracting openssl  Applying patches to openssl  Configuring 
> >> ---> openssl  Building openssl with target all  Staging 
> openssl into 
> >> ---> destroot  Installing openssl 0.9.8h_0  Activating
> >> openssl 0.9.8h_0
> >> ---> Cleaning openssl  Fetching mysql5  Attempting to fetch 
> >> ---> mysql-5.0.51a.tar.gz from http://distfiles.macports.org/mysql5
> >> --->  Verifying checksum(s) for mysql5  Extracting mysql5  
> >> ---> Configuring mysql5  Building mysql5 with target all
> >> Error: Target org.macports.build returned: shell command " 
> cd "/opt/ 
> >> local/var/macports/build/ _opt_local_var_macports_sources_rsync
> >> .macports.org_release_ports_databases_mysql5/work/mysql-5.0.51
> >> a" && make all " returned error 2 Command output: /usr/bin/sed \
> >>      -e 's!@''AWK''@!!' \
> >>    makelist.sh > makelist-t
> >> /bin/mv makelist-t makelist
> >> sh ./makelist -h ./vi.c > vi.h.tmp && \
> >>    mv vi.h.tmp vi.h
> >> ./makelist: line 81:
> >>    BEGIN {
> >>        printf("/* Automatically generated file, do not edit */\n");
> >>        printf("#ifndef %s\n#define %s\n", "_h_vi_c", "_h_vi_c");
> >>    }
> >>    /\(\):/ {
> >>        pr = substr($2, 1, 2);
> >>        if (pr == "vi" || pr == "em" || pr == "ed") {
> >>        name = substr($2, 1, index($2,"(") - 1); #
> >> # XXX:    need a space between name and prototype so that
> >> -fc and -fh
> >> #    parsing is much easier
> >> #
> >>        printf("protected el_action_t\t%s (EditLine *, int);\n", 
> >> name);
> >>        }
> >>    }
> >>    END {
> >>        printf("#endif /* %s */\n", "_h_vi_c");
> >>    }: No such file or directory
> >> cat: stdout: Broken pipe
> >> make[3]: *** [vi.h] Error 127
> >> make[2]: *** [all-recursive] Error 1
> >> make[1]: *** [all-recursive] Error 1
> >> make: *** [all] Error 2
> >>
> >> Error: The following dependencies failed to build: apache2 apr-util
> >> mysql5 sqlite3 gawk gettext ncurses ncursesw gmake readline pcre 
> >> bzip2 cclient curl pkgconfig freetype gd2 XFree86 autoconf 
> help2man 
> >> p5- locale-gettext perl5.8 m4 automake fontconfig jpeg 
> libpng libtool 
> >> libmcrypt libxml2 libxslt mhash tidy tiff
> >> Error: Status 1 encountered during processing.
> >> my-username at my-username:/opt/local/lib/ $sudo port install php5
> >> +apache2 +mysql5
> >> Password:
> >> Error: Requested variants do not match original selection.
> >> Please perform 'port clean php5' or specify the force option.
> >> Error: Status 1 encountered during processing.
> >> my-username at my-username:/opt/local/lib/ $sudo port clean php5
> >> --->  Cleaning php5
> >> my-username at my-username:/opt/local/lib/ $sudo port install php5
> >> +apache2 +mysql5
> >> --->  Building mysql5 with target all
> >> Error: Target org.macports.build returned: shell command " 
> cd "/opt/ 
> >> local/var/macports/build/ _opt_local_var_macports_sources_rsync
> >> .macports.org_release_ports_databases_mysql5/work/mysql-5.0.51
> >> a" && make all " returned error 2 Command output: Making 
> all in Docs
> >> make[2]: Nothing to be done for `all'.
> >> Making all in cmd-line-utils
> >> Making all in libedit
> >> sh ./makelist -h ./vi.c > vi.h.tmp && \
> >>    mv vi.h.tmp vi.h
> >> ./makelist: line 81:
> >>    BEGIN {
> >>        printf("/* Automatically generated file, do not edit */\n");
> >>        printf("#ifndef %s\n#define %s\n", "_h_vi_c", "_h_vi_c");
> >>    }
> >>    /\(\):/ {
> >>        pr = substr($2, 1, 2);
> >>        if (pr == "vi" || pr == "em" || pr == "ed") {
> >>        name = substr($2, 1, index($2,"(") - 1); #
> >> # XXX:    need a space between name and prototype so that
> >> -fc and -fh
> >> #    parsing is much easier
> >> #
> >>        printf("protected el_action_t\t%s (EditLine *, int);\n", 
> >> name);
> >>        }
> >>    }
> >>    END {
> >>        printf("#endif /* %s */\n", "_h_vi_c");
> >>    }: No such file or directory
> >> cat: stdout: Broken pipe
> >> make[3]: *** [vi.h] Error 127
> >> make[2]: *** [all-recursive] Error 1
> >> make[1]: *** [all-recursive] Error 1
> >> make: *** [all] Error 2
> >>
> >> Error: The following dependencies failed to build: apache2 apr-util
> >> mysql5 sqlite3 gawk gettext ncurses ncursesw gmake readline pcre 
> >> bzip2 curl pkgconfig freetype gd2 XFree86 autoconf help2man 
> >> p5-locale- gettext perl5.8 m4 automake fontconfig jpeg 
> libpng libtool 
> >> libmcrypt
> >> libxml2 libxslt mhash tiff
> >> Error: Status 1 encountered during processing.
> >>
> >>
> >> --
> >> Scott
> >> talklists at newgeo.com
> >>
> >> _______________________________________________
> >> macports-users mailing list
> >> macports-users at lists.macosforge.org
> >> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
> >>
> >
> 



More information about the macports-users mailing list