ID:               14594
 Comment by:       mikesolec at hotmail dot com
 Reported By:      juraj at bednar dot sk
 Status:           Closed
 Bug Type:         Apache2 related
 Operating System: FreeBSD 4.4-STABLE
 PHP Version:      4.1.0
 New Comment:

#***************************************
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


Previous Comments:
------------------------------------------------------------------------

[2002-09-22 22:09:17] 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 每prefix=/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();....

------------------------------------------------------------------------

[2002-09-13 06:49:40] 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 每dc pth-1.4.1.tar.gz | tar xvf 每
./configure --prefix=/usr/local/
make
make test
make install

gzip 每dc httpd-2.0.40.tar.gz | tar xvf 每
gzip 每dc php-4.2.3.tar.gz | tar xvf 每
cd httpd-2.0.40
./configure 每prefix=/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-11 23:40:35] 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-06-13 09:04:28] 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-06-05 18:00:21] 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.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/14594

-- 
Edit this bug report at http://bugs.php.net/?id=14594&edit=1

Reply via email to