Category: PHP Frameworks
Upgrade to php 5.6 and apache 2.2 to apache 2.4.17 in ubuntu 12.04
These are the steps to upgrade to PHP 5.6: Add the PPA containing version 5.6 of php for Ubuntu 12.04: sudo apt-add-repository ppa:ondrej/php5-5.6 sudo apt-add-repository ppa:ondrej/php5 Run these command in terminal to upgrade php : sudo apt-get update If everything
Eclipse | Enable Php Support for extra features
In Eclipse (Luna Service Release 2 (4.4.2), jump to method definition is available for Java and other languages. But sometimes, it gets disabled for PHP. For example ,if eclipse crashes. So to enable this, first you have to select the
Capture Screenshot of a Webpage from its URL in PHP
Generally, Google PageSpeed Insights API is used to measure the performance of a web page but you can also use Google PageSpeed Insights API to get a screenshot of the website from URL. In this post, we will show you
Configure PHPMYADMIN to connect to different servers
Here are the steps to set up PHPMYADMIN to connect to database servers located at different ip addresses: 1. Open config.inc.php located in C:\xampp\phpMyAdmin directory in windows and located in /etc/phpmyadmin directory in Ubuntu. 2. Add the below written code
CakePHP | Date format translation using internationalization
In Cakephp, To translate the application language into another, we use internationalization and localization. To display the correct translated date string on change of locale, we need to use right classes. use Cake\I18n\I18n; use Cake\I18n\Time; I18n::Locale(‘es’’); // es locale is
SQL Transaction in Cakephp 3
SQL transaction in Cakephp 3 is a series of statements working in a logical order to handle database errors and ensure data integrity. There are four main methods being used in Sql transaction in Cakephp 3. 1. Initialize the statement
How to integrate CyberSource payment gateway with CakePHP 2.*
Steps to integrate CyberSource payment gateway with CakePHP 2.*: 1. Download zip file of CyberSource library from “https://github.com/chrismeller/cybersource”. 2. Extract cybersource-master folder into cakephp vendors folder. 3. Create tests/config.php for test transaction with code and add credentials like below: <?php
CakePHP | How to change Epoch timestamp (unix timestamp) timezone in cakephp find query
Suppose we have a table cake_test with a column named modified that contains epoch values. CakePHP code: $options = array ( ‘fields’ => array ( “modified”, “to_timestamp(modified) as New__original”, “to_timestamp(modified) AT TIME ZONE ‘America/Denver’ as New__converted” ) ); $result =
CakePHP | Call to a member function schema() on a non-object
Error: Call to a member function schema() on a non-object File: /home/user/git/!defaultRepo!/Appname/lib/Cake/Model/Datasource/Database/Postgres.php Line: 404 Description: I was trying to execute the following cake query to fetch the records: $records = $this->find ( ‘all’, array ( ‘fields’ => array ( ‘Table2.*’,