ID:               31618
 User updated by:  kibab at icehouse dot net
 Reported By:      kibab at icehouse dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         Filesystem function related
 Operating System: redhat enterprise
 PHP Version:      5.0.3
 New Comment:

Ok.  I installed libxml2-2.6.16 and compiled both. STABLE  
snapshot from last night compiles fine and links to the  
new libxml2.  UNSTABLE fails linking:  
  
...  
ext/libxml/libxml.lo(.text+0x362): In function  
`_php_libxml_free_error':  
/root/builds/php5-200503091530/ext/libxml/libxml.c:339:  
undefined reference to `xmlResetError'  
ext/libxml/libxml.lo(.text+0x394): In function  
`_php_list_set_error_structure':  
/root/builds/php5-200503091530/ext/libxml/libxml.c:353:  
undefined reference to `xmlCopyError'  
ext/libxml/libxml.lo(.text+0xa1e): In function  
`zm_deactivate_libxml':  
  
So, I could only try it out on the new STABLE snapshot, 
and the behavior is NOT fixed.  Also, an almost identical 
situation comes up with the following test case (nearly 
identical to my first one): 
 
        $myfilename = '/var/lib/php/test_templ2.php'; 
        if (is_readable($myfilename)) { 
                echo "is_readable: $myfilename 
(true)<br>"; 
        } else { 
                echo "is_readable: $myfilename 
(false)<br>"; 
        } 
        //include($myfilename); 
        $res = fopen($myfilename,'r'); 
        echo "res: $res<br>"; 
        $text = fgets($res, 4096); 
        echo $text 
 
This results in: 
 
Warning: fopen() [function.fopen]: SAFE MODE Restriction 
in effect. The script whose uid/gid is 49/49 is not 
allowed to access /var/lib/php/test_templ2.php owned by 
uid/gid 0/0 in /var/www/sites/devel/test.php on line 10 
  
 Warning: fopen(/var/lib/php/test_templ2.php) 
[function.fopen]: failed to open stream: Success 
in /var/www/sites/devel/test.php on line 10 
... 
 
Thus, fopen also has the same type of problem.  As you can 
see below, safe_mode_include_dir is set to /var/lib/php, 
as referenced in the above error message. 
 
// php.ini settings 
$ cat /etc/php.ini | grep -i safe_mode 
safe_mode = On 
safe_mode_gid = On 
safe_mode_include_dir = /var/lib/php 
...


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

[2005-03-09 21:42:46] [EMAIL PROTECTED]

Try this snapshot too, from the PHP 5_0 branch:

http://snaps.php.net/php5-STABLE-latest.tar.gz

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

[2005-03-09 19:32:42] kibab at icehouse dot net

Ok.  It turns out xmlErrorPtr (and all the other changes) 
are associated with libxml2 version 2.6.X.  So, the docs 
are wrong now, assuming the upgrade was intended.  I guess 
my RPM's are no longer sufficient.  acinclude.m4, 
aclocal.m4, and configure all mention 2.5.10.  However, 
ext/xml/xml.c has a reference to php_error_docref() that 
mentions upgrading to libxml2 version 2.6. 
 
So, libxml2 version 2.6 is the official requirement now?

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

[2005-03-09 18:16:01] kibab at icehouse dot net

A bit more information.  I ran the compile command  
manually using gcc -E instead of libtool, and it turns out  
that xmlErrorPtr hasn't yet been defined at that point,  
which is why it's dieing.  
  
Also, I grepped for it but it's not present: 
$ pwd 
/usr/include/libxml2 
$ grep -rni "xmlError" * 
libxml/globals.h:17:#include <libxml/xmlerror.h> 
 
Per {acinclude,aclocal}.m4, libxml2 version 2.5.10 is 
required, but I have that installed.... 
 
I'll keep investigating... thanks.

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

[2005-03-09 16:42:44] kibab at icehouse dot net

Configure options listed below. It's basically a mirror of 
the standard PHP-4 Redhat options adapted for PHP-5, with 
a couple of extra options I added in. 
 
./configure '--host=i386-redhat-linux' 
'--build=i386-redhat-linux' 
'--target=i386-redhat-linux-gnu' '--program-prefix=' 
'--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' 
'--sbindir=/usr/sbin' '--sysconfdir=/etc' 
'--datadir=/usr/share' '--includedir=/usr/include' 
'--libdir=/usr/lib' '--libexecdir=/usr/libexec' 
'--localstatedir=/var' '--sharedstatedir=/usr/com' 
'--mandir=/usr/share/man' '--infodir=/usr/share/info' 
'--cache-file=./config.cache' 
'--with-config-file-path=/etc' 
'--with-config-file-scan-dir=/etc/php.d' 
'--enable-force-cgi-redirect' '--disable-debug' 
'--enable-pic' '--disable-rpath' 
'--enable-inline-optimization' '--with-bz2' 
'--with-db4=/usr' '--with-curl' '--with-dom=/usr' 
'--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' 
'--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' 
'--with-ttf' '--with-gettext' '--with-ncurses' 
'--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' 
'--with-openssl' '--with-png' '--with-pspell' 
'--with-regex=system' '--with-xml' '--with-expat-dir=/usr' 
'--with-zlib' '--with-layout=GNU' '--enable-bcmath' 
'--enable-exif' '--enable-ftp' '--enable-magic-quotes' 
'--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' 
'--enable-sysvshm' '--enable-discard-path' 
'--enable-track-vars' '--enable-trans-sid' '--enable-yp' 
'--enable-wddx' '--enable-mbstring' 
'--enable-mbstr-enc-trans' '--enable-mbregex' 
'--without-oci8' '--with-pear=/usr/share/pear' 
'--with-imap=/usr' '--with-imap-ssl' 
'--with-kerberos=/usr/kerberos' '--with-ldap=/usr' 
'--with-mysql=/usr' 
'--with-mysql-sock=/var/lib/mysql/mysql.sock' 
'--with-pgsql=/usr' '--with-unixODBC=/usr' 
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop' 
'--enable-versioning' '--enable-calendar' '--enable-dbx' 
'--enable-dio' '--enable-mcal' 
'--with-apxs2filter=/usr/sbin/apxs' '--with-xsl=/usr' 
'--with-mysqli=/usr/bin/mysql_config' 
 
In terms of what libxml I'm running (from rpm -qa | grep 
-i libxml): 
libxml2-2.5.10-7 
libxml2-devel-2.5.10-7 
libxml-1.8.17-9.2 
 
As a side note, I haven't had any problems compiling 
PHP-5.0.1 through PHP-5.0.3 using the above configure line 
nor the version of libxml2 that I have been running (it 
might have changed a bit over time because of up2date, but 
it hasn't been that dramatic a change).

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

[2005-03-09 00:58:42] [EMAIL PROTECTED]

What libxml2 version do you have installed?
What configure options did you use? 


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

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/31618

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

Reply via email to