On Wed, 2005-05-25 at 15:32 +0200, Piotras wrote:
> Mike Bedwell <[EMAIL PROTECTED]> wrote:
> 
> > > Sorry, I do not understand. How you do "set" ZTS?  What do You mean?
> > > It should be defined in php header files.
> > 
> > Since my mod_php install was installed with ZTS enabled, and since
> > midgard-php4 didn't seem to be setting ZTS to defined, i used
> > preprocessor commands  in the header files to #define ZTS
> 
> 1.6.3 was released to use ZTS.
> However it affected only debian at that time, and debian packages were 
> compiled 
> with ZTS without any problem.

Everything compiles successfully on Gentoo as well.  However, when I
restart apache, it fails to load the php module midgard.so
Here is the error log from error.log.  As you can see, the apache module
loads but not the php module.

[Tue May 24 21:58:29 2005] [notice] caught SIGTERM, shutting down
[Tue May 24 21:58:33 2005] [notice] Digest: generating secret for digest
authent
ication ...
[Tue May 24 21:58:33 2005] [notice] Digest: done
PHP Warning:  Unknown(): Unable to load dynamic library
'/usr/lib/php/extensions
/no-debug-zts-20020429/midgard.so'
- /usr/lib/php/extensions/no-debug-zts-200204
29/midgard.so: undefined symbol: compiler_globals in Unknown on line 0
[Tue May 24 21:58:34 2005] [notice] Apache/2.0.54 (Gentoo/Linux)
PHP/4.3.11 Midg
ard/1.6.3/Repository/MultiLang configured -- resuming normal operations

 
> 
> > Yes I am.  I uninstalled all of my php, then re-installed just to cover
> > that base.  The only thing I can think of that might be an issue here,
> > is that gentoo installs php (cli) without zts enabled, and installed
> > mod_php with zts enabled (via --enable-experimental-zts)
> 
> Both packages should have own ini files and different extensions dirs.
> Can you send me make errors? All of them.
> 
> Piotras

Both packages do have their own ini files and extension dirs.  Or, at
least they did.  I'd like to send you make errors, but, as I mentioned
above, the package compiles fine, it just doesn't seem to have ZTS
defined.  Per php_midgard.h if ZTS is defined, it should #include
"TSRM.h".  This wasn't happening.  If I manually #defined it by editing
headers, then make would fail with the following output:

 gcc -I. -I/root/Midgard_AllinOne/midgard-php4-1.6.3 -DPHP_ATOM_INC
-I/root/Midgard_AllinOne/midgard-php4-1.6.3/include
-I/root/Midgard_AllinOne/midgard-php4-1.6.3/main
-I/root/Midgard_AllinOne/midgard-php4-1.6.3 -I/usr/include/php
-I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend
-I/apache2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-I/usr/include/mysql -I/usr/include/apache2 -DHAVE_CONFIG_H -g -O2
-c /root/Midgard_AllinOne/midgard-php4-1.6.3/midgard.c  -fPIC -DPIC
-o .libs/midgard.o
In file included from /usr/include/php/Zend/zend_alloc.h:26,
                 from /usr/include/php/Zend/zend.h:210,
                 from /usr/include/php/main/php.h:34,

from /root/Midgard_AllinOne/midgard-php4-1.6.3/php_midgard.h:54,

from /root/Midgard_AllinOne/midgard-php4-1.6.3/midgard.c:24:
/usr/include/php/TSRM/TSRM.h:105: error: syntax error before "THREAD_T"
/usr/include/php/TSRM/TSRM.h:120: error: syntax error before "thread_id"
/usr/include/php/TSRM/TSRM.h:121: error: syntax error before "thread_id"
/usr/include/php/TSRM/TSRM.h:128: error: syntax error before
"tsrm_thread_id"
/usr/include/php/TSRM/TSRM.h:128: warning: data definition has no type
or storage class
/usr/include/php/TSRM/TSRM.h:129: error: syntax error before
"tsrm_mutex_alloc"
/usr/include/php/TSRM/TSRM.h:129: warning: data definition has no type
or storage class
/usr/include/php/TSRM/TSRM.h:130: error: syntax error before "mutexp"
/usr/include/php/TSRM/TSRM.h:131: error: syntax error before "mutexp"
/usr/include/php/TSRM/TSRM.h:132: error: syntax error before "mutexp"
make: *** [midgard.lo] Error 1

I modified Gentoo's ebuild file for php to include
--enable-experimental-zts and then recompiled midgard-php and all seems
to be fine now, modules load and everything.  i don't know if that means
there is a bug in Gentoo's method of installing php (doesn't enable zts)
and mod_php (does enable zts), or if there is a bug in
midgard-php(doesn't detect that it should enable zts).  But, it does
correct the problem to make sure that both mod_php and cli php are
compiled with zts.      

-- 
Mike



Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to