View Issue Details

IDProjectCategoryView StatusLast Update
0000732PHP for OS/2, ArcaOS & eComStation (PHP versions v8.x v7.x v5.x)Bugpublic2021-05-13 15:13
ReporterHarryIV Assigned ToSteven Levine  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Summary0000732: Bug in PHP 5.5 and 5.6. Undefined function mb_convert_encoding() and iconv().
DescriptionPHP says:
1. Fatal error: Call to undefined function iconv() in ttt.php on line 4
2. Fatal error: Call to undefined function mb_convert_encoding() in zzz.php on line 4
TagsNo tags attached.
Attached Files

Activities

HarryIV

2021-04-28 19:21

reporter   ~0003657

This is sample file.
ttt.php (154 bytes)   
<?php
	$test = "TEST OK";
	
	$test = iconv( "UTF-8", "windows-1251//IGNORE", $test );

	if (!$test) {
		echo "test failed";
	} else echo $test;
?>
ttt.php (154 bytes)   
zzz.php (121 bytes)   
<?
$xs= "���� ���� ���� ���� ";

    $xs = mb_convert_encoding($xs,"UTF-8",'windows-1251');

echo $xs;

?>
zzz.php (121 bytes)   

psmedley

2021-04-28 20:28

administrator   ~0003658

Have you loaded the relevant modules in php.ini ?

Steven Levine

2021-04-28 21:50

manager   ~0003659

This appears to be a local configuration error. Please check your extension_dir setting in php.ini.

The testcase:

   <?php
     echo '

Running PHP version ' . phpversion() . '

' ;
     $out = iconv("UTF-8", "windows-1251//IGNORE", 'Hello');
     echo "

$out (iconv) from Mr. hello_mb_string.php's PHP code.\n

";
     $out = mb_convert_encoding('Hello', 'ISO-8859-1');
     echo "

$out (converted) from Mr. hello_mb_string.php's PHP code.\n

";
   ?>

outputs

  Running PHP version 5.6.40

  Hello (iconv) from Mr. hello_mb_string.php's PHP code.

  Hello (by mb_convert_encoding) from Mr. hello_mb_string.php's PHP code.

If it helps. mb_convert_encoding lives in mb_string.dll and iconv lives in iconv.dll.

HarryIV

2021-05-03 19:02

reporter   ~0003661

Thank you. I had a problem with irrelevant modules and an error in php.ini
Outputs:
Running PHP version 5.6.12

Notice: iconv(): Wrong charset, conversion from `UTF-8' to `windows-1251//IGNORE' is not allowed in F:\php5.6\xxx.php on line 6

 (iconv) from Mr. hello_mb_string.php's PHP code.

Hello (converted) from Mr. hello_mb_string.php's PHP code.

Steven Levine

2021-05-04 05:39

manager   ~0003664

The internet tells us that your //IGNORE issue is a known php issue. See

  https://www.php.net/manual/en/function.iconv.php

The User Contributed Notes section offers some workarounds.

HarryIV

2021-05-05 13:47

reporter   ~0003674

Thanks! Tell me where to find modphp5.dll for versions Apache 2.4 and php 5.5 and 5.6?

HarryIV

2021-05-05 13:48

reporter   ~0003675

And php 5.6.40?

psmedley

2021-05-06 08:31

administrator   ~0003676

I've been slack at updating my site, but PHP 5.6.40 is at https://smedley.id.au/tmp/php-5.6.40-os2-20201213.zip and a suitable modphp for apache 2.4 is at https://smedley.id.au/tmp/modphp5-5.6.40-apache24.zip

There is no modphp5.dll for php 5.5 and apache 2.4.

Steven Levine

2021-05-06 12:59

manager   ~0003677

In general, we recommend that folks that want to keep up with what's going on with apache httpd and php and friends subscribe to the Apache2 mailing list using:

 <https://groups.google.com/group/apache2/subscribe>, <mailto:apache2+subscribe@googlegroups.com>

and the ecs-isp mailing list using:

 <ecs-isp-on@2rosenthals.com>

The lists are low traffic and are very good for general user support questions. They also tend to be where new builds and fixes get announced first.

Steven Levine

2021-05-11 18:44

manager   ~0003681

Is this ticket ready to close or are there still some remaining issues?

HarryIV

2021-05-13 13:13

reporter   ~0003691

Thanks! All working. Please close the ticket.

Steven Levine

2021-05-13 15:13

manager   ~0003692

Reporter indicates that all issues have been resolved.

Issue History

Date Modified Username Field Change
2021-04-28 19:18 HarryIV New Issue
2021-04-28 19:21 HarryIV File Added: ttt.php
2021-04-28 19:21 HarryIV File Added: zzz.php
2021-04-28 19:21 HarryIV Note Added: 0003657
2021-04-28 20:28 psmedley Note Added: 0003658
2021-04-28 21:50 Steven Levine Assigned To => Steven Levine
2021-04-28 21:50 Steven Levine Status new => feedback
2021-04-28 21:50 Steven Levine Note Added: 0003659
2021-05-03 19:02 HarryIV Note Added: 0003661
2021-05-03 19:02 HarryIV Status feedback => assigned
2021-05-04 05:39 Steven Levine Note Added: 0003664
2021-05-05 13:47 HarryIV Note Added: 0003674
2021-05-05 13:48 HarryIV Note Added: 0003675
2021-05-06 08:31 psmedley Note Added: 0003676
2021-05-06 12:59 Steven Levine Note Added: 0003677
2021-05-11 18:44 Steven Levine Status assigned => feedback
2021-05-11 18:44 Steven Levine Note Added: 0003681
2021-05-13 13:13 HarryIV Note Added: 0003691
2021-05-13 13:13 HarryIV Status feedback => assigned
2021-05-13 15:13 Steven Levine Status assigned => closed
2021-05-13 15:13 Steven Levine Resolution open => fixed
2021-05-13 15:13 Steven Levine Note Added: 0003692