php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14594 Failed to compile/run when using Apache 2.x, unresolved symbols
Submitted: 2001-12-18 18:40 UTC Modified: 2002-06-05 18:00 UTC
Votes:20
Avg. Score:4.8 ± 0.5
Reproduced:18 of 18 (100.0%)
Same Version:8 (44.4%)
Same OS:11 (61.1%)
From: juraj at bednar dot sk Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.1.0 OS: FreeBSD 4.4-STABLE
Private report: No CVE-ID: None
 [2001-12-18 18:40 UTC] juraj at bednar dot sk
I compiled standard Apache-2.0.28beta, then downloaded 
php-4.1.0, compiled it just with --with-mysql and 
--with-apxs2=/usr/local/apache2/bin/apxs

After sucessful make install, I tried to run 
/usr/local/apache2/bin/httpd, which resulted in this error:

Syntax error on line 3 of 
/usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into 
server: /usr/local/apache2/modules/libphp4.so: Undefined 
symbol "pthread_getspecific"



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-09 05:57 UTC] jon at nsql dot com
Exactly the same dump with 4.1.1 with apache 2.0.28 on exactly the same os.
 [2002-02-23 05:07 UTC] phpbug at markng dot co dot uk
I just found this bug after I posted #15684 .  If you want a workaround, install gnu-pth , and configure with --with-tsrm-pth as part of your options.
 [2002-04-06 11:08 UTC] sniper@php.net
Does this happen with latest CVS versions of PHP and Apache2?

 [2002-04-06 15:04 UTC] eric at ecks dot org
FreeBSD 4.5-RELEASE
Apache 2.0.35
CVS PHP (pulled 2002-04-06 ~14:00 EST)

PHP config line:
./configure --with-apxs2 --enable-track-vars --enable-versioning --with-mysql=/usr/local/mysql

And the result:
Cannot load /usr/local/lib/apache/modules/libphp4.so into server: /usr/local/lib/apache/modules/libphp4.so: Undefined symbol "pthread_getspecific"
 [2002-04-07 11:42 UTC] gnusy at option-fr dot com
Same problem still on FreeBSD4.5
tested with:

apache cvs 2.0.36 with php4.2.0RC2
apache cvs 2.0.36 with last php cvs (update on 7/04)
apache release 2.0.35 with php4.2.0RC
apache release 2.0.35 with last php cvs

finally works with using trsm-pth with in php configure.
 [2002-04-14 19:30 UTC] klansman at arrakis dot dhis dot org
i had the same problem.

using freebsd 4.5, apache 2.0.25, php 4.2.0RC3

trying with gnu-pth
 [2002-04-15 08:15 UTC] tino at tino dot nl
Exactly the same error here.

FreeBSD 4.5 / Release
Apache 2.0.35
PHP 4.2.0RC4

Tried:

./configure --with-apache=/usr/local/apache2/bin/apxs --with-tsrm-pth

Didn't work:

./apachectl configtest
Syntax error on line 217 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: Undefined symbol "pthread_getspecific"
 [2002-04-15 09:36 UTC] josh at lokot dot com
Same results on FreeBSD 4.2-RELEASE with Apache 2.0.35 / PHP 4.2.0RC4
 [2002-04-15 16:30 UTC] klansman at arrakis dot dhis dot org
My installation worked!

installed gnu pth and used 
--with-tsrm-pth=/usr/local/libs/pth in the configure script.

Note that this is warned in the end of the configure process.

[]
 [2002-04-19 11:36 UTC] aaron@php.net
This bug has already been fixed in the latest released version of
PHP, which you can download at http://www.php.net/downloads.php

The apache2filter is known to work with Apache 2.0.35
and either CVS HEAD or the 4.2.0 branch (or the latest 
release candidate). Please report back if you have any
problems related to FreeBSD 4.x and these versions.
 [2002-05-01 20:59 UTC] erkan dot boga at netiq dot com
I am using FreeBSD 4.5, Apache 2.0.35, GNU Pth 1.4.1 and PHP 4.2

I still get the error 
Cannot load /prog/httpd/modules/libphp4.so into server: /prog/httpd/modules/libphp4.so: Undefined symbol "pthread_getspecific"
./apachectl start: httpd could not be started

even if i have installed php 4.2 with the --with-tsrm-pth option
I have spend now 5 hours to find a solution but i couldn't find any workaround... 
any ideas ?

regards,

erkan
 [2002-05-21 16:08 UTC] stimpy at broekiemedia dot nl
I'm using FreeBSD 4.5, Apache-2.0.35 for freebsd 4.5, mysql-3.23.49-unknown-freebsdelf4.4-i386

I compiled with --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs

httpd.conf contains:
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php

And also I get this error:
Failed to start apache : 
Syntax error on line 217 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: Undefined symbol "pthread_getspecific"
/usr/local/apache2/bin/apachectl start: httpd could not be started
 [2002-06-05 14:34 UTC] spammerprotect at aol dot com
This seems to be an FreeBSD Error only.
To solve first install pth-1.4 package from the ports
The you have to recompile php with the option:

--with-tsrm-pth, to make him use the gnu pth instead of 
the posix ones (that dont seem to work with FBSD)
then rebuild and reinstall the php-mod and it will just 
work fine

Cheers Fire
--------------------------------------------------------

On [18 Dec 2001 6:40pm] juraj@bednar.sk wrote :


I compiled standard Apache-2.0.28beta, then downloaded 
php-4.1.0, compiled it just with --with-mysql and 
--with-apxs2=/usr/local/apache2/bin/apxs

After sucessful make install, I tried to run 
/usr/local/apache2/bin/httpd, which resulted in this error:

Syntax error on line 3 of 
/usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into 
server: /usr/local/apache2/modules/libphp4.so: Undefined 
symbol "pthread_getspecific"
 [2002-06-05 18:00 UTC] juraj at bednar dot sk
As you can see in the history, this is fairly   
common, at least a warning during ./configure   
would be nice (i.e. -- you can't compile this   
without --with-tsrm-pth and quit). Because  
people will always try to compile it without. Or  
enabling --with-tsrm-pth on freebsd by default  
and raising error, when the library is not  
found. Hm?  
Because now you closed the bug, provided a 
workaround (not a solution) and people will have 
to google out the workaround, since there's no 
documentation for it.
 [2002-06-13 09:04 UTC] jjas at engr dot uky dot edu
Installing gnu-pth is the solution, not just a work around. Take a look at the port's Makefile: /usr/ports/www/mod_php4/Maiefile. You'll see that it also installs gnu-pth.

The problem isn't just a PHP problem. I've encountered this compiling numerous packages on FreeBSD 4.x because FreeBSD <= 4 does not have a working pthread library. You have to use compiler tricks to compile threaded software and some packages still won't work unless a real thread library is installed.

FreeBSD 5.0 supposedly corrects this, but I haven't tried it.
 [2002-09-11 23:40 UTC] fk at ol dot ru
Looks like in the latest CVS STABLE release (200209110900) this problem occurs again:

Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: Undefined symbol "pthread_getspecific"

System: FreebBSD 4.6, Apache 2.0.40
 [2002-09-13 06:49 UTC] hanna at dq dot cnpc dot com dot cn
FreeBsd4.6+httpd-2.0.40+php-4.2.3

first:install gnu-pth-1.4.1

gnu-pth-1.4.1
place gnu-pth-1.4.1 /usr/local/bin
gzip ?Cdc pth-1.4.1.tar.gz | tar xvf ?C
./configure --prefix=/usr/local/
make
make test
make install

gzip ?Cdc httpd-2.0.40.tar.gz | tar xvf ?C
gzip ?Cdc php-4.2.3.tar.gz | tar xvf ?C
cd httpd-2.0.40
./configure ?Cprefix=/www --enable-module=so
make 
make install
cd ../php-4.2.3
./configure --with-mysql=/www/mysql --with-apxs2=/www/bin/apxs --with-tsrm-pth --with-gd=/usr/local --enable-trans-sid --enable-track-vars

// ---------if you have't gd ,remove --with-gd=/usr/local

make 
make install 
cp php.ini-dist /usr/local/lib/php.ini

add  httpd.conf :
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps
LoadModule php4_module modules/libphp4.so 


//_________ finish all of above,you will phpinfo();....
 [2002-09-22 22:09 UTC] cn_star at 21cn dot com
FreeBsd4.6.2+mysql-3.23.52+httpd-2.0.40+php-4.2.3

1??INSTALL mysql:
tar vxzf mysql-3.23.52.tar.gz
cd mysql-2.23.52
./configure 
--prefix=/path/to/mysql
./make
./make install


2??INSTALL pth-1.4.1:
tar vxzf pth-1.4.1.tar.gz
cd pth-1.4.1
./configure 
(You cann't use "./configure --prefix=/path/to/" !!!)
make
make test
make install

3??INSTALL httpd-2.0.40:
tar vxfz httpd-2.0.40.tar.gz 
cd httpd-2.0.40
./configure ?Cprefix=/path/to/httpd --enable-module=so
make 
make install

4??INSTALL php-4.2.3:
tar vxfz php-4.2.3.tar.gz 
cd ../php-4.2.3
./configure --with-mysql=/path/to/mysql --with-apxs2=/path/to/httpd/bin/apxs
--with-tsrm-pth --with-gd=/usr/local --enable-trans-sid
--enable-track-vars

// ---------if you have't gd ,remove --with-gd=/usr/local

make 
make install 
cp php.ini-dist /usr/local/lib/php.ini

add  httpd.conf :
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps

//_________ finish all of above,you will phpinfo();....
 [2004-06-11 16:56 UTC] mikesolec at hotmail dot com
#***************************************
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .php3s
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#***************************************
I add this line to my httpd.conf in APACHE, i already installed PHP, Im using FREEBSD 5.2.1, for some reasons..there's an error showing Syntax error on line 1 of /usr/local/etc/apache/httpd.conf: Invalid command 'AddType', perhaps misspelled or defined by a module not included in the server configuration /usr/local/sbin/apachectl start: httpd could not be started. Can someone help me on this error? Im a newbie open source fan. Thanks
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Aug 04 17:23:22 2021 UTC