BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old May 28th, 2002, 12:30 PM
Schnotz Schnotz is offline
hmm...
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Nashville
Posts: 50 Schnotz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 18 sec
Reputation Power: 8
pthread_getspecific error when starting apache2/php4.3.0dev DSO

I was just trying to install apache 2.0.36 with php4.3.0dev under FreeBSD 4.4 and ran into two problems.
First was the YACC variable in the makefile. It was set to byacc and I changed it to bison -y after running
./configure --enable-ftp --with-apxs2=/usr/net/apache2/bin/apxs
and that solved that. Was able to run make && make install which it would not when I had YACC set to byacc
Changed the httpd.conf for using php
When trying to start apache ./apachectl start I get the error:

Syntax error on line 230 of /usr/net/apache2.conf.httpd.conf:
Cannot load /usr/net/apache2/modules/libphp4.so into server: /usr/net/apache2/modules/libphp4.so: Undefined symbol "pthread_getspecific"
./apachectl start: httpd could not be started

Anybody?

Reply With Quote
  #2  
Old May 28th, 2002, 01:24 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Pembroke Pines, Florida, USA
Posts: 2,300 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 3 h 2 m 4 sec
Reputation Power: 44
Are you trying to install Apache2 with the threaded MPM configuration, or the standard prefork method (like Apache1.3)?

I have not yet been able to get Apache2 with the threaded mpm to work properly, although I finally was able to get both Apache and PHP to compile with that mode.

Here is my apache 2.0.35 configuration:

./configure --exec-prefix=/usr/local --enable-ssl --with-ssl=/usr \
--enable-modules=most --enable-bucketeer --with-mpm=prefork \
--enable-dav --enable-rewrite --enable-so --enable-cgi

PHP needed --with-tsrm-pth in order to configure with Apache2 threaded:

./configure --disable-short-tags --enable-sigchild \
--enable-bcmath --enable-calendar --enable-dio --enable-exif --enable-ftp \
--enable-gd-native-ttf --enable-mbstring --enable-mbregex \
--enable-mime_magic --enable-shmop \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-tokenizer \
--enable-wddx \
--enable-inline-optimization \
--with-apxs2=/usr/local/bin/apxs \
--with-openssl=/usr \
--with-zlib=/usr \
--with-bz2=/usr \
--with-curl=/usr/local \
--with-dom=/usr/local \
--with-gd=/usr/local \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-xpm-dir=/usr/X11R6 \
--with-freetype-dir=/usr/local \
--with-java=/usr/local/jdk1.3.1 \
--with-mcal=/usr/local \
--with-ming=/usr/local/include/ming \
--with-mysql=/usr/local/mysql \
--with-pgsql=/usr/local/pgsql \
--with-tsrm-pth

Also, I had a minor problem after reboot, because suddenly libphp4.so didn't want to see libpth, so I just did "cp /usr/local/lib/pth/libpth* /usr/local/lib", and we were up and running again.

As I said, I was able to get Apache to start with threads, but I was not able to actually load any webpages, and could get no error messages indicating the problem. Once I went to prefork, everything pretty much worked, although it takes a little work to understand some of the changes in httpd.conf.

All in all, considering that Apache2 support in PHP is still officially experimental, and given certain difficulties with FreeBSD threads, etc... I would say it's going to be a few months before Apache2/PHP is going to be as seamlessly functional as Apache1.3/PHP. But hey, let's push it to the limit, and provide as much feedback to bugs.php.net as possible.
__________________
The real n-tier system:

FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

Amazon wishlist -- rycamor (at) gmail.com

Reply With Quote
  #3  
Old May 28th, 2002, 01:40 PM
Schnotz Schnotz is offline
hmm...
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Nashville
Posts: 50 Schnotz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 18 sec
Reputation Power: 8
Good question...You tell me..

apache2 configure
./configure --prefix=/usr/net/apache2 --enable-modules=most --enable-so

I got it to work under RedHat 7.2 without any problems. Same simple configs.

Just trying to get it running.

I am not compiling apache2 with --with-mpm, so I don't know what any defaults would be as far as threading.

I'll try the --with-tsrm-pth for the php ./configure.

edit...
Could not find pth.h , I guess this could be due to php4.3.0 is a dev version.

Last edited by Schnotz : May 28th, 2002 at 01:50 PM.

Reply With Quote
  #4  
Old May 28th, 2002, 02:13 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Pembroke Pines, Florida, USA
Posts: 2,300 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 3 h 2 m 4 sec
Reputation Power: 44
>Could not find pth.h , I guess this could be due to php4.3.0 is a dev version.

Oops... yes, you have to install Gnu Portable Threads from the ports first (/usr/ports/devel/pth).

As to your other questions:

hmm... I haven't yet messed with Apache 2.0.36. You might want to read http://www.apacheweek.com/issues/02-05-10. It looks like there are more options for the MPM now.

In my case, I found that I needed "--enable-bucketeer" and "--with-mpm=prefork" in order to actually get it running.

Also, I had to change httpd.conf (inside the main <directory> container) to allow PHP to access the $PATH_INFO variable (www.domain.com/page.php/path1/path1):

Code:
    Options Indexes FollowSymLinks +Includes
    SetOutputFilter INCLUDES
    AcceptPathInfo on

Last edited by rycamor : May 28th, 2002 at 02:17 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > pthread_getspecific error when starting apache2/php4.3.0dev DSO


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway