This is my integration code:
My extranet is in root/include/ckeditor and root/include/ckfinder
$baseUrl = 'https://extranet.com/crm/include/;
$baseUrl = '/userfiles/';
$baseDir = '/crm/include/userfiles/;
I am trying to do the configuration thats all.
I am trying to integrated with ckeditor but i am getting all sorts of error. Can anyone tell me where iam doing wrong.
It was not possible to properly load the XML response from the web server.
XML Parsing Error: junk after document element Location: https://extranet.zeald.com/crm_snapshot/include/ckfinder/ckfinder.html?CKEditor=message&CKEditorFuncNum=2&langCode=en Line Number 2, Column 1:Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /mnt/clusternfs2/extranet/crm_snapshot/include/ckfinder/core/connector/php/php4/Utils/Misc.php on line 54
^
Raw response from the server:
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /mnt/clusternfs2/extranet/crm_snapshot/include/ckfinder/core/connector/php/php4/Utils/Misc.php on line 54
Edit:
looking into the Misc.php here the code which is giving the error
public static function encodeURIComponent($str)
{
$revert = array('%21'=>'!', '%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')');
return strtr(rawurlencode($str), $revert);
}
I have got php version 4.3.10 running and I read the ckfinder documentation that version2.2.1 is being supported by php4+.
Edit:
I have removed this code and it seems to be working :
/* public static function encodeURIComponent($str)
{
$revert = array('%21'=>'!', '%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')');
return strtr(rawurlencode($str), $revert);
} */
Is there a way to make this work.
Hope someone can help me out.
Related
i am not PHP expert , i uploaded code below to my host , it working well on Xampp but error on hosting environment :
" syntax error, unexpected '(', expecting '{' " at line 5 it mean
"lass SyncAjax {
<?php
if (!defined('ABSPATH')) exit;
if (!class_exists('SyncAjax')){
class SyncAjax {
code error here
public static $AJAX_SYNC_OFFER_TRIGGER_ID = AFFILIATE_PROMOTIONS_PREFIX.'sync_offer_trigger';
public static $AJAX_SYNC_PROMOTION_TRIGGER_ID = AFFILIATE_PROMOTIONS_PREFIX.'sync_promotion_trigger';
public static $AJAX_SYNC_FULL_TRIGGER_ID = AFFILIATE_PROMOTIONS_PREFIX.'sync_full_trigger';
.........................
I am practicing with facebook PHP api
when i am trying to make a login function
here comes out this warnning
syntax error, unexpected T_OBJECT_OPERATOR in /home/u528851895/public_html/Desktap/facebook-php-sdk-v4-4.0-dev/src/Facebook/FacebookResponse.php on line 137
but it's ok when i use mamp localhost
here's line 136~138 in FacebookResponse.php:
public function getGraphObject($type = 'Facebook\GraphObject') {
return (new GraphObject($this->responseData))->cast($type);
}
Upgrade your php version or do something like this
public function getGraphObject($type = 'Facebook\GraphObject') {
$obj = new GraphObject($this->responseData);
return $obj->cast($type);
}
i am trying to upload my codeigniter website on 000webhost server . but its giving me a syntax error
syntax error, unexpected '[', expecting ')' in
/home/a4703701/public_html/application/controllers/update.php
but its working correct on localhost.
the error is in model my model is
public function user($id=NULL)
{
if($id=='')
{
$q = $this->db->get('user');
if($q->num_rows()>0)
{
return $q;
}
}
else
{
$q = $this->db->get_where('user',['id'=>$id]);
if($q->num_rows()>0)
{
return $q->row();
}
}
}
any idea how to remove this error ?
You're almost certainly not running PHP 5.4 or newer but are trying to use syntax only available in those versions.
['id'=>$id]
is shorthand array syntax and was introduced in PHP 5.4. You need to replace it with:
array('id'=>$id)
to be backwards compatible with prior PHP versions.
Having some problem parsing some XML in an application I am building. The format is as follows
<taskResponse statusCode="200">
<session-states>
<min-state>dfgdgdgd</min-state>
<max-state>dgdfgd</max-state>
<session-info>dgffdgd</session-info>
<project-id>B19DEDCC11D4E0EFC000EB9495D0F44F</project-id>
</session-states>
</taskResponse>
Attempting to use the following code to parse out the session-state value
public function parse_session_state($xml){
echo $xml;
$xml = new SimpleXMLElement($xml);
echo $xml->session-states[0]->min-state;
die();
}
but I get an error message
ErrorException [ Parse Error ]: syntax error, unexpected '[', expecting ',' or ';'
This seems to work:
public function parse_session_state($xml){
$xml = new SimpleXMLElement($xml);
echo $xml->{'session-states'}->{'min-state'};
die();
}
I'm getting this error of :
Parse error: syntax error, unexpected T_PUBLIC, expecting T_CLASS in C:\xampp\htdocs\app\class.engine.php on line 75
I don't know what the problem is i've tried everything really but still nothing
Codes around Line 75
final public function disconnect()
{
global $core;
if($this->connected)
{
if($this->mysql['close'])
{
$this->connected = false;
}
else
{
$core->systemError('MySQL Engine', 'MySQL could not disconnect.');
}
}
}
Any help? :)
Does this function appear inside the rest of your class definition {} ? Sounds like maybe your class { ... } closes prematurely before this.
Turns out you were declaring a new function within a function, because of one missing closing bracket.
See here: http://www.pastebin.com/iwSXr1Qa the error was at line 55