From:             bjorn dot wiberg at home dot se
Operating system: Windows XP Professional SP-1
PHP version:      5.0.0b2 (beta2)
PHP Bug Type:     ICONV related
Bug description:  Call to iconv() gives "undefined function" error, php -i says iconv 
functional

Description:
------------
I'm using the binary distribution of PHP 5.0.0b2.

Calling iconv() fails with an "undefined function" error, although php -i
and phpinfo() reports the iconv extension to be functional. This problem
did not occur with 5.0.0b1.

Path to php.ini is E:\Utils\Apache Group\Apache2\custom\conf\php.ini (set
in httpd.conf through the PHPINIDir directive -- I'm running it with
Apache 2.0.48, everything works fine except for this).

Extension dir is E:\Utils\PHP\extensions (set in php.ini).
The php_iconv.dll extension is loaded in php.ini. I'm also using the
php_exif.dll, php_gd2.dll, php_mime_magic.dll (and in 5.0.0b2,
php_mysql.dll) extensions.

The php4ts.dll, iconv.dll and libmySQL.dll files have been copied to the
E:\Utils\PHP\sapi\ directory which Apache loads the PHP module
(php4apache2.dll) from.

E:\Utils\PHP and E:\Utils\PHP\dlls are in the PATH environment variable.

I also tried the php5-win32-200311102330.zip snapshot, but got the same
error.


Reproduce code:
---------------
[test.php]

<?php
        echo iconv("ISO-8859-1","UTF-8","This is a test.");
?>


Expected result:
----------------
The text "This is a test.". The script works fine with PHP 5.0.0b1:

E:\Utils\PHP>php.exe -c "\Utils\Apache Group\Apache2\custom\conf"
"\Utils\Apache
Group\Apache2\custom\php-bin\vhosts\myhost.dyndns.org\test.php"
Content-type: text/html
X-Powered-By: PHP/5.0.0b1

This is a test.

E:\Utils\PHP>php.exe -c "\Utils\Apache Group\Apache2\custom\conf" -i |
grep iconv
<h2><a name="module_iconv">iconv</a></h2>
<tr><td class="e">iconv support </td><td class="v">enabled </td></tr>
<tr><td class="e">iconv implementation </td><td class="v">libiconv
</td></tr>
<tr><td class="e">iconv library version </td><td class="v">1.8 </td></tr>
<tr><td class="e">iconv.input_encoding</td><td
class="v">ISO-8859-1</td><td clas
s="v">ISO-8859-1</td></tr>
<tr><td class="e">iconv.internal_encoding</td><td
class="v">ISO-8859-1</td><td c
lass="v">ISO-8859-1</td></tr>
<tr><td class="e">iconv.output_encoding</td><td
class="v">ISO-8859-1</td><td cla
ss="v">ISO-8859-1</td></tr>

E:\Utils\PHP>php.exe -c "\Utils\Apache Group\Apache2\custom\conf" -v
PHP 5.0.0b1 (cgi-fcgi) (built: Jun 28 2003 00:31:05)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies


Actual result:
--------------
An "undefined function" error:

E:\Utils\PHP>php.exe -c "\Utils\Apache Group\Apache2\custom\conf"
"\Utils\Apache
Group\Apache2\custom\php-bin\vhosts\myhost.dyndns.org\test.php"
PHP Fatal error:  Call to undefined function iconv() in E:\Utils\Apache
Group\Apache2\custom\php-bin\vhosts\myhost.dyndns.org\test.php on line 3
Content-type: text/html
X-Powered-By: PHP/5.0.0b2

E:\Utils\PHP>php -c "\Utils\Apache Group\Apache2\custom\conf\php.ini" -i |
grep
iconv
<h2><a name="module_iconv">iconv</a></h2>
<tr><td class="e">iconv support </td><td class="v">enabled </td></tr>
<tr><td class="e">iconv implementation </td><td class="v">libiconv
</td></tr>
<tr><td class="e">iconv library version </td><td class="v">1.8 </td></tr>
<tr><td class="e">iconv.input_encoding</td><td
class="v">ISO-8859-1</td><td clas
s="v">ISO-8859-1</td></tr>
<tr><td class="e">iconv.internal_encoding</td><td
class="v">ISO-8859-1</td><td c
lass="v">ISO-8859-1</td></tr>
<tr><td class="e">iconv.output_encoding</td><td
class="v">ISO-8859-1</td><td cla
ss="v">ISO-8859-1</td></tr>

E:\Utils\PHP>php -v
PHP 5.0.0b2 (cgi-fcgi) (built: Oct 30 2003 12:37:18)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies


-- 
Edit bug report at http://bugs.php.net/?id=26194&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26194&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26194&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26194&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26194&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26194&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26194&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26194&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26194&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26194&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26194&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26194&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26194&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26194&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26194&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26194&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26194&r=float

Reply via email to