Open
Description
Description
The following code:
<?php
echo "Hello World!";
?>
Resulted in this output:
Hello World!
Illegal instruction(coredump)
But I expected this output instead:
Hello World!
Stack trace:
#0 0x00000000 in ?? ()
#1 0xd018b464 in exit () from /usr/lib/libc.a(shr.o)
#2 0x1000439c in main ()
This happens after the xsl extension is enabled in php. If this module is disabled, then the above program executes successfully.
We also tried the following XSL example.
<?php
error_reporting(E_ALL);
ini_set('display_errors',1);
# LOAD XML FILE
$XML = new DOMDocument();
$XML->load( 'collection.xml' );
# START XSLT
$xslt = new XSLTProcessor();
# IMPORT STYLESHEET 1
$XSL = new DOMDocument();
$XSL->load( 'collection.xsl' );
$xslt->importStylesheet( $XSL );
#PRINT
print $xslt->transformToXML( $XML );
?>
This example when executed using php CLI fails with the same issue.
Hey! Welcome to Nicolas Eliaszewicz's sweet CD collection!
<h1>Fight for your mind</h1><h2>by Ben Harper - 1995</h2><hr>
<h1>Electric Ladyland</h1><h2>by Jimi Hendrix - 1997</h2><hr>
Illegal instruction(coredump)
When the same example is executed using apache mod_php from the browser, it executes successfully without any issues.
Could anyone please give any suggestions as to what could possibly be the issue here?
PHP Version
PHP 8.1.31
Operating System
AIX 7.2