php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34015 Test script php_gr_jp_16242.phpt mislocates libraries
Submitted: 2005-08-05 22:23 UTC Modified: 2005-08-06 00:59 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: RVaughn at pheedo dot com Assigned:
Status: Closed Package: mbstring related
PHP Version: 4.4.0 OS: RHEL 3.0
Private report: No CVE-ID: None
 [2005-08-05 22:23 UTC] RVaughn at pheedo dot com
Description:
------------
The 'php_gr_jp_16242.phpt' test script does not look in the proper place for PHP-required libraries, note they look in '/usr/local/lib/php/20020429' (what the heck is that?) vs. the correct spot: '/usr/lib/php4'.  Note that this is listed in the '/etc/php.ini' file:

; UNIX: "/path1:/path2"
include_path = ".:/php/includes:/usr/lib/php4:/usr/local/lib/php"

Errors:

PHP Warning:  Unknown(): Unable to load dynamic library '/usr/local/lib/php/20020429/imap.so' - /usr/local/lib/php/20020429/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/usr/local/lib/php/20020429/ldap.so' - /usr/local/lib/php/20020429/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/usr/local/lib/php/20020429/mhash.so' - /usr/local/lib/php/20020429/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/usr/local/lib/php/20020429/mysql.so' - /usr/local/lib/php/20020429/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

This is on a Red Hat Enterprise 3.0 system with the following configure settings:

./configure 2>configure.err '--host=i386-redhat-linux' '--build=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--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-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-aspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-dom=shared,/usr' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-xmlrpc=shared' '--with-pcre-regex=/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' '--disable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-kerberos' '--with-mysql=shared,/usr' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--enable-mbstring=/usr/lib/php4/' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-apxs2=/usr/sbin/apxs' | tee configure.out

Reproduce code:
---------------
The test script .../ext/mbstring/tests/php_gr_jp_16242.phpt in the PHP 4.4 distro will reproduce this error on this platform.

Expected result:
----------------
The output of the code is correct except for these weird warnings:

[...warnings removed...]
string(8) "Japanese"
string(5) "UTF-8"
string(5) "UTF-8"


Actual result:
--------------
---- EXPECTED OUTPUT
string(8) "Japanese"
string(5) "UTF-8"
string(5) "UTF-8"
---- ACTUAL OUTPUT
PHP Warning:  Unknown(): Unable to load dynamic library '/usr/local/lib/php/200\
20429/imap.so' - /usr/local/lib/php/20020429/imap.so: cannot open shared object\
 file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/usr/local/lib/php/200\
20429/ldap.so' - /usr/local/lib/php/20020429/ldap.so: cannot open shared object\
 file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/usr/local/lib/php/200\
20429/mhash.so' - /usr/local/lib/php/20020429/mhash.so: cannot open shared obje\
ct file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/usr/local/lib/php/200\
20429/mysql.so' - /usr/local/lib/php/20020429/mysql.so: cannot open shared obje\
ct file: No such file or directory in Unknown on line 0
string(8) "Japanese"
string(5) "UTF-8"
string(5) "UTF-8"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-05 22:36 UTC] tony2001@php.net
It does't look for any libraries (and this is obvius from its source).
Fix your system or remove these extensions from your php.ini
Not PHP problem.
 [2005-08-05 22:39 UTC] sniper@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2005-08-06 00:39 UTC] RVaughn at pheedo dot com
As said, these do *not* appear in my php.ini file.  You're just making an assumption about that.  The paths do *not* appear anywhere in the php.ini (the tests are supposed to ignore the /etc/php.ini file and use the one in the source code anyway, according to README.TESTING) and those weird paths do not appear anywhere on my system nor in the source code.  The conclusions you've jumped to are mistaken.  Thanks.
 [2005-08-06 00:41 UTC] sniper@php.net
Hehe..don't trust everything you read. :)
The tests definately use your php.ini. It's intentional and will not be changed. 
 [2005-08-06 00:44 UTC] RVaughn at pheedo dot com
Thanks Sniper, for a real answer rather than a rote one.  Is there any way to get more info on this bug?  Namely, is it a problem with the test script or with PHP or both?  I don't want to have to pull a whole new distribution of PHP 4.4 down and build it from scratch; we're trying to run a business.  Thanks!  Cheers, Rob
 [2005-08-06 00:46 UTC] RVaughn at pheedo dot com
Wait, what's intentional?  That the README file is misleading (or wrong) in saying the system php.ini file is used?  Or that the system ini file is used, which means the README file ought to be updated?  Sorry, really confused now... thanks!
Cheers, Rob
 [2005-08-06 00:47 UTC] RVaughn at pheedo dot com
Those bad paths do not appear in my /etc/php.ini system file.  In the original report I show the include path:

; UNIX: "/path1:/path2"
include_path=".:/php/includes:/usr/lib/php4:/usr/local/lib/php"

Why isn't the test script using that?  Thanks!
 [2005-08-06 00:58 UTC] sniper@php.net
You should read it more carefully:

[Which php.ini is used]
-----------------------
 "make test" uses the same php.ini file as it would once installed. The tests have been written to be independent of that php.ini file, so if you find a test that is affected by a setting, please report this, so we can address the issue.

And I fixed that test. Also, the path in question is 'extension_dir'..

Now leave this report closed, the problem IS solved already.


 [2005-08-06 00:59 UTC] sniper@php.net
One more thing: If your php.ini file does not have extension_dir set properly, the default one will be used instead.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 00:01:30 2024 UTC