DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 9th November 2010
joostvgh joostvgh is offline
Port Guard
 
Join Date: Jan 2010
Posts: 38
Default php - libphp5.so

first of all:

I've tried searching in these forums but I didn't come to a solution.

yesterday I was installing some stuff in my openbsd server (libiconv, which took me hours to make), and doing so I probably changed some stuff like 'ld', rights or CGFLAGS.

Now, apachectl won't start anymore (it started before I did this, and I didn't change anything to php)
error:
# apachectl start
Syntax error on line 1 of /var/www/conf/modules/php5.conf:
Cannot load /usr/local/lib/php/libphp5.so into server: Cannot load specified object
/usr/sbin/apachectl start: httpd could not be started

the file is in place, and i chmodded 777 to it.
(7904 -rwxrwxrwx 1 root bin 4028450 Jul 1 2009 libphp5.so)

What can I do?
Reply With Quote
  #2   (View Single Post)  
Old 9th November 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

The built in apache is chrooted by default. See FAQ 10.16. Then, place your php library in the right directory.

(Why are you building by hand instead of using packages?)
Reply With Quote
  #3   (View Single Post)  
Old 10th November 2010
joostvgh joostvgh is offline
Port Guard
 
Join Date: Jan 2010
Posts: 38
Default

apachectl has worked before. I didn't change any file location that was linked to apache, I only changed something to 'ld' (which I don't really understand, although I read the doc/manpage 100 times, there's just so many wrong information on google, different versions, ...) and CFLAGS.

But I'll look into it. I read in the faq:
Quote:
and reads its configuration. Next, it locks itself into /var/www and drops privileges, then starts to accept requests.
so that would explain why initially it can/could read from another path rather than '/var/www'.
I'll try to change the file location and then report back!


why I am building by hand: I don't know. I think I've used packages before, but its not my daily occupation to operate OpenBSD, it's just the server I manage in my residence, and I try to add something from time to time. Also, not every app is available as package. Libiconv might have been, but I downloaded 10 versions before I got some other, dependant program to build/make, and find the lib (I got the undefined reference error).


edit: gave it a shot:


# apachectl start
Syntax error on line 1 of /var/www/conf/modules/php5.conf:
Cannot load /var/www/lib/php/libphp5.so into server: Cannot load specified object
/usr/sbin/apachectl start: httpd could not be started

edit2: since its chrooted to /var/www, it sees that as a root, changed file path:


# apachectl start
Syntax error on line 1 of /var/www/conf/modules/php5.conf:
Cannot load /lib/php/libphp5.so into server: File not found
/usr/sbin/apachectl start: httpd could not be started

then changed path to lib/php/libphp5.so instead of /lib/php/libphp5.so

# apachectl start
Syntax error on line 1 of /var/www/conf/modules/php5.conf:
Cannot load /var/www/lib/php/libphp5.so into server: Cannot load specified object
/usr/sbin/apachectl start: httpd could not be started

Last edited by joostvgh; 10th November 2010 at 08:07 AM.
Reply With Quote
  #4   (View Single Post)  
Old 10th November 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I don't know what kind of Frankensystem you have created for yourself with whatever you did, or thought you were doing.. Nor am I a php user.

Nevertheless, try this:
Code:
# mkdir -p /var/www/usr/local/lib/php
# cp -p /usr/local/lib/php/libphp5.so /var/www/usr/local/lib/php
and have your php5.conf point to /usr/local/lib/php/libphp5.so.
Reply With Quote
  #5   (View Single Post)  
Old 10th November 2010
joostvgh joostvgh is offline
Port Guard
 
Join Date: Jan 2010
Posts: 38
Default

# apachectl start
Syntax error on line 1 of /var/www/conf/modules/php5.conf:
Cannot load /usr/local/lib/php/libphp5.so into server: Cannot load specified object
/usr/sbin/apachectl start: httpd could not be started

Reply With Quote
  #6   (View Single Post)  
Old 10th November 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

OK. Let us now back up, and find out what kind of monster you created in your laboratory, Dr. F. I'll play Igor:

Quote:
yesterday I was installing some stuff in my openbsd server (libiconv, which took me hours to make), and doing so I probably changed some stuff like 'ld', rights or CGFLAGS.
  1. Were you building from /usr/ports/converters/libiconv -- from the OpenBSD ports tree, Master, as described in FAQ 15? Or perhaps, Master, you manually downloaded the software and built it by hand?
  2. If from the ports tree, Master, does the version and flavor of your ports tree match the version/flavor of your OpenBSD system, as described in FAQ 15.4.1?
  3. Would you post the output of ldconfig -r for me, Master? Paste it into your reply, surrounded by code tags.
  4. What hump?
Reply With Quote
  #7   (View Single Post)  
Old 10th November 2010
joostvgh joostvgh is offline
Port Guard
 
Join Date: Jan 2010
Posts: 38
Default

1. I don't even know what the ports tree is. Reading FAQ 15 did not even look familiar to something I did. I downloaded the software several times, from different locations (openbsd ftp, libiconv homepage, and finally source forge). When I downloaded these files I had to run './configure', 'make', 'make install', but the first 10 the make failed because of 'undefined reference to libiconv'. I googled this error 100 times but did not come any close to an answer, untill eventually I added libiconv to the LIBS variable in the makefile. (so yes, I built it manually)

2. I just read FAQ 15.4.1 and FAQ 5 (skimmed). I installed openbsd from the cd, release 4.6. The only thing I modified was some crontabs, some pf rule-files, added a forum (mysql, apache), installed dsniff for security perposes. I did not do anything which comes even close to a 'tree'.

3. well, I guess this is where the problem lies, as I mentioned earlier.
Code:
# ldconfig -r
/var/run/ld.so.hints:
        search directories: /usr/lib
        0:-lcurses.10.0 => /usr/lib/libcurses.so.10.0
        1:-lm.5.0 => /usr/lib/libm.so.5.0
        2:-lobjc.4.0 => /usr/lib/libobjc.so.4.0
        3:-lcom_err.17.0 => /usr/lib/libcom_err.so.17.0
        4:-lgssapi.5.0 => /usr/lib/libgssapi.so.5.0
        5:-lncurses.10.0 => /usr/lib/libncurses.so.10.0
        6:-locurses.5.0 => /usr/lib/libocurses.so.5.0
        7:-lpcap.6.0 => /usr/lib/libpcap.so.6.0
        8:-lg2c.8.1 => /usr/lib/libg2c.so.8.1
        9:-levent.2.0 => /usr/lib/libevent.so.2.0
        10:-ledit.3.0 => /usr/lib/libedit.so.3.0
        11:-lkrb5.17.0 => /usr/lib/libkrb5.so.17.0
        12:-lperl.11.0 => /usr/lib/libperl.so.11.0
        13:-liberty.9.0 => /usr/lib/libiberty.so.9.0
        14:-lpanel.3.0 => /usr/lib/libpanel.so.3.0
        15:-lkafs.17.0 => /usr/lib/libkafs.so.17.0
        16:-lpthread.11.1 => /usr/lib/libpthread.so.11.1
        17:-lc.51.0 => /usr/lib/libc.so.51.0
        18:-lreadline.3.0 => /usr/lib/libreadline.so.3.0
        19:-lsectok.6.0 => /usr/lib/libsectok.so.6.0
        20:-lskey.5.1 => /usr/lib/libskey.so.5.1
        21:-lsndio.3.2 => /usr/lib/libsndio.so.3.2
        22:-lssl.15.0 => /usr/lib/libssl.so.15.0
        23:-lossaudio.3.1 => /usr/lib/libossaudio.so.3.1
        24:-lstdc++.47.0 => /usr/lib/libstdc++.so.47.0
        25:-ltermcap.10.0 => /usr/lib/libtermcap.so.10.0
        26:-ltermlib.10.0 => /usr/lib/libtermlib.so.10.0
        27:-lcrypto.18.0 => /usr/lib/libcrypto.so.18.0
        28:-lmilter.2.1 => /usr/lib/libmilter.so.2.1
        29:-lkvm.9.1 => /usr/lib/libkvm.so.9.1
        30:-lusbhid.3.0 => /usr/lib/libusbhid.so.3.0
        31:-lasn1.17.0 => /usr/lib/libasn1.so.17.0
        32:-lutil.11.0 => /usr/lib/libutil.so.11.0
        33:-lexpat.9.0 => /usr/lib/libexpat.so.9.0
        34:-lmenu.3.0 => /usr/lib/libmenu.so.3.0
        35:-lotermcap.5.0 => /usr/lib/libotermcap.so.5.0
        36:-lwrap.4.0 => /usr/lib/libwrap.so.4.0
        37:-ldes.9.0 => /usr/lib/libdes.so.9.0
        38:-lform.3.0 => /usr/lib/libform.so.3.0
        39:-lrpcsvc.1.2 => /usr/lib/librpcsvc.so.1.2
        40:-lz.4.1 => /usr/lib/libz.so.4.1
clearly, the php lib is not included here. I've been reading the ld faq but did not get any wiser about its usage. I've been tryging 'random' commands, trying to build some app that uses the libiconv but could not find it (trying to add the path to the ld and such).

4. I like openbsd and its results because it does what you expect it to. I am quite new to unix systems however, although I would like a osx-like linux system (one which does not only work through commands, osx has nice visuals but not too fancy like windows 7/vista. That is why atm I am still sticking to XP, which is fast, clean, and easy to use to me). In the errors/problems I encountered, google was not even close to being a help. I found 100 similar problems with a solution that just would help, was invalid, or even without a solution (undefined reference libiconv, ..).
I hope, through this process, that I am gaining experience with unix-based systems. I am also very happy I found this forum and you are willing to help me. Thanks!!
Reply With Quote
  #8   (View Single Post)  
Old 11th November 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by joostvgh View Post
1. I don't even know what the ports tree is. Reading FAQ 15 did not even look familiar to something I did. I downloaded the software several times, from different locations (openbsd ftp, libiconv homepage, and finally source forge).
You officially now have a Frankensystem.

Most of the code found in the wild is not written in a generic POSIX style & increasing is Linux-specific. Even the filesystem layout between Linux, OS X, & the various members of the *BSD family are different. Most code found in the wild does not take this into consideration.

Likewise, the libraries expected & common in one environment are most likely not the same between environments.

Yes, one can grab code from about the Internet & port it to OpenBSD, but this takes time, knowledge, & experience. Some projects can be simple to port; others aren't.
Quote:
When I downloaded these files I had to run './configure', 'make', 'make install', but the first 10 the make failed because of 'undefined reference to libiconv'.
It failed most likely between the code & scripts expected things in either different locations or they simply weren't to be found at all.
Quote:
I googled this error 100 times but did not come any close to an answer...
When it comes to OpenBSD, it is best to stay with information found within the project -- manpages, mailing lists, & FAQ.
Quote:
I just read FAQ 15.4.1 and FAQ 5 (skimmed).
Going back to jggimi's original response, the project advocates that users use the pre-compiled packages already created by the project's port maintainers. The grief you are going through now has already been resolved by others.
Quote:
I installed openbsd from the cd, release 4.6.
Be aware that OpenBSD 4.8 was officially released as of 1 November 2010. You may want to consider backing up whatever is of importance & start fresh.
Reply With Quote
  #9   (View Single Post)  
Old 11th November 2010
joostvgh joostvgh is offline
Port Guard
 
Join Date: Jan 2010
Posts: 38
Default

in my current situation it is not really important how secure my server is (although atm is can still be called very secure). I am not at a big company, I live in a student home and we share 1 4mbit connection among 60 people. I am using openbsd mainly to block protocols/websites that generate the most traffic (limewire, torrents, rapidshare, ..).

to block rapidshare, I installed dnsiff for dns spoofing, also I blocked their ip range in the PF.

There are no hackers among us, and even if there were, it would require someone with thorough knowledge to even try to do something to get through.

Atm I am also not able to have physical access to the server, since I am not the owner of the building I live in, and it is located in the basement.

I can connect to the server using putty though.

So, the only thing I would like to do is limit the internet connection from the inside (during day), so the internet stays accessible to all users.

Also I installed darkstat to monitor bandwidth usage per IP.

The problem is that for these very usefull applications (in my case), there is not always a openbsd version available. I understand that when it comes to a corporation which needs to be secured from the outside as well from the inside, no flaws can be allowed.

I hope I haven't frankensteinized the system too much by trial-and-erroring my way through the applications (but I think not).
Reply With Quote
Old 11th November 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

You can be helped. Things might even be recoverable/correctable, without too much trouble.

Step 1 is damage assessment.

First, let us figure out if your built-in tool chain has been damaged. If not, you may be able to recover.

Start with this command:
sysctl kern.version
You will get a two line response, telling you who, when, where built your kernel. If you are running -release, and have not updated your kernel (and since you've just started reading the FAQ today, probably not), carefully note the date that kernel was built. When releases are built, the first thing that is executed is a kernel build.

Now jump through the following critical directories, one at a time, and issue this command, which lists the contents of the directory, most recent updates at the bottom: ls -ltr
  • /bin
  • /sbin
  • /usr/bin
  • /usr/sbin
  • /usr/lib
The userland is built just after the kernel. The date may be the same, or the day after, but will not be later. Anything newer than a day or two from the kernel means you have damaged your base system, and a reinstall is recommended rather than damage control.

If you've mucked about in /usr/local, we can recover that.

I ask you to check this because you mentioned apachectl, which in a standard OpenBSD system is the management command for the built-in Apache web server. Yet you also mentioned building Apache. Those who absolutely require Apache2 can of course use the =packaged= version, where that command is called apachectl2, to avoid confusion and to allow simultaneous use with the audited, chrooted, built-in Apache server.

Your use of the same name sent us both down the wrong path, I think. But what's most important, recovery-wise, is if the built-in Apache and other executables have been overlaid.

----

As far as a nice graphical systems go... I have to grin. Not that you already probably don't feel sheepish enough, having designed your own kit cars to do something while the rest of us have been taking jet flights (as installing php and mysql packages can be done in a single command, no building needed), but Unix has had a graphical system since 1984, called the X Windows System, which BSDs inherited. Not only that, it was always networked graphics, from day one, meaning the display computer and the execution computer need not be the same. X Windows is a graphical infrastructure, you typically install a window manager and a tool set, though OpenBSD has a few simple ones built-in. I don't like any of those, and install one or another on workstations; choosing the environment based on the workstation's intended use.

The last time I checked the package lists for window managers and window management systems for OpenBSD was about six years ago, and there were more than 40 different ones to choose from then. I haven't looked since, but I'm sure the number is closer to 100 now. Hell, you can even try five common ones from my Live Media downloads, link in my .sig below.

There's an active thread on window managers here with some recent updates, even today: http://www.daemonforums.org/showthread.php?t=3547

There was an old thread on "OpenBSD screenshots" also, but to be honest, the underlying OS doesn't matter to what you see, whatever you choose: http://www.daemonforums.org/showthread.php?t=1525

Hint: Yes, there's a FAQ on using the X Windows System. You may want to read it, before delving into installing it (once your system is repaired or reinstalled).
Reply With Quote
Old 11th November 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

As for your ldconfig results, you're missing all your /usr/local libraries -- of which the php library was one. Easy enough to fix (this example shows an X Windows library structure also, eliminate if you don't have it because you did not install the X infrastructure when you installed the OS):

# ldconfig /usr/local/lib /usr/X11R6/lib /usr/lib

Afterwards, run ldconfig -r and see if it's picked up your local libraries. If you have more applications with more libraries in more places, add them to the list.
Reply With Quote
Old 11th November 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

One last item:

ldconfig is executed by /etc/rc -- a system file you were not supposed to ever touch, but you might have.

If unmolested, a reboot should reestablish the shared library cache, automatically.
Reply With Quote
Old 11th November 2010
joostvgh joostvgh is offline
Port Guard
 
Join Date: Jan 2010
Posts: 38
Default

Code:
# sysctl kern.version
kern.version=OpenBSD 4.6 (GENERIC) #58: Thu Jul  9 21:24:42 MDT 2009
    deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC

/bin ls -ltr
...
-r-xr-xr-x  2 root  bin       82680 Jul 10  2009 [
-rw-------  1 root  wheel  12518768 Jan 20  2010 perl.core

/sbin ls -ltr
...
-r-xr-xr-x  1 root  bin         86776 Jul 10  2009 wpa-psk

/usr/bin ls -ltr
...
lrwxr-xr-x  1 root  wheel          21 Jul 10  2009 purgestat -> /usr/sbin/mailwrapper
-rw-r--r--  1 1002  wheel           7 Oct 20 17:18 false

/usr/sbin ls -ltr
...
lrwxr-xr-x   1 root  wheel         17 Jul 10  2009 sysctl -> ../../sbin/sysctl

/usr/lib ls -ltr
...
-r--r--r--  1 root  bin      501874 Jul 10  2009 libmilter.a
seems like this is all still ok..

as for the ldconfig:

Code:
# ldconfig /usr/local/lib /usr/lib 
# ldconfig -r
/var/run/ld.so.hints:
        search directories: /usr/lib:/usr/local/lib
        0:-lexpat.9.0 => /usr/lib/libexpat.so.9.0
        1:-lkafs.17.0 => /usr/lib/libkafs.so.17.0
        2:-lkrb5.17.0 => /usr/lib/libkrb5.so.17.0
        3:-lm.5.0 => /usr/lib/libm.so.5.0
        4:-lmenu.3.0 => /usr/lib/libmenu.so.3.0
        5:-lncurses.10.0 => /usr/lib/libncurses.so.10.0
        6:-lotermcap.5.0 => /usr/lib/libotermcap.so.5.0
        7:-lpanel.3.0 => /usr/lib/libpanel.so.3.0
        8:-lperl.11.0 => /usr/lib/libperl.so.11.0
        9:-lcom_err.17.0 => /usr/lib/libcom_err.so.17.0
        10:-lpcap.6.0 => /usr/lib/libpcap.so.6.0
        11:-lcrypto.18.0 => /usr/lib/libcrypto.so.18.0
        12:-lrpcsvc.1.2 => /usr/lib/librpcsvc.so.1.2
        13:-lskey.5.1 => /usr/lib/libskey.so.5.1
        14:-lsndio.3.2 => /usr/lib/libsndio.so.3.2
        15:-lcurses.10.0 => /usr/lib/libcurses.so.10.0
        16:-lusbhid.3.0 => /usr/lib/libusbhid.so.3.0
        17:-lpthread.11.1 => /usr/lib/libpthread.so.11.1
        18:-lg2c.8.1 => /usr/lib/libg2c.so.8.1
        19:-lutil.11.0 => /usr/lib/libutil.so.11.0
        20:-lz.4.1 => /usr/lib/libz.so.4.1
        21:-lstdc++.47.0 => /usr/lib/libstdc++.so.47.0
        22:-ldb.3.1 => /usr/local/lib/libdb.so.3.1
        23:-lmysqlclient.19.0 => /usr/local/lib/libmysqlclient.so.19.0
        24:-lmysqlclient_r.19.0 => /usr/local/lib/libmysqlclient_r.so.19.0
        25:-locurses.5.0 => /usr/lib/libocurses.so.5.0
        26:-lcharset.1.0 => /usr/local/lib/libcharset.so.1.0
        27:-liconv.7.0 => /usr/local/lib/libiconv.so.7.0
        28:-lobjc.4.0 => /usr/lib/libobjc.so.4.0
        29:-lnet.0.0 => /usr/local/lib/libnet.so.0.0
        30:-lmilter.2.1 => /usr/lib/libmilter.so.2.1
        31:-lasprintf.1.0 => /usr/local/lib/libasprintf.so.1.0
        32:-levent.2.0 => /usr/lib/libevent.so.2.0
        33:-lgettextlib.2.0 => /usr/local/lib/libgettextlib.so.2.0
        34:-lsectok.6.0 => /usr/lib/libsectok.so.6.0
        35:-lgettextsrc.2.0 => /usr/local/lib/libgettextsrc.so.2.0
        36:-lgssapi.5.0 => /usr/lib/libgssapi.so.5.0
        37:-lintl.4.0 => /usr/local/lib/libintl.so.4.0
        38:-lxml2.10.0 => /usr/local/lib/libxml2.so.10.0
        39:-lkvm.9.1 => /usr/lib/libkvm.so.9.1
        40:-ledit.3.0 => /usr/lib/libedit.so.3.0
        41:-lform.3.0 => /usr/lib/libform.so.3.0
        42:-lbz2.10.4 => /usr/local/lib/libbz2.so.10.4
        43:-lgettextpo.3.0 => /usr/local/lib/libgettextpo.so.3.0
        44:-lreadline.3.0 => /usr/lib/libreadline.so.3.0
        45:-ldb_cxx.4.0 => /usr/local/lib/libdb_cxx.so.4.0
        46:-lc.51.0 => /usr/lib/libc.so.51.0
        47:-ldes.9.0 => /usr/lib/libdes.so.9.0
        48:-ltermlib.10.0 => /usr/lib/libtermlib.so.10.0
        49:-lssl.15.0 => /usr/lib/libssl.so.15.0
        50:-lossaudio.3.1 => /usr/lib/libossaudio.so.3.1
        51:-ltermcap.10.0 => /usr/lib/libtermcap.so.10.0
        52:-liberty.9.0 => /usr/lib/libiberty.so.9.0
        53:-lasn1.17.0 => /usr/lib/libasn1.so.17.0
        54:-lwrap.4.0 => /usr/lib/libwrap.so.4.0
# apachectl start
Syntax error on line 1 of /var/www/conf/modules/php5.conf:
Cannot load /usr/local/lib/php/libphp5.so into server: Cannot load specified object
/usr/sbin/apachectl start: httpd could not be started
libphp5.so was not added to the list. also adding /usr/local/lib/php to the list was to no avail.

I might have ever opened the ld hints file and added something, but never touched the rc though.
Reply With Quote
Old 11th November 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

if adding the ...php subdirectory doesn't help resolve the problem, then I'm out of ideas.

# shlib /usr/local/lib /ur/local/lib/php /usr/lib
Reply With Quote
Old 11th November 2010
joostvgh joostvgh is offline
Port Guard
 
Join Date: Jan 2010
Posts: 38
Default

rebooting led to:

Code:
# ldconfig -r
/var/run/ld.so.hints:
        search directories: /usr/lib:/usr/X11R6/lib:/usr/local/lib
        0:-lkafs.17.0 => /usr/lib/libkafs.so.17.0
        1:-lkrb5.17.0 => /usr/lib/libkrb5.so.17.0
        2:-lmenu.3.0 => /usr/lib/libmenu.so.3.0
        3:-lpanel.3.0 => /usr/lib/libpanel.so.3.0
        4:-lrpcsvc.1.2 => /usr/lib/librpcsvc.so.1.2
        5:-lperl.11.0 => /usr/lib/libperl.so.11.0
        6:-lsndio.3.2 => /usr/lib/libsndio.so.3.2
        7:-lusbhid.3.0 => /usr/lib/libusbhid.so.3.0
        8:-lz.4.1 => /usr/lib/libz.so.4.1
        9:-lcom_err.17.0 => /usr/lib/libcom_err.so.17.0
        10:-lpcap.6.0 => /usr/lib/libpcap.so.6.0
        11:-lskey.5.1 => /usr/lib/libskey.so.5.1
        12:-lFS.8.0 => /usr/X11R6/lib/libFS.so.8.0
        13:-lGL.9.0 => /usr/X11R6/lib/libGL.so.9.0
        14:-lGLU.7.0 => /usr/X11R6/lib/libGLU.so.7.0
        15:-lGLw.5.1 => /usr/X11R6/lib/libGLw.so.5.1
        16:-lI810XvMC.1.0 => /usr/X11R6/lib/libI810XvMC.so.1.0
        17:-lpthread.11.1 => /usr/lib/libpthread.so.11.1
        18:-lg2c.8.1 => /usr/lib/libg2c.so.8.1
        19:-lICE.9.0 => /usr/X11R6/lib/libICE.so.9.0
        20:-lIntelXvMC.1.0 => /usr/X11R6/lib/libIntelXvMC.so.1.0
        21:-lstdc++.47.0 => /usr/lib/libstdc++.so.47.0
        22:-lSM.8.0 => /usr/X11R6/lib/libSM.so.8.0
        23:-lXau.9.0 => /usr/X11R6/lib/libXau.so.9.0
        24:-lXaw.13.0 => /usr/X11R6/lib/libXaw.so.13.0
        25:-locurses.5.0 => /usr/lib/libocurses.so.5.0
        26:-lXaw7.12.0 => /usr/X11R6/lib/libXaw7.so.12.0
        27:-lXcomposite.3.0 => /usr/X11R6/lib/libXcomposite.so.3.0
        28:-lobjc.4.0 => /usr/lib/libobjc.so.4.0
        29:-lXcursor.4.0 => /usr/X11R6/lib/libXcursor.so.4.0
        30:-lmilter.2.1 => /usr/lib/libmilter.so.2.1
        31:-lXdamage.3.1 => /usr/X11R6/lib/libXdamage.so.3.1
        32:-levent.2.0 => /usr/lib/libevent.so.2.0
        33:-lXdmcp.9.0 => /usr/X11R6/lib/libXdmcp.so.9.0
        34:-lsectok.6.0 => /usr/lib/libsectok.so.6.0
        35:-lXfixes.5.0 => /usr/X11R6/lib/libXfixes.so.5.0
        36:-lXfontcache.4.0 => /usr/X11R6/lib/libXfontcache.so.4.0
        37:-lXft.7.0 => /usr/X11R6/lib/libXft.so.7.0
        38:-lXi.10.1 => /usr/X11R6/lib/libXi.so.10.1
        39:-lkvm.9.1 => /usr/lib/libkvm.so.9.1
        40:-lXmu.10.0 => /usr/X11R6/lib/libXmu.so.10.0
        41:-lform.3.0 => /usr/lib/libform.so.3.0
        42:-lXpm.8.0 => /usr/X11R6/lib/libXpm.so.8.0
        43:-lXprintAppUtil.1.0 => /usr/X11R6/lib/libXprintAppUtil.so.1.0
        44:-lXrandr.6.1 => /usr/X11R6/lib/libXrandr.so.6.1
        45:-lXrender.5.0 => /usr/X11R6/lib/libXrender.so.5.0
        46:-lXss.5.0 => /usr/X11R6/lib/libXss.so.5.0
        47:-ldes.9.0 => /usr/lib/libdes.so.9.0
        48:-ltermlib.10.0 => /usr/lib/libtermlib.so.10.0
        49:-lssl.15.0 => /usr/lib/libssl.so.15.0
        50:-lXtst.10.0 => /usr/X11R6/lib/libXtst.so.10.0
        51:-lXvMCW.1.0 => /usr/X11R6/lib/libXvMCW.so.1.0
        52:-lXxf86misc.5.0 => /usr/X11R6/lib/libXxf86misc.so.5.0
        53:-lasn1.17.0 => /usr/lib/libasn1.so.17.0
        54:-lwrap.4.0 => /usr/lib/libwrap.so.4.0
        55:-lXxf86vm.5.0 => /usr/X11R6/lib/libXxf86vm.so.5.0
        56:-lncurses.10.0 => /usr/lib/libncurses.so.10.0
        57:-lotermcap.5.0 => /usr/lib/libotermcap.so.5.0
        58:-lXevie.2.0 => /usr/X11R6/lib/libXevie.so.2.0
        59:-ldmx.1.0 => /usr/X11R6/lib/libdmx.so.1.0
        60:-ldrm.2.4 => /usr/X11R6/lib/libdrm.so.2.4
        61:-lXv.5.0 => /usr/X11R6/lib/libXv.so.5.0
        62:-ldrm_intel.1.1 => /usr/X11R6/lib/libdrm_intel.so.1.1
        63:-lXmuu.5.0 => /usr/X11R6/lib/libXmuu.so.5.0
        64:-lXRes.4.0 => /usr/X11R6/lib/libXRes.so.4.0
        65:-lXinerama.5.0 => /usr/X11R6/lib/libXinerama.so.5.0
        66:-lcrypto.18.0 => /usr/lib/libcrypto.so.18.0
        67:-lfontconfig.6.0 => /usr/X11R6/lib/libfontconfig.so.6.0
        68:-lfontenc.3.0 => /usr/X11R6/lib/libfontenc.so.3.0
        69:-lfreetype.17.0 => /usr/X11R6/lib/libfreetype.so.17.0
        70:-lcurses.10.0 => /usr/lib/libcurses.so.10.0
        71:-lXaw8.13.0 => /usr/X11R6/lib/libXaw8.so.13.0
        72:-llbxutil.1.0 => /usr/X11R6/lib/liblbxutil.so.1.0
        73:-lm.5.0 => /usr/lib/libm.so.5.0
        74:-lpciaccess.0.10 => /usr/X11R6/lib/libpciaccess.so.0.10
        75:-lpixman-1.15.8 => /usr/X11R6/lib/libpixman-1.so.15.8
        76:-lXTrap.10.0 => /usr/X11R6/lib/libXTrap.so.10.0
        77:-lXxf86dga.5.0 => /usr/X11R6/lib/libXxf86dga.so.5.0
        78:-lxkbfile.4.0 => /usr/X11R6/lib/libxkbfile.so.4.0
        79:-lxkbui.4.0 => /usr/X11R6/lib/libxkbui.so.4.0
        80:-ldb.3.1 => /usr/local/lib/libdb.so.3.1
        81:-lmysqlclient.19.0 => /usr/local/lib/libmysqlclient.so.19.0
        82:-lmysqlclient_r.19.0 => /usr/local/lib/libmysqlclient_r.so.19.0
        83:-lcharset.1.0 => /usr/local/lib/libcharset.so.1.0
        84:-lnet.0.0 => /usr/local/lib/libnet.so.0.0
        85:-liconv.7.0 => /usr/local/lib/libiconv.so.7.0
        86:-lXt.10.0 => /usr/X11R6/lib/libXt.so.10.0
        87:-lexpat.9.0 => /usr/lib/libexpat.so.9.0
        88:-lXext.10.0 => /usr/X11R6/lib/libXext.so.10.0
        89:-lutil.11.0 => /usr/lib/libutil.so.11.0
        90:-lasprintf.1.0 => /usr/local/lib/libasprintf.so.1.0
        91:-lgssapi.5.0 => /usr/lib/libgssapi.so.5.0
        92:-lgettextlib.2.0 => /usr/local/lib/libgettextlib.so.2.0
        93:-lgettextpo.3.0 => /usr/local/lib/libgettextpo.so.3.0
        94:-lXp.10.0 => /usr/X11R6/lib/libXp.so.10.0
        95:-ledit.3.0 => /usr/lib/libedit.so.3.0
        96:-lXfont.8.0 => /usr/X11R6/lib/libXfont.so.8.0
        97:-lXvMC.5.0 => /usr/X11R6/lib/libXvMC.so.5.0
        98:-lgettextsrc.2.0 => /usr/local/lib/libgettextsrc.so.2.0
        99:-lreadline.3.0 => /usr/lib/libreadline.so.3.0
        100:-ldb_cxx.4.0 => /usr/local/lib/libdb_cxx.so.4.0
        101:-lc.51.0 => /usr/lib/libc.so.51.0
        102:-lintl.4.0 => /usr/local/lib/libintl.so.4.0
        103:-lX11.11.2 => /usr/X11R6/lib/libX11.so.11.2
        104:-lxml2.10.0 => /usr/local/lib/libxml2.so.10.0
        105:-lossaudio.3.1 => /usr/lib/libossaudio.so.3.1
        106:-ltermcap.10.0 => /usr/lib/libtermcap.so.10.0
        107:-liberty.9.0 => /usr/lib/libiberty.so.9.0
        108:-lbz2.10.4 => /usr/local/lib/libbz2.so.10.4
        109:-lXprintUtil.1.0 => /usr/X11R6/lib/libXprintUtil.so.1.0
and about shlib:

Code:
# shlib /usr/local/lib /ur/local/lib/php /usr/lib
ksh: shlib: not found
Reply With Quote
Old 11th November 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

None of us are really sure about the state of your system, how it was modified, really you chose to do something unsupported and for that reason you're on your own with the fix.

The easiest method would be a reinstall, it is difficult for remote system, you may want to schedule a date to get physical access.. otherwise, you could try using the yaifo project.

It is unofficial but it works over SSH vs glass (..real) or serial consoles, it will allow a clean reinstall so that you can use packages (..which are built from ports) instead of manually compiling everything.

http://erdelynet.com/?s=yaifo
Reply With Quote
Old 11th November 2010
joostvgh joostvgh is offline
Port Guard
 
Join Date: Jan 2010
Posts: 38
Default

okay, thanks for your help/time.

at least now I have learnt something for my future projects

ps: I have not used 'ldconfig', but I have been using 'ld' specifically. I've been browsing the manual but I don't even know what I really did (like I said earlier, 'random' commands). Maybe I have misguided you by not mentioning this before, and perhaps you might come up with something we left unchecked. If not, too bad, and I will leave apache as it is.
Reply With Quote
Old 11th November 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Next: repairing /usr/local. (Repairing /var will be left up to you, moving your database around, etc. and other such administrative activities).

Step 1. Obtain the base46.tgz file set for your i386 architecture system from <your nearest OpenBSD mirror>/pub/OpenBSD/4.6/i386/base46.tgz

Step 2: Unpack it into its own directory structure, wherever there is room, keeping all of the permissions and ownerships:
# mkdir -p <path to directory for the base files>
# cd <path to directory for base files>
# tar xpzf <path to the downloaded>/base46.tgz
Step 3: Reboot in single user mode. At the boot> prompt, type -s. Hit the Enter key at the prompts until you get the shell.

Step 4: Mount your standard filesystems read/write. This should include both /usr/local and your <path to directory for base files>
# mount -a
Step 5: clear /usr/local of all files:
# cd /usr/local
# rm -rf *
Step 6: copy a clean structure over from the unpacked base files>
# cp -pR <path to directory for base files>/usr/local .
Step 7: reboot or exit the shell to start up multiuser mode

Step 8: add php and mysql from packages
# export PKG_PATH=ftp://<your nearest mirror>/pub/OpenBSD/4.6/packages/i386/
# pkg_add <your various desired php5 and mysql packages, even apache2 if you dare -- See your mirror's directory for the lists>
Step 9: Restore your php/mysql/other enviroments.
Reply With Quote
Old 11th November 2010
joostvgh joostvgh is offline
Port Guard
 
Join Date: Jan 2010
Posts: 38
Default

yep, that is indeed what I should do. However I do not find the time nor opportunity at this moment (or the coming) to do this, since the owner is not keen on 'changing something that works' (he likes the server as is).

but definetely, my next server will only use openbsd packages.

also, while still searching for a solution, I encountered this:

Code:
# cd /usr/local/lib/php/
# man ldd
...
# ldd libphp5.so
libphp5.so:
Cannot load specified object
maybe just the lib is invalid, or the rights are?

if it is not, I'm gonna leave it as is. Maybe when I get a chance I will repair my frankenstein, and get it back to life

edit: going to bed now thx again for all the help!

Last edited by joostvgh; 11th November 2010 at 02:23 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:14 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick