php on openbsd (library issue?)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

php on openbsd (library issue?)

jabbott
I setup a new PPC box with Openbsd 3.9.  After the install I dl'd and compiled apache 2.0.58, mysql 5.21 and php 5.1.  I got the box setup and running.  Everything seemed to be working just fine.  I did some testing of the php application (phpBB) and everything seemed to work just fine.  So, I shut the machine down, boxed it up and mailed it to my ISP where it is going to be co-lo.

Now when I start up apache I get the message:
# /usr/local/apache2/bin/apachectl start  
Syntax error on line 232 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp5.so into server: Cannot load specified object

Granted, after I did the installation and testing, I can't say for sure that I rebooted it and tested it on reboot.  I think I did, but maybe not.  So it could be that something got tweeked in the install that got reset in the re-boot.

I figured somehow my libphp5.so got messed up so I recompiled php, but when I did so, I forgot to add --with-mysql=/usr/local/mysql.  I put libphp5.so in place and the web server started up just fine.  Unfortunatly my application didn't run so well, so I again compiled and installed it with mysql in place.  Now I get the same error again.  So, it must be something in the mysql libaries, right?  Why did it work initally then?

Here is my ldconfig paths:
bash-3.1# ldconfig -r
/var/run/ld.so.hints:
        search directories: /usr/lib:/usr/X11R6/lib:/usr/local/lib:/usr/src/php5.1-200605031830/libs:/usr/local/mysql/lib
        0:-liberty.8.0 => /usr/lib/libiberty.so.8.0
        1:-loldX.9.0 => /usr/X11R6/lib/liboldX.so.9.0
        2:-lXcomposite.2.0 => /usr/X11R6/lib/libXcomposite.so.2.0
        3:-levent.1.1 => /usr/lib/libevent.so.1.1
        4:-lGLw.4.0 => /usr/X11R6/lib/libGLw.so.4.0
        5:-lXrandr.5.0 => /usr/X11R6/lib/libXrandr.so.5.0
        6:-lutil.11.0 => /usr/lib/libutil.so.11.0
        7:-lrpcsvc.1.0 => /usr/lib/librpcsvc.so.1.0
        8:-locurses.5.0 => /usr/lib/libocurses.so.5.0
        9:-lXi.9.0 => /usr/X11R6/lib/libXi.so.9.0
        10:-ltermcap.10.0 => /usr/lib/libtermcap.so.10.0
        11:-lskey.5.1 => /usr/lib/libskey.so.5.1
        12:-lg2c.8.1 => /usr/lib/libg2c.so.8.1
        13:-lgettextpo.1.0 => /usr/local/lib/libgettextpo.so.1.0
        14:-lXfont.4.0 => /usr/X11R6/lib/libXfont.so.4.0
        15:-lXcursor.3.0 => /usr/X11R6/lib/libXcursor.so.3.0
        16:-lXss.4.0 => /usr/X11R6/lib/libXss.so.4.0
        17:-lXevie.1.0 => /usr/X11R6/lib/libXevie.so.1.0
        18:-lGLU.7.0 => /usr/X11R6/lib/libGLU.so.7.0
        19:-lpanel.3.0 => /usr/lib/libpanel.so.3.0
        20:-lintl.3.0 => /usr/local/lib/libintl.so.3.0
        21:-lXaw6.9.0 => /usr/X11R6/lib/libXaw6.so.9.0
        22:-lstdc++.42.0 => /usr/lib/libstdc++.so.42.0
        23:-lXdmcp.9.0 => /usr/X11R6/lib/libXdmcp.so.9.0
        24:-lXmuu.4.0 => /usr/X11R6/lib/libXmuu.so.4.0
        25:-lobjc.3.0 => /usr/lib/libobjc.so.3.0
        26:-lcrypto.12.0 => /usr/lib/libcrypto.so.12.0
        27:-lexpat.4.0 => /usr/local/lib/libexpat.so.4.0
        28:-lXrender.4.1 => /usr/X11R6/lib/libXrender.so.4.1
        29:-lxrxnest.7.0 => /usr/X11R6/lib/libxrxnest.so.7.0
        30:-lGL.4.0 => /usr/X11R6/lib/libGL.so.4.0
        31:-lcurl.3.2 => /usr/local/lib/libcurl.so.3.2
        32:-lXft1.4.0 => /usr/X11R6/lib/libXft1.so.4.0
        33:-lc.39.0 => /usr/lib/libc.so.39.0
        34:-lttf.1.3 => /usr/local/lib/libttf.so.1.3
        35:-lgpg-error.1.4 => /usr/local/lib/libgpg-error.so.1.4
        36:-ledit.3.0 => /usr/lib/libedit.so.3.0
        37:-lICE.8.1 => /usr/X11R6/lib/libICE.so.8.1
        38:-lXv.4.0 => /usr/X11R6/lib/libXv.so.4.0
        39:-lasn1.15.0 => /usr/lib/libasn1.so.15.0
        40:-lgssapi.4.0 => /usr/lib/libgssapi.so.4.0
        41:-lxrx.7.0 => /usr/X11R6/lib/libxrx.so.7.0
        42:-lkrb5.15.0 => /usr/lib/libkrb5.so.15.0
        43:-lXext.9.0 => /usr/X11R6/lib/libXext.so.9.0
        44:-lltdl.4.3 => /usr/local/lib/libltdl.so.4.3
        45:-ldes.9.0 => /usr/lib/libdes.so.9.0
        46:-lXinerama.4.0 => /usr/X11R6/lib/libXinerama.so.4.0
        47:-lfontconfig.3.0 => /usr/X11R6/lib/libfontconfig.so.3.0
        48:-lFS.8.0 => /usr/X11R6/lib/libFS.so.8.0
        49:-lkafs.15.0 => /usr/lib/libkafs.so.15.0
        50:-lpthread.6.2 => /usr/lib/libpthread.so.6.2
        51:-lcharset.1.0 => /usr/local/lib/libcharset.so.1.0
        52:-lxml2.9.0 => /usr/local/lib/libxml2.so.9.0
        53:-lmenu.3.0 => /usr/lib/libmenu.so.3.0
        54:-lXvMC.4.1 => /usr/X11R6/lib/libXvMC.so.4.1
        55:-lssl.10.0 => /usr/lib/libssl.so.10.0
        56:-lxml.9.17 => /usr/local/lib/libxml.so.9.17
        57:-lXt.9.0 => /usr/X11R6/lib/libXt.so.9.0
        58:-lpcap.4.0 => /usr/lib/libpcap.so.4.0
        59:-lncurses.10.0 => /usr/lib/libncurses.so.10.0
        60:-lgettextlib.0.0 => /usr/local/lib/libgettextlib.so.0.0
        61:-lXmu.9.0 => /usr/X11R6/lib/libXmu.so.9.0
        62:-ltermlib.10.0 => /usr/lib/libtermlib.so.10.0
        63:-lX11.9.0 => /usr/X11R6/lib/libX11.so.9.0
        64:-lXxf86dga.4.0 => /usr/X11R6/lib/libXxf86dga.so.4.0
        65:-lXp.9.0 => /usr/X11R6/lib/libXp.so.9.0
        66:-lwrap.4.0 => /usr/lib/libwrap.so.4.0
        67:-lreadline.3.0 => /usr/lib/libreadline.so.3.0
        68:-lgcrypt.12.1 => /usr/local/lib/libgcrypt.so.12.1
        69:-lxkbfile.3.0 => /usr/X11R6/lib/libxkbfile.so.3.0
        70:-lexslt.9.0 => /usr/local/lib/libexslt.so.9.0
        71:-lOSMesa.7.0 => /usr/X11R6/lib/libOSMesa.so.7.0
        72:-lxslt.3.0 => /usr/local/lib/libxslt.so.3.0
        73:-lXau.9.0 => /usr/X11R6/lib/libXau.so.9.0
        74:-lperl.10.0 => /usr/lib/libperl.so.10.0
        75:-lusbhid.3.0 => /usr/lib/libusbhid.so.3.0
        76:-lexpat.5.0 => /usr/X11R6/lib/libexpat.so.5.0
        77:-lfontenc.3.0 => /usr/X11R6/lib/libfontenc.so.3.0
        78:-lnet.11.0 => /usr/local/lib/libnet.so.11.0
        79:-lXpm.7.0 => /usr/X11R6/lib/libXpm.so.7.0
        80:-lotermcap.5.0 => /usr/lib/libotermcap.so.5.0
        81:-lcom_err.15.0 => /usr/lib/libcom_err.so.15.0
        82:-lXdamage.2.0 => /usr/X11R6/lib/libXdamage.so.2.0
        83:-lfreetype.13.1 => /usr/X11R6/lib/libfreetype.so.13.1
        84:-lXft.6.0 => /usr/X11R6/lib/libXft.so.6.0
        85:-lasprintf.1.0 => /usr/local/lib/libasprintf.so.1.0
        86:-lkvm.8.0 => /usr/lib/libkvm.so.8.0
        87:-lXxf86misc.4.0 => /usr/X11R6/lib/libXxf86misc.so.4.0
        88:-lSM.8.0 => /usr/X11R6/lib/libSM.so.8.0
        89:-lXaw.11.0 => /usr/X11R6/lib/libXaw.so.11.0
        90:-lXaw7.10.0 => /usr/X11R6/lib/libXaw7.so.10.0
        91:-lXTrap.9.0 => /usr/X11R6/lib/libXTrap.so.9.0
        92:-lm.2.1 => /usr/lib/libm.so.2.1
        93:-lxkbui.3.0 => /usr/X11R6/lib/libxkbui.so.3.0
        94:-lcurses.10.0 => /usr/lib/libcurses.so.10.0
        95:-lz.4.1 => /usr/lib/libz.so.4.1
        96:-lform.3.0 => /usr/lib/libform.so.3.0
        97:-lXxf86vm.4.0 => /usr/X11R6/lib/libXxf86vm.so.4.0
        98:-liconv.4.0 => /usr/local/lib/libiconv.so.4.0
        99:-lXtst.9.0 => /usr/X11R6/lib/libXtst.so.9.0
        100:-lsectok.6.0 => /usr/lib/libsectok.so.6.0
        101:-lmilter.1.0 => /usr/lib/libmilter.so.1.0
        102:-lXfixes.4.0 => /usr/X11R6/lib/libXfixes.so.4.0
        103:-lossaudio.3.0 => /usr/lib/libossaudio.so.3.0
        104:-lgettextsrc.0.0 => /usr/local/lib/libgettextsrc.so.0.0
        105:-lXRes.3.0 => /usr/X11R6/lib/libXRes.so.3.0

I am confused on which way to go here.  

--ja
--

Reply | Threaded
Open this post in threaded view
|

Re: php on openbsd (library issue?)

Stuart Henderson
On 2006/05/22 10:45, [hidden email] wrote:
> I am confused on which way to go here.  

How about using httpd from base, and php from ports?
Porters have put a lot of time into making it all Just Work.

Watch out you keep that phpBB up-to-date, whichever
way you go.

Reply | Threaded
Open this post in threaded view
|

Re: php on openbsd (library issue?)

jabbott
The problem with the ports version of php, and I did try that the first time I setup the box, was the dependency list was huge and it installed a whole bunch of stuff that I didn't really need/want.  The php install took almost a full day of downloading/compliling and installing applications.  It seemed like it installed everything but the kitchen sink.

--ja

On Mon, 22 May 2006, Stuart Henderson wrote:

> On 2006/05/22 10:45, [hidden email] wrote:
> > I am confused on which way to go here.  
>
> How about using httpd from base, and php from ports?
> Porters have put a lot of time into making it all Just Work.
>
> Watch out you keep that phpBB up-to-date, whichever
> way you go.
>
>

--

Reply | Threaded
Open this post in threaded view
|

Re: php on openbsd (library issue?)

Mike Hernandez-3
In reply to this post by Stuart Henderson
On May 22, 2006, at 1:01 PM, Stuart Henderson wrote:

> On 2006/05/22 10:45, [hidden email] wrote:
>> I am confused on which way to go here.
>
> How about using httpd from base, and php from ports?
> Porters have put a lot of time into making it all Just Work.
>
> Watch out you keep that phpBB up-to-date, whichever
> way you go.
>

And if you use httpd from base make sure you are careful - it runs in  
chroot by default and may take some work on your part to ensure mysql  
and php can see the things they need to see.

Mike

Reply | Threaded
Open this post in threaded view
|

Re: php on openbsd (library issue?)

Paul Irofti
In reply to this post by jabbott
Then, you've selected the wrong package, I had no dependencies for php-core.
In fact that's the only extra package I have besides base on one of my
servers, and everything runs smoothly.

On Monday 22 May 2006 19:14, you wrote:

> The problem with the ports version of php, and I did try that the first
> time I setup the box, was the dependency list was huge and it installed a
> whole bunch of stuff that I didn't really need/want.  The php install took
> almost a full day of downloading/compliling and installing applications.
> It seemed like it installed everything but the kitchen sink.
>
> --ja
>
> On Mon, 22 May 2006, Stuart Henderson wrote:
> > On 2006/05/22 10:45, [hidden email] wrote:
> > > I am confused on which way to go here.
> >
> > How about using httpd from base, and php from ports?
> > Porters have put a lot of time into making it all Just Work.
> >
> > Watch out you keep that phpBB up-to-date, whichever
> > way you go.

--
Everything is simple, we're stupid

Reply | Threaded
Open this post in threaded view
|

Re: php on openbsd (library issue?)

Stuart Henderson
In reply to this post by jabbott
On 2006/05/22 11:14, [hidden email] wrote:
> The problem with the ports version of php, and I did try that
> the first time I setup the box, was the dependency list was huge

On OpenBSD, ports are mostly there to build packages, rather than for
typical software-installation. As such the php port by default produces
the full set of multi-packages for each of the options (postgresql,
sybase, odbc, imap, ldap, [...]).

If you have a reason to build from ports, ports(7) is required reading,
see the sections on FLAVORS and MULTI_PACKAGES in particular; but unless
you're modifying the source code or Makefiles, just set PKG_PATH and
pkg_add away.

"The OpenBSD ports team considers packages to be the goal of their porting work".
-- http://www.openbsd.org/faq/faq15.html

Reply | Threaded
Open this post in threaded view
|

Re: php on openbsd (library issue?)

Spruell, Darren-Perot
In reply to this post by jabbott
From: [hidden email]
> The problem with the ports version of php, and I did try that
> the first time I setup the box, was the dependency list was
> huge and it installed a whole bunch of stuff that I didn't
> really need/want.  The php install took almost a full day of
> downloading/compliling and installing applications.  It
> seemed like it installed everything but the kitchen sink.

It really shouldn't have been that much to it. Base php doesn't have an
overload of dependencies.

Why ports? Setting up php via *packages* is fast. Not sure if a ports
install really gives you anything the package won't.

The reason it shouldn't be that involved is that the extra fluff (php-mysql,
php-ldap, php-gd, etc.) is implemented as an extension; so if you only need
base php, plus php-mysql, you're looking at those two packages plus the
smaller list of dependencies needed by php. Go the packages route, set
$PKG_PATH appropriately, and you'll have no headaches.

DS