[PHP-DEV] Bug #10662: --with-iconv compilation and installation

2001-05-04 Thread abravo

From: [EMAIL PROTECTED]
Operating system: Linux 2.2.10 glibc-2.0.7
PHP version:  4.0.5
PHP Bug Type: Sablotron XSL
Bug description:  --with-iconv compilation and installation

(This is not actually Sablotron extension bug, but I need to use --with-iconv option 
for my system to build in Sablotron and have a problem in this case)

1. The error message during Apache restart:
Cannot load /usr/libexec/apache/libphp4.so into server: 
/usr/libexec/apache/libphp4.so: undefined symbol: iconv_module_entry

2. Configure line:
--with-apxs --prefix=/usr --with-gd --with-gettext --with-yp --with-system-regex 
--with-mysql=/usr --enable-safe-mode --enable-sysvsem --enable-sysvshm 
--with-exec-dir=/home/httpd/php/bin --with-zlib --with-config-file-path=/etc/httpd 
--disable-debug --enable-magic-quotes --enable-bcmath --with-mod_charset 
--enable-calendar --with-iconv --with-sablot

3. Short description
The configure script and compilation go smoothly without errors. ldd libphp4.so shows 
the following:
libpam.so.0 = /lib/libpam.so.0 (0x2abda000)
libdl.so.2 = /lib/libdl.so.2 (0x2abe1000)
libz.so.1 = /usr/lib/libz.so.1 (0x2abe5000)
libexpat.so.0 = /usr/lib/libexpat.so.0 (0x2abf3000)
libsablot.so.0 = /usr/lib/libsablot.so.0 (0x2ac12000)
libmysqlclient.so.6 = /usr/lib/libmysqlclient.so.6 (0x2ac8e000)
libiconv.so.2 = /usr/lib/libiconv.so.2 (0x2aca)
libttf.so.2 = /usr/lib/libttf.so.2 (0x2ad39000)
libgd.so.1 = /usr/lib/libgd.so.1 (0x2ad4e000)
libresolv.so.2 = /lib/libresolv.so.2 (0x2ad85000)
libm.so.6 = /lib/libm.so.6 (0x2ad94000)
libcrypt.so.1 = /lib/libcrypt.so.1 (0x2adad000)
libnsl.so.1 = /lib/libnsl.so.1 (0x2addb000)
libc.so.6 = /lib/libc.so.6 (0x2ade2000)
/lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x2aaab000)
,so all libraries are in place.
But the error message occurs during apache start/restart (see item 1.)

Looking through main/php_config.h I found that there is no line

#define HAVE_ICONV 1

,but if I install it manually I have the following errors during compilation:

make[3]: Entering directory `/mnt/files/linux/www/php/php-4.0.5/ext/iconv'
/bin/sh /mnt/files/linux/www/php/php-4.0.5/libtool --silent --mode=compile gcc  -I. 
-I/mnt/files/linux/www/php/php-4.0.5/ext/iconv 
-I/mnt/files/linux/www/php/php-4.0.5/main -I/mnt/files/linux/www/php/php-4.0.5 
-I/usr/include/apache -I/mnt/files/linux/www/php/php-4.0.5/Zend -I/usr/include/mysql 
-I/mnt/files/linux/www/php/php-4.0.5/ext/xml/expat/xmltok 
-I/mnt/files/linux/www/php/php-4.0.5/ext/xml/expat/xmlparse 
-I/mnt/files/linux/www/php/php-4.0.5/TSRM  -DLINUX=2 -DEAPI -DKEAPI -DUSE_PERL_SSI 
-D_REENTRANT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2  -c iconv.c
iconv.c:59: `php_minit_iconv' undeclared here (not in a function)
iconv.c:59: initializer element for `iconv_module_entry.module_startup_func' is not 
constant
iconv.c:60: `php_mshutdown_iconv' undeclared here (not in a function)
iconv.c:60: initializer element for `iconv_module_entry.module_shutdown_func' is not 
constant
iconv.c:63: `php_info_iconv' undeclared here (not in a function)
iconv.c:63: initializer element for `iconv_module_entry.info_func' is not constant
make[3]: *** [iconv.lo] Error 1

So, there is no way to build working PHP4.0.5 with support of external libiconv 
(outside of glibc, glibc-2.0.7 doesn't have iconv functions). PHP4.0.4pl1 was built 
and run successfully on the same system with the same configuration options.


-- 
Edit Bug report at: http://bugs.php.net/?id=10662edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8928: xslt_process randomly fails on valid xml/xsl data (xslt_run works fine)

2001-01-26 Thread abravo

From: [EMAIL PROTECTED]
Operating system: Linux (kernel 2.2.10,glibc-2.0.7)
PHP version:  4.0.4pl1
PHP Bug Type: Sablotron XSL
Bug description:  xslt_process randomly fails on valid xml/xsl data (xslt_run works 
fine)

This script randomly fails (on the same xml/xsl data it works or randomly fails with 
the only error:
Fatal error: msgtype: error in /home/httpd/html/photo/tstxsl1.php on line 29  
, which is xslt_process call.
I can't set the user error handler while using xslt_process to get more error 
information, because can't pass $parser to this function.)  :


?php
function xsl_error($parser, $code, $level, $errors)
{
echo "Parser: $parser\nbr\n";
echo "Code:   $code\nbr\n";
echo "Level:  $level\nbr\n";
echo "Errors: \nbr\nbr\n";
var_dump($errors);
}

$fp = fopen("pic1.xsl", "r");
$lenxsl = filesize("pic1.xsl");
$xslData = fread($fp, $lenxsl);
fclose($fp);

$fp = fopen("pic.xml", "r");
$lenxml = filesize("pic.xml");
$xmlData = fread($fp, $lenxml);
fclose($fp);

/* 
  Parser creation could be omitted, it doesn't influence on the random crashes 
*/
$parser = xslt_create();
print "Parser Handle[$parser]br";
xslt_set_error_handler($parser, "xsl_error");

if (xslt_process($xslData, $xmlData, $result))
{
  echo $result;
} else {
  echo "\tError number: " . xslt_errno() . "\n";
  echo "\tError string: " . xslt_error() . "\n";
  exit;
}

/* this should be omitted if xsl_creat() is commented out */
xslt_free($parser);
?

Sablotron comand line utility sabcmd parses xml/xsl data from the files pic1.xsl and 
pic.xml without any errors/warnings.
The following script, which doesn't use xslt_process, works stable and without errors 
on the same data files:

?php
function xsl_error($parser, $code, $level, $errors)
{
echo "Parser: $parser\nbr\n";
echo "Code:   $code\nbr\n";
echo "Level:  $level\nbr\n";
echo "Errors: \nbr\nbr\n";
var_dump($errors);
}

$parser = xslt_create();
print "Parser Handle[$parser]br";

xslt_set_error_handler($parser, "xsl_error");

xslt_run($parser, './pic1.xsl', './pic.xml');
print "brHere is the output:br".xslt_fetch_result($parser);
xslt_free($parser);
?

But I need at least xml "in-memory" data for my application, so I can't use xslt_run 
for my production purposes.
Suggestion - something wrong with xslt_process :)

php.ini - standard configuration from php4.04pl1 distribution
Sablotron 0.50
Expat 1.95.1
php4 configuration:
--with-apxs --prefix=/usr --with-gd --with-gettext --with-yp --with-system-regex 
--with-mysql=/usr --enable-safe-mode --enable-sysvsem --enable-sysvshm 
--with-exec-dir=/home/httpd/php/bin --with-zlib --with-config-file-path=/etc/httpd 
--disable-debug --enable-magic-quotes --enable-bcmath --with-mod_charset --with-pdflib 
--with-cpdflib --enable-calendar --with-sablot
configure script was hacked a little to provide libexpat and libiconv (glibc-2.0.7 has 
no native iconv) for Sablotron
instead of old libxmlparse and libxmltok. There were no any problem with compilation 
of php4.



-- 
Edit Bug report at: http://bugs.php.net/?id=8928edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]