• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

error in xslt transformation

New Here ,
Jul 13, 2007 Jul 13, 2007

Copy link to clipboard

Copied

hi
i make xsl fragment from rss feed and it shows the data perfectly when testing xsl file .

i make php page and go to application panel and make xslt transformation and when click ok it gives me message

the page appears with the &nsap and np blah blah ,,,,,,,,
ant at the top of the page says "MM_XSLTransform error."

so what to do ? i want to show what i have transformed in my php page how?

thanks in advance.
TOPICS
Server side applications

Views

2.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 19, 2007 Jul 19, 2007
macnux wrote:
> you can take alook at server info i made it in order to see it
> actualy xsl is supported and every thing is good here

Yes, XSL is definitely supported. Your problem is that allow_url_fopen
is turned off. This prevents the XSL Transformation server behavior from
accessing the RSS feed. Unfortunately, there's nothing you can do about
this unless you can persuade your hosting company to turn
allow_url_fopen on. The good news is that your server uses PHP 5.2.3,
which has the...

Votes

Translate

Translate
LEGEND ,
Jul 13, 2007 Jul 13, 2007

Copy link to clipboard

Copied

macnux wrote:
> "please remove existing html head or body in the currenct document since they
> are already in the applied xslt (Entire) file"

There are two types of XSLT page that you can create in Dreamweaver. An
XSLT (Entire page) file is precisely that - it's self contained. To
embed XSLT in a PHP page, you need to use an XSLT Fragment. Go to File >
New, and select XSLT Fragment from the New Document dialog.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 15, 2007 Jul 15, 2007

Copy link to clipboard

Copied

as i said it's a fragment and when testing it it shows data perfectly but when transforming by server side transformation gives me this error "MM_XSLTransform error."

any help

thanks in advance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 16, 2007 Jul 16, 2007

Copy link to clipboard

Copied

any help

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 17, 2007 Jul 17, 2007

Copy link to clipboard

Copied

what cause this error "MM_XSLTransform error" ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 18, 2007 Jul 18, 2007

Copy link to clipboard

Copied

macnux wrote:
> what cause this error "MM_XSLTransform error" ?

Without seeing your XSL code, it's impossible to say.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 18, 2007 Jul 18, 2007

Copy link to clipboard

Copied

mu xsl code
--------------------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?><!-- DWXMLSource=" http://forums.microsoft.com/MSDN/rss.aspx?ForumID=159&Mode=0&SiteID=1" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;">
<!ENTITY copy "&#169;">
<!ENTITY reg "&#174;">
<!ENTITY trade "&#8482;">
<!ENTITY mdash "&#8212;">
<!ENTITY ldquo "&#8220;">
<!ENTITY rdquo "&#8221;">
<!ENTITY pound "&#163;">
<!ENTITY yen "&#165;">
<!ENTITY euro "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform" xmlns:sy=" http://purl.org/rss/1.0/modules/syndication/" xmlns:slash=" http://purl.org/rss/1.0/modules/slash/" xmlns:dc=" http://purl.org/dc/elements/1.1/">
<xsl:output method="html" encoding="iso-8859-1"/>
<xsl:template match="/">
<xsl:for-each select="rss/channel/item">
<p><xsl:value-of select="title"/></p>
<p><xsl:value-of select="link"/></p>
<p><xsl:value-of select="description" disable-output-escaping="yes"/></p>
<hr />
<p> </p>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 18, 2007 Jul 18, 2007

Copy link to clipboard

Copied

macnux wrote:
> mu xsl code

I have copied your code, and had no difficulty embedding it with the XSL
Transformation server behavior into an ordinary PHP page.

Are you using Dreamweaver 8? If so, have you installed the PHP updater
for Dreamweaver 8.0.2? First you need to make sure your program is
updated to DW 8.0.2. Then you install the PHP hotfix extension.

http://www.adobe.com/support/dreamweaver/downloads_updaters.html
http://www.adobe.com/go/b6c2ae2a

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 06, 2008 Apr 06, 2008

Copy link to clipboard

Copied

thanks for this discussion. the update and hotfix linx were much appreciated! fixed my issue!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 18, 2007 Jul 18, 2007

Copy link to clipboard

Copied

im using DW 8 and im installing the updater 8.0.2

what is the PHP hotfix extension?where i can get it?

by the way i found my problem at this page but can't find the proper answer
http://kb.adobe.com/selfservice/viewContent.do?externalId=b6c2ae2a&sliceId=2#xsl

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 18, 2007 Jul 18, 2007

Copy link to clipboard

Copied

macnux wrote:
> what is the PHP hotfix extension?where i can get it?

I gave you the link in my previous post:

http://www.adobe.com/go/b6c2ae2a

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 18, 2007 Jul 18, 2007

Copy link to clipboard

Copied

the link don't mention the solution just gave the problem .

and i try remote server also the same problem
check it here
http://mokhtar.phpnet.us/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 18, 2007 Jul 18, 2007

Copy link to clipboard

Copied

macnux wrote:
> the link don't mention the solution just gave the problem .

There is a link to the fix in the second sentence of that page. Since
you couldn't find it, here's a direct link:

http://kb.adobe.com/support/dreamweaver/ts/documents/b6c2ae2a/DW802_HotFix-0_6_0.zip

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 19, 2007 Jul 19, 2007

Copy link to clipboard

Copied

thanks for reply

i works in my local server but on remote server still !!! why?
http://mokhtar.phpnet.us/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 19, 2007 Jul 19, 2007

Copy link to clipboard

Copied

macnux wrote:
> i works in my local server but on remote server still !!! why?

Does your remote server support XSL? The XSL Transformation server
behavior works automatically detects whether your server is running PHP
4 or PHP 5, because they use different PHP functions.

On a PHP 4 server, the XSLT extension and the sablotron library must be
enabled. These are not normally installed by default, as sablotron is
separate from PHP.

On PHP 5, you need the XSL extension. Even if it isn't enabled, most
hosting companies should be able to turn it on easily, because it's a
core part of PHP 5.

Run phpinfo() to see whether your remote server has the necessary
functionality.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 19, 2007 Jul 19, 2007

Copy link to clipboard

Copied

you can take alook at server info i made it in order to see it
actualy xsl is supported and every thing is good here and php version is 5.2.3

http://mokhtar.phpnet.us/info.php

thanks in advance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 19, 2007 Jul 19, 2007

Copy link to clipboard

Copied

macnux wrote:
> you can take alook at server info i made it in order to see it
> actualy xsl is supported and every thing is good here

Yes, XSL is definitely supported. Your problem is that allow_url_fopen
is turned off. This prevents the XSL Transformation server behavior from
accessing the RSS feed. Unfortunately, there's nothing you can do about
this unless you can persuade your hosting company to turn
allow_url_fopen on. The good news is that your server uses PHP 5.2.3,
which has the following separate directives and settings:

allow_url_fopen Off
allow_url_include Off

Hosting companies typically turn off allow_url_fopen to prevent sites
from including material from other servers, which can be a security
risk. In PHP 5.2, allow_url_fopen no longer allows files to be included
directly into a script. The new directive allow_url_include now controls
remote includes.

What you need to persuade your hosting company is to use these settings:

allow_url_fopen On
allow_url_include Off

This would allow you to pass RSS feeds to the XSL Transformation server
behavior, but prevent the security risk of including a remote file
directly inside your script. However, it might be difficult to persuade
a support person to alter the company's policy, even though this change
is designed to make PHP much safer to use.

If you can't get the hosting company to change its policy, submit a
feature request to Adobe, asking them to improve the server behavior so
that it uses a socket connection or cURL.

http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

Socket or cURL connections get around the problem of allow_url_fopen
being turned off, but they're not supported by the XSL Transformation
server behavior.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 20, 2007 Sep 20, 2007

Copy link to clipboard

Copied

My work around for the "MM_XSLTransform error on Servers with allow_url_fopen set Off. I modified the function getRemoteFile() in MM_XSLTransform class version 0.6.2 around line 162. I removed the if statement at line 173.
Here is my temp fix. Please note this is not complete, just playing with it; not sure of any side effects yet.
My to do list:
1. find a function that will check if allow_url_fopen is set to off.
2. Set up a if or case statement to select the use fopen option or the cURL option depending on the value return by step one.
3. Add some error checking, and figure out a good timeout time.

Does anybody see any security problems with the code below.

Thanks
David Pearson

function getRemoteFile(&$src) {
$fileContent = '';

$pos = strpos($src, '://');
$protocol = strtolower(substr($src, 0, $pos));

// avoid protocol upper case
$mySrc = $protocol . substr($src, $pos);

$magic_quotes_runtime_orig = get_magic_quotes_runtime();
set_magic_quotes_runtime(0);

$ch = curl_init();
$timeout = 0; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $mySrc);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$fileContent = curl_exec($ch);
curl_close($ch);

if ($protocol == 'https') {
$this->setError($this->getErrorFromCode('MM_HTTPS_OPEN_ERROR', array($src)));
if ( (substr(PHP_VERSION, 0, 1) < 5) && (substr(PHP_VERSION, 2, 1) < 3) ) {
$this->setError($this->getErrorFromCode('MM_HTTPS_NOT_SUPPORTED_ERROR', array($src)));
}
}

set_magic_quotes_runtime($magic_quotes_runtime_orig);

return $fileContent;
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 31, 2007 Oct 31, 2007

Copy link to clipboard

Copied

Bless you, DEPearson. I've been looking for this fix all day. Works great for me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

The fix totally works! Yeay DEPearson and David Powers. I used Powers's book Essential Guide to Dreamweaver CS3 to create the XSL fragment for my company's website in order to pull in the feed from our Typepad blog. But because the Typepad blog was on a different server from the home page (which was hosted on Dreamhost); and because the allow_url_fopen was turned Off, it wasn't working. Using this code fixed it.

For people like me though, who are still in the copy and paste level of code writing, I wanted to share how I combined Powers and DEPearson's code, which starts on line 171:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 04, 2008 Aug 04, 2008

Copy link to clipboard

Copied

I'm not sure why, but this didn't work for me. This is the error message I am getting, which seems like the one you guys are discussing:
MM_XSLTransform error.
The server could not perform the XSL transformation because an XSLT processor for PHP could not be found. Contact your server administrator and ask them to install an XSLT processor for PHP.

Maybe I didn't paste in the code correctly. Below is the code that I pasted in for anyone to check, though I checked twice myself. Also, I am responding to this error incorrectly, can someone let me know. I thought that I might need to install libxml for Apache but I am having a hard time finding documentation for this on in Apache, but then I found this. I'm new at Dynamic web development and I am currently in training on Lynda.com and came across this problem which is preventing me from continuing with the training on rss feeds. Code included is from line 162-194 in the MM_XSLT Transform.class.php file.

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 04, 2008 Aug 04, 2008

Copy link to clipboard

Copied

LATEST
I found the answer to my own question. In case anyone else is having similar difficulties I found the answer on the Adobe website somewhere else.

If your Windows, Macintosh or UNIX server is running PHP 5, all that is required is to uncomment one line of code in the php.ini file on the server: extension=php_xsl.dll.

You need to close out of the server and re-start it for this to take effect.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 04, 2008 Aug 04, 2008

Copy link to clipboard

Copied

I'm not sure why, but this didn't work for me. This is the error message I am getting, which seems like the one you guys are discussing:
MM_XSLTransform error.
The server could not perform the XSL transformation because an XSLT processor for PHP could not be found. Contact your server administrator and ask them to install an XSLT processor for PHP.

Maybe I didn't paste in the code correctly. Below is the code that I pasted in for anyone to check, though I checked twice myself. Also, I am responding to this error incorrectly, can someone let me know. I thought that I might need to install libxml for Apache but I am having a hard time finding documentation for this on in Apache, but then I found this. I'm new at Dynamic web development and I am currently in training on Lynda.com and came across this problem which is preventing me from continuing with the training on rss feeds. Code included is from line 162-194 in the MM_XSLT Transform.class.php file.

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 21, 2007 Sep 21, 2007

Copy link to clipboard

Copied

DEPearson wrote:
> My to do list:
> 1. find a function that will check if allow_url_fopen is set to off.

if (!ini_get('allow_url_fopen')) {
// code to run when allow_url_fopen is off
}

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines