Some more news on midgard.so, especially for David and phr:
First, I've changed the suse standard startup script for apache. This
was one reason why midgard.so didn't show up:
-------------------------------------
# check for PHP4 support
#
if ! test "$HTTPD_SEC_MOD_PHP" == "no" ; then
test -e /usr/lib/apache/libphp4.so || \
test $(/usr/sbin/httpd -l | grep "mod_php4.c") = "mod_php4.c"
2> /dev/null \
&& MODULES="-D PHP4 $MODULES" && echo -n " PHP4"
fi
#
# check for Midgard and PHP3 support, which are mutually exclusive
# midgard mit php4
if [ -e /usr/lib/apache/mod_midgard.so ]; then
test "$HTTPD_SEC_MOD_MIDGARD" == "no" || MODULES="-D
MIDGARD $MODULES" && echo -n " Midgard 1.4x"
# else
# test "$HTTPD_SEC_MOD_PHP" == "no" || test -e
/usr/lib/apache/libphp3.so \
# && MODULES="-D PHP $MODULES" && echo -n " PHP3"
fi
-------------------------------------
So, we FIRST check for php4 and THEN for mod_midgard.so.
Next is httpd.conf: Swapping of the loading of php4 and mod_midgard in
httpd.conf is a bit more tricky: If php4 is not present in time, the
php_value magic_quotes_gpc off
php_value magic_quotes_runtime off
calls from the included midgard.conf do fail - logical. I now have the
following order in httpd.conf:
# PHP4 Modul
<IfDefine PHP4>
LoadModule php4_module /usr/lib/apache/libphp4.so
</IfDefine>
# Midgard 1.4
<IfDefine MIDGARD>
LoadModule midgard_module /usr/lib/apache/mod_midgard.so
# AddModule mod_midgard.c
# Include /etc/httpd/midgard-data.conf
</IfDefine>
Second:
<IfDefine PHP4>
AddModule mod_php4.c
</IfDefine>
<IfDefine MIDGARD>
AddModule mod_midgard.c
</IfDefine>
And finally, at the very end of the conf:
<IfDefine MIDGARD>
Include /etc/httpd/midgard-data.conf
</IfDefine>
This order seems to work. See error_log for apache startup:
[Wed Apr 25 12:30:32 2001] [notice] Apache/1.3.14 (Unix) (SuSE/Linux)
mod_perl/1.24 Midgard/1.4.1 PHP/4.0.4pl1 configured -- resuming normal
operations
So the error_log contains NO "can't find midgard.so" messages.
QUESTION: Ist there a reason why midgard.so resides in a directory with
THAT unnusual name?
root@locutus:/usr/lib/php/extensions/no-debug-non-zts-20001214 > ls
midgard.so
As the loading probs are vanished, I now have messages from the midgard
module itself ;-( After connecting any .php (non-midgard) project, I
get:
----------------------------------------
[Wed Apr 25 12:34:51 2001] [debug] mod_midgard.c(1195): [client
192.168.0.1] midgard_translate_handler(latin1, http://localhost:80/php/
admin/index.php3)
midgard-lib: mgd_connect to midgard@localhost failed: Can't connect to
local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)[Wed
Apr 25 12:34:51 2001] [warn] [client 192.168.0.1] Midgard: failed to
open localhost for midgard
[Wed Apr 25 12:34:52 2001] [notice] child pid 1956 exit signal
Segmentation fault (11)
----------------------------------------
BTW: mysqld is active on localhost and midgard.conf says:
----------------------------------------------
# dbname - user - pw
MidgardDatabase midgard midgard midgard
## Uncomment these if you want to use filetemplates
# MidgardTemplate phpelements.xml
# AddType application/x-httpd-php-midgard .mgd
## Uncomment this for PHP3,
## MidgardRootFile "/usr/lib/apache/midgard-root.php3"
## or this for PHP4
MidgardRootFile "/etc/httpd/modules/midgard-root.php"
NameVirtualHost 192.168.0.1:80
<VirtualHost 192.168.0.1:80>
MidgardEngine On
ServerName locutus
Port 80
# Switch off magic quotes - it is required with Midgard
php_value magic_quotes_gpc off
php_value magic_quotes_runtime off
# Configure text parser:
# Change to 'russian' for Russian Midgard
MidgardParser latin1
MidgardBlobDir "/var/www/blobs"
# Configuration for Russian Midgard:
<IfModule mod_charset.c>
[....]
</VirtualHost>
----------------------------------
I also changed "ServerName locutus" to "ServerName localhost",
but with the same result - no connects. The midgard db is definitely
there and user midgard hast Select, Insert, Update & Del privs in db
midgard on host localhost.
Recommendation: If possible, it would be better to insert midgard
in a way that problems on the midgard connect or midgard database level
do NOT interfere with other parts of php in way that they "block" them
;-). E.g. mod_midgard could a) spit a warning and b) unload somehow
if it can't get to the database for some reason. That would be more
tolerant. towards other php projects on the same server.
OK, what are the next steps from here?
-------------------------------------------------------
Thomas M. ROTHER - "netzwissen" - D-73728 Esslingen
F.R. Germany/EU
- http://www.netzwissen.de (Updated!)
Public PGP Key available from http://www.keyserver.net
-------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]