Categories
Server Yii Framework

Setting up Yii Environment on your Server

How to Setup Yii on your Environment Server 1. Make Sure your vhost is setup correctly, with debian/ubuntu that is /etc/apache2/sites-available/sitename Options FollowSymLinks -Indexes Includes AllowOverride All 2. Set your include path in php.ini that is etc/php/apache2/php.ini ; UNIX: “/path1:/path2” include_path = “.:/usr/share/library” 3. Download, get url from Yii Download Page wget https://github.com/yiisoft/yii/releases/download/1.1.14/yii-1.1.14.f0fee9.tar.gz 4. Unzip […]

Categories
PHP 5 Zend Framework 1.12

New Year, New Dates on your Copyright Footer of your Website

It’s a New Year That means Instead of Saying 2014 on the bottom of your website it says 2014. copyright (c) 2013 Mysite.co.za Well here’s how to make that line dynamic so you need not change it again Zend: <?php $date = new Zend_Date(); echo $date->get(Zend_Date::YEAR); ?> PHP: echo date(“Y”);

Categories
Zend Framework 1.12

Zend_form populate() not working?

Zend_form populate() not working Below are a few reasons and a method for correcting: Zend_form populate() not working 1. Get the record used to populate $myModel = new Model_My(); $id = $this->_request->getparam(‘id’); $record = $myModel->find($id)->current(); 2. Make Sure is the form of key value pairs array Zend_Debug::dump($record->toArray()); 3. Make Sure you are calling correctly $frmResource […]

Categories
Github

What is the clone URL of my Private Remote Git Repository?

The URL is of the form: user@my.site.com:project.git git@git.droplet.com:my-project.git

Categories
PHP PHP 5 Web Development

PHP Developer Checklist: Application Level Package Managers

PHP Application Level Package Manager: Composer What is Composer? Ever used apt, dpkg, yum?  These are package managers for unix systems, they automatically update your server with latest updates and install dependant libraries. Composer does the same thing just for PHP. It allows you to declare the dependant libraries for your project in a: composer.json […]