Category: PHP Frameworks
Moodle | Call to undefined method mysqli_native_moodle_database :: insert_records()
We were using insert_records() function to insert multiple records in a Moodle database table but it was not working. We checked for errors by adding following lines in config.php file of moodle: @error_reporting(E_ALL | E_STRICT); @ini_set(‘display_errors’, ‘1’); $CFG->debug = (E_ALL
Heroku | How to delete prior database backups
Following are the steps to delete the Postgres database backup: 1. Login into heroku. 2. Click on the database>PG Backups. Here you can see all the PG backups list. 3. . For deleting the database, first of all you have
Cakephp | URL routing using prefix before domain name
Routes in an application are configured in app/Config/routes.php. Defining your own routes allows you to define where your application will take the control to for a given URL. Default routing is like this: domain/controller/action Ex. www.xyz.com/user/login Prefix routing will add
Zoho CRM | Reduce API call consumption
This is a simple idea to reduce API calls consumption when you pull data from Zoho CRM into an integrated piece of code (like server side code in PHP or Java that connects to Zoho CRM to retrieve records). In
Run embedded batch files
In one of the projects we had a batch file which runs another batch file within it in a loop. This was not working. It used to run once and then used to get stuck. This is sample code of
PHP | Clone arrays containing objects
In PHP you need deep cloning to clone arrays containing objects. Suppose we have $cold_items as an array of objects. To clone it appropriately so that while changing the values in one array does not impact the other one, use
Call third party JSON webservice in cakephp 3.0
To call third-party web service in CakePHP 3.0. You can use Http client available in CakePHP core lib (CakeNetworkHttpClient). Include CakeNetworkHttpClient in your controller. use CakeNetworkHttpClient; Here is the method to call third-party web service. You can use this method
Cakephp | URL routing using prefix after domain name
Routes in an application are configured in app/Config/routes.php. Defining your own routes allows you to define where your application will take the control to for a given URL. Default routing is like this: domain/controller/action Ex. www.xyz.com/user/login Prefix routing will add
Moodle / PHP | The uploaded file exceeds the upload_max_filesize directive in php.ini
How to increase the value of ‘upload_max_filesize’ variable to upload a file/plugin of larger size. We were trying to install a new plugin with size of approx 3.5 mb in our moodle site. It was showing an error:“The uploaded file