Fatal error: Uncaught exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed' in C:\xampp\htdocs\t9l_loyaltyprogram\common\lib\Yii\web\CHttpSession.php:138 Stack trace:
#0 C:\xampp\htdocs\t9l_loyaltyprogram\common\lib\Yii\web\CHttpSession.php(138): session_write_close()
#1 [internal function]: CHttpSession->close()
#2 {main} Next exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed' in C:\xampp\htdocs\t9l_loyaltyprogram\common\lib\Yii\web\CHttpSession.php:138 Stack trace:
#0 C:\xampp\htdocs\t9l_loyaltyprogram\common\lib\Yii\web\CHttpSession.php(0): session_write_close()
#1 [internal function]: CHttpSession->close()
#2 {main} Next exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed' in C:\xampp\htdocs\t9l_loyaltyprogram\common\lib\Yii\web\CHttpSession.php:138 Stack trace:
#0 C:\xampp\htdocs\t9l_loyaltyprogram\common\lib\Yii\web\CHttpSession.php(0): session_write_close()
#1 [internal function]: CHttpSession->close()
#2 {ma in C:\xampp\htdocs\t9l_loyaltyprogram\common\lib\Yii\web\CHttpSession.php on line 138
how to fix this issue i'm unable to find any answer
I had the same error. I corrected it using an array of session
foreach ($output['tab_displayId'] as $id_display => $id_param){
$test = new ClParaWidget($id_param, $id_display);
$output[$id_display] = $test->toString($id_display);
if (Yii::app()->session['S' . $id_display] != $output[$id_display])
Yii::app()->session['S' . $id_display] = $output[$id_display];
}
I give more explanation. If I want to save in a session value an array:
Yii::app()->session['data'] = $array_data;
sometimes, this code returns an error:
Fatal error: Uncaught exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed' in C:\xampp\htdocs\t9l_loyaltyprogram\common\lib\Yii\web\CHttpSession.php:138 Stack trace:
for that, I propose to use a array of session like here:
foreach ($array_data as $id => $data)
Yii::app()->session['S_' . $id] = $data;
Related
I am using google-play-scraper. but I am getting below error while using it.
Fatal error: Uncaught Error: Call to undefined method Symfony\Component\BrowserKit\Response::getStatus() in C:\xampp\htdocs\plystore\demo_123\google-play-scraper-master\vendor\raulr\google-play-scraper\src\Client.php:15 Stack trace: #0 C:\xampp\htdocs\plystore\demo_123\google-play-scraper-master\vendor\symfony\browser-kit\AbstractBrowser.php(401): Raulr\GooglePlayScraper\Client->filterResponse(Object(Symfony\Component\BrowserKit\Response)) #1 C:\xampp\htdocs\plystore\demo_123\google-play-scraper-master\vendor\raulr\google-play-scraper\src\Scraper.php(367): Symfony\Component\BrowserKit\AbstractBrowser->request('GET', 'https://play.go...') #2 C:\xampp\htdocs\plystore\demo_123\google-play-scraper-master\vendor\raulr\google-play-scraper\src\Scraper.php(108): Raulr\GooglePlayScraper\Scraper->request('/store/apps/det...', Array) #3 C:\xampp\htdocs\plystore\demo_123\google-play-scraper-master\examples\app.php(10): Raulr\GooglePlayScraper\Scraper->getApp('com.google.andr...') #4 {main} thrown in C:\xampp\htdocs\plystore\demo_123\google-play-scraper-master\vendor\raulr\google-play-scraper\src\Client.php on line 15
After getting this error I try the below solution.
Solution URL: https://github.com/raulr/google-play-scraper/issues/35
`[Change getStatus() to getStatusCode() ]
vendor\raulr\google-play-scraper\src\Client.php
Line: 15
$response->getStatus()
to
$response->getStatusCode()
vendor\raulr\google-play-scraper\src\Scraper.php
Line: 368
$status_code = $this->client->getResponse()->getStatus();
to
$status_code = $this->client->getResponse()->getStatusCode();`
but it did not work for me.
I'm working with this codeigniter script called Crysandrea, anyways everything was going smoothly until I tried out the trading system.
Here is the error.
Fatal error: Uncaught exception 'No_Result_Exception' with message 'No results' in C:\xampp\htdocs\application\core\CRYS_Model.php:97
Stack trace: #0 C:\xampp\htdocs\application\core\CRYS_Model.php(190):
CRYS_Model->_process_result(Object(CI_DB_mysql_result), 1) #1
C:\xampp\htdocs\application\controllers\trades.php(535):
CRYS_Composite_Model->findRelation('3', '1', '*', Array) #2 [internal
function]: Trades->accept_trade('2') #3
C:\xampp\htdocs\system\core\CodeIgniter.php(359):
call_user_func_array(Array, Array) #4 C:\xampp\htdocs\index.php(203):
require_once('C:\xampp\htdocs...') #5 {main} thrown in
C:\xampp\htdocs\application\core\CRYS_Model.php on line 97
Here's the code for CRYS_Model.php
protected function _process_result(&$result, $limit=1) {
if (!$result->result_array())
throw new No_Result_Exception();
if ($limit === 1)
return $result->row(0, static::$INNER_MODEL);
else
return $result->result(static::$INNER_MODEL);
}
If you need anything, please say so!
My Wordpress pages are returning this error to me:
Fatal error: Uncaught exception 'Zend_Controller_Response_Exception'
with message
'Cannot send headers; headers already sent in /home/memteaim/public_html/wp/wp-content/themes/memtea/core/library/class.layout.php, line 159'
in /home/memteaim/public_html/lib/Zend/Controller/Response/Abstract.php:321
Stack trace:
#0 /home/memteaim/public_html/lib/Zend/Controller/Response/Abstract.php(115): Zend_Controller_Response_Abstract->canSendHeaders(true) #1 /home/memteaim/public_html/app/code/core/Mage/Core/Model/App.php(1246): Zend_Controller_Response_Abstract->setHeader('Content-Type', 'text/html; char...')
#2 /home/memteaim/public_html/app/code/core/Mage/Core/Model/Cookie.php(93): Mage_Core_Model_App->getResponse()
#3 /home/memteaim/public_html/app/code/core/Mage/Core/Model/Cookie.php(209): Mage_Core_Model_Cookie->_getResponse()
#4 /home/memteaim/public_html/app/code/core/Mage/Core/Model/Cookie.php(260): Mage_Core_Model_Cookie->set('frontend', '9cc2ffcf7392261...', NULL, NULL, NULL, NULL, NULL)
#5 /home/memteaim/public_html/app/co in /home/memteaim/public_html/lib/Zend/Controller/Response/Abstract.php on line 321
Here is line 321 - 325 in my Abstract.php file:
throw new Zend_Controller_Response_Exception('Cannot send headers; headers already sent in ' . $file . ', line ' . $line);
}
return !$ok;
}
What's going on here and how do I fix it.
Any help would be amazing, thanks!
I'm trying to upload a torrent into torcache.net, using their SOAP API.
<?php
$client = new SoapClient('http://torcache.net/torcache.wsdl');
$info_hash = $client->cacheTorrent(base64_encode(file_get_contents('test.torrent')));
print_r($info_hash);
?>
Here's what I receive:
Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in D:\Web\data\localweb\test.php:4
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://torcache...', 'urn:xmethods-de...', 1, 0)
#1 D:\Web\data\localweb\test.php(4): SoapClient->__call('cacheTorrent', Array)
#2 D:\Web\data\localweb\test.php(4): SoapClient->cacheTorrent('ZDg6YW5ub3VuY2U...')
#3 {main}
thrown in D:\Web\data\localweb\test.php on line 4
Refer this, see if you can get any help.
or
Try this:
<?php
try {
$x = #new SoapClient("http://torcache.net/torcache.wsdl");
} catch (Exception $e) {
echo $e->getMessage();
}
?>
I'm trying to send test message with my PHP SOAP client. I'm using BeSimpleSoap library because I had problems with standard PHP SOAP calss and NuSOAP class.
Part of the scriptis is:
$client = new BeSimple\SoapClient\SoapClient("GSBService.wsdl", array(
"trace"=>1,
"exceptions"=>1,
'location'=>$SERVICE_TEST,
"local_cert" =>$SOAP_cert,
'uri'=>$NAMESPACE_URI,
"passphrase"=>$cert_password,
"connection_timeout" => 60));
var_dump($client->echo('abc1234'));
print_r( $client->sendMessage($par_envelope));
echo "<p>Request :".htmlspecialchars($client->__getLastRequest()) ."</p>";
echo "<p>Response:".htmlspecialchars($client->__getLastResponse())."</p>";
echo "<p>Debug:".soapDebug($client)."</p>";
Error is:
string(57) "Request: 'abc1234'. Response: '2014-02-12T09:39:56.474Z'."
Fatal error: Uncaught SoapFault exception: [env:Client] Internal Error in C:\xampp\htdocs\NIAS\HZZO-OKP-SOAP.php:146 Stack trace: #0 C:\xampp\htdocs\NIAS\HZZO-OKP-SOAP.php(146): SoapClient->__call('sendMessage', Array) #1 C:\xampp\htdocs\NIAS\HZZO-OKP-SOAP.php(146): BeSimple\SoapClient\SoapClient->sendMessage(Array) #2 {main} thrown in C:\xampp\htdocs\NIAS\HZZO-OKP-SOAP.php on line 146
I tried:
ini_set('soap.wsdl_cache_enabled',0);
and got this:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'file:///schema/GSBSchema.xsd' in C:\xampp\htdocs\NIAS\BeSimpleSoap-master\src\BeSimple\SoapClient\SoapClient.php:113 Stack trace: #0 C:\xampp\htdocs\NIAS\BeSimpleSoap-master\src\BeSimple\SoapClient\SoapClient.php(113): SoapClient->SoapClient('\wsdl_9429a1dff...', Array) #1 C:\xampp\htdocs\NIAS\HZZO-OKP-SOAP.php(134): BeSimple\SoapClient\SoapClient->__construct('GSBService.wsdl', Array) #2 {main} thrown in C:\xampp\htdocs\NIAS\BeSimpleSoap-master\src\BeSimple\SoapClient\SoapClient.php on line 113
The problem was in encoding of $par_envelope.
After I encoded string in UTF-8 with utf8_encode I didn't get
Fatal error: Uncaught SoapFault exception: [env:Client] Internal Error