Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Aug 2006 08:39:39 -0400 (EDT)
From:      up@3.am
To:        freebsd-apache@freebsd.org
Subject:   Re: Apache 2.2 with mod_php5.1.5 problem
Message-ID:  <Pine.BSF.4.44.0608310833010.31633-100000@richard2.pil.net>
In-Reply-To: <44F69414.8060503@thebeastie.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 31 Aug 2006, Michael Vince wrote:

> up@3.am wrote:
>
> >Hi:
> >
> >I just installed Apache/2.2.3 and php_5.1.5 (from ports) on a server
> >that's going to replace much older versions of both.  It works for the
> >most part, except users with phpMyAdmin aren't.  The following error is
> >occuring:
> >
> >Fatal error: Call to undefined function preg_match() in
> >
> >/home/servers/sitename/source/phpMyAdminStories/libraries/defines.lib.php
> >on line 36
> >
> >I did a google on it, and found a recommendation to install
> >/var/db/ports/php5-extensions.  I attempted that, and the problems began:
> >
> >1st attempt: got a nice color screen giving me checkbox options. I check
> >everything I could worry about wanting some day, but if fails trying to
> >install something for a calender extension.  Ok, I figure I can do
> >without.
> >
> >2nd attempt: even after a "make clean" and a "make distclean" the port
> >attempted to build it without giving me that screen, and it eventually
> >stops with a complaint that php5 itself is already installed and asks me
> >to deinstall and reinstall it.  It also seems to think that an older
> >version of php5 is installed (5.1.4 instead of 5.1.5), even though I had
> >properly deinstalled the old one, cleaned, etc.
> >
> >Do I have to deinstall php_5.1.5 and all of the modules for it then
> >install these extensions, THEN install php5 ??
> >
> >Thanks in Advance,
> >
> >James Smallacombe		      PlantageNet, Inc. CEO and Janitor
> >
> >
> Do this
> Nuke your whole php install using: pkg_delete -f /var/db/pkg/php*
> Nuke your already chosen port options on php: rm -rf  /var/db/ports/php*
> Place "BATCH=yes" into /etc/make.conf (you may need to create this file)
> This should choose all the options you need which are normally default.
> Then install phpmyadmin directly. Don't install the php5 first, this way
> phpmyadmin will get the dependencies it needs
> portupgrade -N /usr/ports/databases/phpmyadmin
>
> Plan B
> If this doesn't work do a -kfa in portupagrade (which deliberately
> stands for "Kick Fckin Ass", like like the old Doom cheats)
> portupgrade -Nkfa /usr/ports/databases/phpmyadmin
> And everything should be good.
>
> Also note that "a" stands for everything so it might be safer to first
> try it without it in the plan B option and try it as a plan C option.

I've now been through this on two servers, and this is what you have to do
to get ports/php5-extensions to work right until the ports maintainers fix
it:

make install ports/lang/php5-extensions before you install
ports/lang/php5  This will also install php5.

then go to ports/lang/php5 and do the following:

make deinstall; make clean; make rmconfig

The finally, make install php5 again.  It's worked on two different boxes
now....before this, I had tried everything except the "make rmconfig" (I
had assumed "make clean" did that), which Miroslav Lachman
<000.fbsd@quip.cz> was nice enough to point out to me.

James Smallacombe		      PlantageNet, Inc. CEO and Janitor
up@3.am							    http://3.am
=========================================================================





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.44.0608310833010.31633-100000>