Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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+
Copy link to clipboard
Copied
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.
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.
Copy link to clipboard
Copied
@Nancy OShea please, where do you see that is a specific question related to a prerelease question ???? and where it is something linked to server behavior....
Please I miss your point...
and why the user should'nt try the solution I indicate ????
Copy link to clipboard
Copied
Excuse me. It was you who mentioned NEXT. But I see now that you have edited your reply to something different since you first posted it.
The MM scripts in DW are deprecated. Hopefully one of the solutions mentioned below will help you.