Skip to main content
Participant
May 18, 2021
Question

MM_XSLTransform error on upgrade of PHP to 7.4

  • May 18, 2021
  • 2 replies
  • 605 views

Hi

 

I am upgrading to PHP 7.4 and found the following MM_XSLTransform error:

 

<<<

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; MM_XSLTransform has a deprecated constructor in /pathto/MM_XSLTransform.class.php on line 7

>>>

 

The version of the MM_XSLTransform class I have is 0.6.4.

 

Any assistance would be much appreciated.

 

all the best
Dave

This topic has been closed for replies.

2 replies

Nancy OShea
Community Expert
Community Expert
May 18, 2021

NOTE:  This is NOT  the pre-release forum.  If this code is generated by a pre-release version of DW,  we cannot discuss it here, sorry.   Pre-release issues don't belong in the public forum.

 

Please post your pre-release bug reports in the pre-release forum where they will be logged and directed to the appropriate product team members for action or follow-up questions if needed.

 

Thank you.

 

Nancy O'Shea— Product User & Community Expert
B i r n o u
Legend
May 18, 2021

nope Nancy, I don't think that it is a prerelease bug, it is something that belong to DW since many years?... 🙂

that's only because the only build that I use is the Next one (which is public, any one who has a Creative Cloud account can access to it). and the MM_XSLTransform.class.php is a Macromedian file present in DW since DW handles XSLT. isn't it ???

the bug appears whit the end of PHP 5.6 and that people has to move to 7+

Nancy OShea
Community Expert
Community Expert
May 19, 2021

@B i r n o u,

NEXT = pre-release version.  Any DW user with an Adobe ID may try it, yes.  But we still cannot discuss it in the public forum because it's pre-release.

 

@smithd7tcd,

DO NOT use old MM server-behaviors code on PHP 7 servers.  None of it works.  It must all be replaced with modern PHP / MySQLi (improved) or PDO code.  If you can't write modern code manually,  you may try the pre-release version of DW to which Birnou hinted.  However NEXT is not recommended for production use because it is not a complete product yet.  Or you may purchase commercial extensions to replace the deprecated server-behaviors in DW, like this one from WebAssist.

http://www.webassist.com/dreamweaver-extensions/mysqli

 

Hope that helps.

 

Nancy O'Shea— Product User & Community Expert
B i r n o u
Legend
May 18, 2021

I think the domxml is the same for 7.4 as the one used by 5.
make a backup of the file MM_XSLTransform.class.php (C:\Program Files\Adobe\YOUR DREAM VERSION\configuration\Shared\XSLTransform\PHP_MySQL) and add between the line 73 and 74 this fragment

 

 

 

if (substr(PHP_VERSION, 0, 1) == '7') {
	if ( in_array('dom', $extensions) && in_array('xsl', $extensions) && class_exists('DOMDocument') && class_exists('XSLTProcessor') ) {
		$this->processor = 'domxml5';
		return;
	}
}

 

 

 

if it works, watch... if it doesn't work, remove the lines of code. and come back to this forum... maybe a colleague will have a solution to propose you

B i r n o u
Legend
May 18, 2021

youps, I reread the path and the forum editor kill all the slash... so the path should be

 

C:\Program Files\Adobe\YOUR DREAM VERSION\configuration\Shared\XSLTransform\PHP_MySQL