Posts

php - Usage of Blenc extension of Apache -

i'm bit confused while using blenc v1.1.4b in apache 2.2 on ubuntu 12.04 php 5.3.10. tutorial online, have encrypt php scripts using key file. use following commands encrypt php scripts: export blencode='php -f /path/to/blenc-1.1.4b/tools/blencode.php' $blencode plain.php the script will: create 32-character blowfish unencrypted key create 44-character redistributable key file in same directory, named key_file.blenc create backup directory save original plain.php convert plain.php encrypted version plain.phpenc create symlink named plain.php , link plain.phpenc it returns: fatal error: blenc_compile: validation of script '/path/to/plain.php' failed, cannot execute. in unknown on line 0 seems failed. copy contents of key_file.blenc /usr/local/etc/blenckeys (assume have rights write file): cat key_file.blenc > /usr/local/etc/blenckeys reload browser, still fails. create .htaccess define key is: php_value blenc.keyfile /usr/local...

php - Multimerch seller add and edit error -

i using opencart v.2.1.0.1. have used multimerch seller listing , seller profile management. getting error below when try add or edit seller profile admin panel. please help. error code : syntaxerror: json.parse: unexpected character @ line 1 column 1 of json data ok <!doctype html> <html dir="ltr" lang="en"> <head> <meta charset="utf-8" /> <title>permission denied!</title> <base href="https://localhost/shoppercrux/admin/" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" /> <script type="text/javascript" src="view/javascript/jquery/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="view/javascript/bootstrap/js/bootstrap.min.js"></script> <link href="view/stylesheet/boo...

cors - Why does my JavaScript get a "No 'Access-Control-Allow-Origin' header is present on the requested resource" error when Postman does not? -

i trying authorization using javascript connecting restful api built in flask . however, when make request, following error: xmlhttprequest cannot load http://myapiurl/login . no 'access-control-allow-origin' header present on requested resource. origin 'null' therefore not allowed access. i know api or remote resource must set header, why did work when made request via chrome extension postman ? this request code: $.ajax({ type: "post", datatype: 'text', url: api, username: 'user', password: 'pass', crossdomain : true, xhrfields: { withcredentials: true } }) .done(function( data ) { console.log("done"); }) .fail( function(xhr, textstatus, errorthrown) { alert(xhr.responsetext); alert(textstatus); }); if understood right doing xmlhttprequest different domain page on. browser blocking allows request in same origin securi...

java - MediaRecorder.GetSurface() returning null -

i using code screen recording on nexus 5 running 6.0.1 july security update. screen recording works fine on other devices running 5.0.1, 6.0, 6.0.1 it's not working on phone. gives me following error when try start screen recording. e/mediarecorder: surfacemediasource not initialized! e/androidruntime: fatal exception: main java.lang.runtimeexception: failure delivering result resultinfo{who=null, request=1995, result=-1, data=intent { (has extras) }} activity {mainactivity}: java.lang.illegalstateexception: failed surface @ android.app.activitythread.deliverresults(activitythread.java:3699) caused by: java.lang.illegalstateexception: failed surface @ android.media.mediarecorder.getsurface(native method) it's failing surface screen recording. what's causing , how can resolve this? source code: public static mediaprojectionmanager getmmediaprojectionmanager(final mainactivity context) { displaymetrics metrics = new displaymetrics(); context.getwi...

cakephp 2.x plugin not working in cakephp 3.x -

i have develope 1 plugin in cakephp 2.x , working fine managing basic configuration y website have make following things , below code in appcontroller public $uses = array( 'configuration.configuration', ); public function beforefilter() { $this->configuration->load(); } after in plugin's model have create function function load(){ $settings = $this->find('all'); foreach ($settings $variable){ configure::write("{$variable['configuration']['name']}",$variable['configuration']['value']); } } then in main admin login file using configuration <?php echo $this->html->link($this->html->image(configure::read('site.logo'),array('alt' => 'logo','title'=>configure::read('site.title'),'style'=>'max-width:148px;max-height:33px;')),array('controller'=>'users','action' =...

redirect - Why is Apache redirecting all domains without a .conf file to one particular domain? -

my company has lamp server, , not expert @ web hosting manage basic tasks. my server hosts twelve different domains. each domain has .conf file in sites-enabled directory, , work fine. let's have example1.com, example2.com, , example3.com, explain question. recently, person work registered bunch of new domains. domain registrar, pointed domains our ip address. believe called "parking" domain. have not set .conf file or enabled of these new domains on our server yet. let's newsite1.com, newsite2.com, etc... what's puzzling me if 1 types 1 of new domains browser, 1 of our existing domain shows up. let's it's example1.com. so, if go browser , type in newsite1.com, or newsite2.com, taken example1.com. also, in address bar @ top of browser, displayed example1.com. this not desired behaviour. 1 thing, did not choose, far know, example1.com default, , it's not website want default. in case, don't know why system going example1.com opposed e...

ios - Uploading image to server Detail Explanation for Beginner -

i'm working on uploading image server last 2 days there tons of questions uploading image through afnetworking , nsurlsession , other methods of uploading i'm asking didn't found single answer explaining whole concept how things work , going on under hood searched youtube stuff available in swift , trust me no explanation @ , result found answer looks familiar me //init nsurlsession configuration nsurlsessionconfiguration *defaultconfigobject = [nsurlsessionconfiguration defaultsessionconfiguration]; nsurlsession *defaultsession = [nsurlsession sessionwithconfiguration: defaultconfigobject delegate: nil delegatequeue: [nsoperationqueue mainqueue]]; //create urlrequest nsurl *url = [nsurl urlwithstring:@"yoururl"]; nsmutableurlrequest *urlrequest = [nsmutableurlrequest requestwithurl:url]; //create post params , add httpbody nsstring *params = @"api_key=apikey&email=example@example.com&password=password"; [urlrequest sethttpmetho...