DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th July 2008
co_bofh co_bofh is offline
New User
 
Join Date: Jul 2008
Posts: 8
Default Problem with php and apache on OpenBSD

Default apache
Packages:

php5-core-5.1.4p2 server-side HTML-embedded scripting language
php5-curl-5.1.4p0 curl URL library extensions for php5
php5-gd-5.1.4p0 image manipulation extensions for php5
php5-mysql-5.1.4p0 mysql database access extensions for php5

However the gd.so module doesn't load:

PHP Warning: PHP Startup: Unable to load dynamic library '/var/www/lib/php/modules/gd.so' - Cannot load specified object in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/var/www/lib/php/modules/gd.so' - Cannot load specified object in Unknown on line 0

Originally I installed the package for standalone gd and rrdtool and had to install X4.0. Unfortunately gd still couldn't find freetype and fontconfig. Even after running ldconfig -m to include the X paths. Frustrated, I removed the gd package and compiled gd 2.0.35 instead which worked. I compiled an older version of rrdtool because cairo wasn't able to find fontconfig and freetype (needed for newest version of rrdtool) and it works and creates graphs so I know the standalone gd tool is working.

The main issue is the lack of reasonable information on why something's not working. "Cannot load specified object" is just an idiot light type of message. "Hey, there's a problem in the car. Take it to a mechanic."

Sorry for the rant. Followups are gratefully accepted.

Carl

Last edited by co_bofh; 27th July 2008 at 06:49 PM.
Reply With Quote
  #2   (View Single Post)  
Old 27th July 2008
co_bofh co_bofh is offline
New User
 
Join Date: Jul 2008
Posts: 8
Default

In case it helps

OpenBSD 4.0 64 Bit
AMD 3000+, 1 gig of ram, 120gig of disk.

Carl
Reply With Quote
  #3   (View Single Post)  
Old 27th July 2008
ai-danno's Avatar
ai-danno ai-danno is offline
Spam Deminer
 
Join Date: May 2008
Location: Boca Raton, Florida
Posts: 284
Default

A few things-

Most people here will tell you that you are working with an older version of OBSD which is no longer officially supported. 4.3 is out, and 4.4 is around the corner.

Also, is the path being designated in the error message actually real? Does gd.so actually live there, or could it be somewhere else? I know that sounds like a stupid question, but I've done this before.

Also, from what I can remember, until recently, rrdtool was 1.049 for quite awhile (as in the standard version for most releases of OBSD of late.) So when you say you loaded an older version, what version was that?

I can say with certainty that I had all of this working when I ran 4.0 - it was used for a Cacti installation (which ran, but was really really slow.) But coming full circle, instead of beating your head against a wall on this, you may want to install a newer version of OBSD. The nice thing about this solution is that the newer version of rrdtool is included as a package (1.2), and the quality of the graphics is vastly improved over 1.049 (or whatever earlier version you are using.)
__________________
Network Firefighter
Reply With Quote
  #4   (View Single Post)  
Old 27th July 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

Have you seen http://www.mail-archive.com/misc@ope.../msg62227.html ?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #5   (View Single Post)  
Old 27th July 2008
ai-danno's Avatar
ai-danno ai-danno is offline
Spam Deminer
 
Join Date: May 2008
Location: Boca Raton, Florida
Posts: 284
Red face

Well it would seem I was completely off. Apologies.
__________________
Network Firefighter
Reply With Quote
  #6   (View Single Post)  
Old 27th July 2008
co_bofh co_bofh is offline
New User
 
Join Date: Jul 2008
Posts: 8
Default

Quote:
Originally Posted by ai-danno View Post
A few things-

Most people here will tell you that you are working with an older version of OBSD which is no longer officially supported. 4.3 is out, and 4.4 is around the corner.
Appreciate that. The ISP I'm using prebuilds systems and 4.0 is the newest version they have available.

Quote:
Also, is the path being designated in the error message actually real? Does gd.so actually live there, or could it be somewhere else? I know that sounds like a stupid question, but I've done this before.
Don't worry about the questions Yes, the path exists and is readable as the mysql and curl libraries load without a problem.

Quote:
Also, from what I can remember, until recently, rrdtool was 1.049 for quite awhile (as in the standard version for most releases of OBSD of late.) So when you say you loaded an older version, what version was that?
1.0.49 is the version I rolled back to. There's a 1.3.1 version but it's replace one of the libraries with cairo which is what I was having problems installing.

Quote:
I can say with certainty that I had all of this working when I ran 4.0 - it was used for a Cacti installation (which ran, but was really really slow.) But coming full circle, instead of beating your head against a wall on this, you may want to install a newer version of OBSD. The nice thing about this solution is that the newer version of rrdtool is included as a package (1.2), and the quality of the graphics is vastly improved over 1.049 (or whatever earlier version you are using.)
Unfortunately my options are limited there. I'm moving from a 3.9 install that was working without a problem to 4.0.

And to answer the next question, I have xbase40, xfont40, xserv40 and xshare40 installed and did use the -p flag

I just tried to create php from source and include the gd library on the command line and am getting a failure during configure. It finds the libraries:

Code:
checking for GD support... yes
checking for the location of libjpeg... /usr/local
checking for the location of libpng... /usr/local
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... /usr/local
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
checking for FT_New_Face in -lfreetype... yes
checking for gdImageString16 in -lgd... no
Code:
int main() {
gdNewDynamicCtxEx()
; return 0; }
configure:42954: gcc -c -g -O2 -I/usr/local/include conftest.c 1>&5
configure: In function `main':
configure:42949: warning: assignment makes pointer from integer without a cast
configure:43436: checking for gdImageCreate in -lgd
configure:43455: gcc -o conftest -g -O2  -L/usr/local/lib  -L/usr/local/lib conftest.c -lgd  -lgd -lfreetype -lpng -lz -ljpeg -lssl -lcrypto -lz -lssl -lcrypto -lm  -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 1>&5
/usr/local/lib/libgd.so.2.0: warning: strcpy() is almost always misused, please use strlcpy()
/usr/local/lib/libgd.so.2.0: warning: sprintf() is often misused, please use snprintf()
/usr/local/lib/libgd.so.2.0: warning: strcat() is almost always misused, please use strlcat()
/usr/local/lib/libgd.so.2.0: undefined reference to `pthread_mutex_unlock'
/usr/local/lib/libgd.so.2.0: undefined reference to `pthread_mutex_destroy'
/usr/local/lib/libgd.so.2.0: undefined reference to `pthread_mutex_lock'
/usr/local/lib/libgd.so.2.0: undefined reference to `pthread_mutex_init'
collect2: ld returned 1 exit status
configure: failed program was:
#line 43444 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gdImageCreate();

int main() {
gdImageCreate()
; return 0; }
So I'm wondering if I still have an unresolved problem with gd that didn't pop up during the configure/make/install.

Thanks for the answers though.

Carl
Reply With Quote
  #7   (View Single Post)  
Old 27th July 2008
co_bofh co_bofh is offline
New User
 
Join Date: Jul 2008
Posts: 8
Default

Quote:
Originally Posted by J65nko View Post
Yep. I just pkg_delete the old gd and installed the no_x11 version and no change in the log.

Also, I do have the xbase, etc files installed.

Thanks.

Carl
Reply With Quote
  #8   (View Single Post)  
Old 27th July 2008
co_bofh co_bofh is offline
New User
 
Join Date: Jul 2008
Posts: 8
Default

I did a search on the error kicked back by the php compile (mutex threads...) and found a post where CFLAGS='-pthreads' and then recompile the gd lib. I did that and then tried to recompile php and it passed the configure step successfully building the gd test. So that might have fixed it.

Thought I'd post the potential answer for a google search

More posts as I finish (cross fingers)

Carl
Reply With Quote
  #9   (View Single Post)  
Old 27th July 2008
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by co_bofh View Post
The ISP I'm using prebuilds systems and 4.0 is the newest version they have available.
It may be worth your time to point out to them that OpenBSD 4.0 is no longer officially supported. Quoting Section 5.1 of the official FAQ:
You will also note that in the above example, the 4.0-stable branch came to an end with 4.2-release, and the 4.1-stable branch came to an end with 4.3-release -- old releases are typically supported up to two releases back. It takes resources and time to support older versions, while we might like to provide ongoing support for old releases, we would rather focus on new features.
Reply With Quote
Old 27th July 2008
co_bofh co_bofh is offline
New User
 
Join Date: Jul 2008
Posts: 8
Default

Well I'll pass it along but I don't expect all that much. On the positive side, once they do the installation it's hands off and only I have access to the entire system.

Maybe I should be checking out how to upgrade on the fly

Carl
Reply With Quote
Old 27th July 2008
co_bofh co_bofh is offline
New User
 
Join Date: Jul 2008
Posts: 8
Default

I got php compiled with mysql and gd and it seems to have worked. I'm getting the pthread_mutex_unlock/destroy/lock/init errors in the log file but the images are being resized using the gd libraries so it's good. I can track down the problems at my leisure and not affect the folks who use the forum on the server.

Of course if you have an idea on the pthreads issue that I thought I fixed, I'd be happy to try and fix it

Thanks for listening.

Carl
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
openvpn on openbsd problem.... michaelk OpenBSD Security 8 9th February 2011 04:49 AM
Big5 Character Set in Apache problem after upgrade to 6.4 paul-lkw FreeBSD Installation and Upgrading 0 23rd February 2009 09:20 AM
Apache: problem with rewritten content-type header Malakim General software and network 2 3rd December 2008 07:51 PM
Apache Problem ( Permission ) dctr FreeBSD General 8 27th May 2008 09:48 PM
apache fd size problem oxy FreeBSD Ports and Packages 0 10th May 2008 10:49 AM


All times are GMT. The time now is 12:40 PM.


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