Moodle | This page should automatically redirect

| By Webner

In my plugin code I was trying to redirect from one page to another page using redirect as follows: redirect(“success.php?cd=”.$id); Redirecting to the other page was working but during redirection an intermediate page was being displayed like this: On click

HTML Media Capture

| By Webner

How to access Camera and upload the image/video to server? We can achieve above requirements easily by using HTML Media Capture : <form action=”upload.php” method=”post” enctype=”multipart/form-data”> Capture Image: <input type=”file” name=”uploadedfile” accept=”image/*” capture=”camera”> <input type=”submit” value=”Upload”> </form> To capture Audio

Salesforce | Get list of Salesforce sobjects and fields in PHP

| By Webner

Problem: How to get list of all the Salesforce sobjects in php. Also get fields of each sobject. Solution: First we need to install Salesforce php toolkit for this. Once you have it then this is the sample code: require_once(SFDCPHPtoolkit

Purpose of Security.salt and Security.cipherSeed in CakePHP

| By Webner

cipherSeed in CakePHP cipherSeed is used in Security::cipher() function to seed rand(). Seed means to give the initial value to rand() function to start and based on that the future values by rand() function are generated. In php, before 4.2.0

Heroku | The datasource configuration “default” was not found in database.php

| By Webner

Heroku throwing ERROR: “The datasource configuration “default” was not found in database.php” with database configuration already present for cakephp app. In one of our cakephp projects hosted on Heroku we used PostgreSql database. For configuring the database to connect to