ID:               26194
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bjorn dot wiberg at home dot se
-Status:           Open
+Status:           Verified
 Bug Type:         ICONV related
 Operating System: Windows XP Professional SP-1
 PHP Version:      5.0.0b2 (beta2)
 New Comment:

I get the same on win98.  Initial investigation shows that if I rename
the PHP_NAMED_FE to 'blue' on line 64 of iconv.c, the resulting
function blue() works perfectly.  It's just the word 'iconv' that makes
it b0rk, presumably because it matches the module name (why now??).

nb libiconv() currently works in userland instead..

Can someone please check whether this is win-only or cross-platform?

Cheers,
Steph


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

[2003-11-10 21:24:24] bjorn dot wiberg at home dot se

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 this bug report at http://bugs.php.net/?id=26194&edit=1

Reply via email to