Reputation: 1611
ckeditor integrate with ckfinder. when I click browser from ckeditor, ckfinder appears but cannot show images and folders. the error will be like that.
It was not possible to properly load the XML response from the web server.
XML Parsing Error: junk after document element Location: http://localhost/tess/ckfinder/ckfinder.html?Type=Images&CKEditor=editor1&CKEditorFuncNum=1&langCode=en Line Number 2, Column 1:Notice: A non well formed numeric value encountered in /Applications/XAMPP/xamppfiles/htdocs/tess/ckfinder/core/connector/php/php5/Utils/Misc.php on line 202
^
Raw response from the server:
<?xml version="1.0" encoding="utf-8"?><br />
<b>Notice</b>: A non well formed numeric value encountered in <b>/Applications/XAMPP/xamppfiles/htdocs/tess/ckfinder/core/connector/php/php5/Utils/Misc.php</b> on line <b>202</b><br />
<br />
<b>Notice</b>: A non well formed numeric value encountered in <b>/Applications/XAMPP/xamppfiles/htdocs/tess/ckfinder/core/connector/php/php5/Utils/Misc.php</b> on line <b>202</b><br />
<br />
<b>Notice</b>: A non well formed numeric value encountered in <b>/Applications/XAMPP/xamppfiles/htdocs/tess/ckfinder/core/connector/php/php5/Utils/Misc.php</b> on line <b>202</b><br />
<Connector resourceType="Images"><Error number="0" /><ConnectorInfo enabled="true" s="" c="" thumbsEnabled="true" thumbsUrl="http://localhost/ckeditor-ckfinder-integration/uploads/_thumbs/" thumbsDirectAccess="false" thumbsWidth="100" thumbsHeight="100" imgWidth="1600" imgHeight="1200" uploadMaxSize="134217728" uploadCheckImages="false" plugins="imageresize,fileeditor,zip" /><ResourceTypes><ResourceType name="Images" url="http://localhost/ckeditor-ckfinder-integration/uploads/images/" allowedExtensions="bmp,gif,jpeg,jpg,png" deniedExtensions="" hash="3425a9286fe54f22" hasChildren="false" acl="255" maxSize="134217728" /></ResourceTypes><PluginsInfo><imageresize smallThumb="90x90" mediumThumb="120x120" largeThumb="180x180" /></PluginsInfo></Connector>
the error shows like followings:
Upvotes: 0
Views: 1096
Reputation: 1
Just write a single line before the switch case as below in the ckfinder\core\connector\php\php5\Utils\Misc.php between line no 196 to 205:
$last = strtolower($val[strlen($val)-1]);
$val=substr($val, 0, -1); // This is the new added line.
switch($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
It will solve your current problem. If you get any further problems, please comment to me.
Upvotes: 0
Reputation: 161
I have solved this problem by just comments ckfinder\core\connector\php\php5\Utils\Misc.php line no 196 to 205 then it works fine. You comment below code.
$last = strtolower($val[strlen($val)-1]);
switch($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
Upvotes: 1