homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

xslt and php5

10+ Year Member

Msg#: 4178239 posted 11:44 pm on Jul 28, 2010 (gmt 0)


I am trying to install the Open Source program, phpMyHotels. On the index.php page I get the error message:
Fatal error: Call to undefined function xslt_create() in /home/site/public_html/hotel/index.php on line 28

# If we re calling a nested module a normal Fusebox flow is executed
# otherwise we perform output buffering and XSLT processing

if (!isset($attributes['stoplayout']))


if (!$attributes['stoplayout']) {
$xml = ob_get_contents();
$xml = '<?xml version="1.0" encoding="utf-8"?>'.$xml;


# If debug mode activated write XML into /tmp/out.xml to ease debugging
$fp = fopen($GLOBALS['CONFIG']['DEBUGFILE'], 'w');
fwrite ($fp, $xml);

$arguments = array('/_xml' => $xml);

# Allocate a new XSLT processor
$xh = xslt_create();

# Process the document
$result = xslt_process($xh, 'arg:/_xml', $GLOBALS['rootpath'].'/layouts/layDefault.xsl', NULL, $arguments);

if ($result) {
print $result;
} else {
print 'Sorry, XML code could not be transformed. ';
print 'The reason is <b>' . xslt_error($xh) . '</b>';
print ' and the error code is ' . xslt_errno($xh);


I did a little research and found that there is a problem with xslt and Php5. I could not find any way to correct the code. I pay a hosting company so I don't have access to the server. Is there a way to correct this code to get it to work? Any coders out there that know a work around?

Thank you!



10+ Year Member

Msg#: 4178239 posted 12:36 pm on Jul 31, 2010 (gmt 0)

I still can't find a solution. Should I find another program or is there a way to change this one to work with php5?

I appreciate any responses. Thank you.


5+ Year Member

Msg#: 4178239 posted 1:06 pm on Jul 31, 2010 (gmt 0)


phpMyHotels is written for php4 and xslt is a php4-only extension. Looking at the sourceforge page for the project it looks as though phpMyHotels hasn't had any new releases in over five years, which would suggest it has been abandoned and there is little hope of it being made php5 compatible.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved