How to configure cURL in xampp server

xampp server with default configuration can’nt run curl_init(); to make it work in xampp server we have to edit three files namely 1. php.ini(which is a configuration stting file). 2. php.ini-recommended(INI-DIST file) 3. php.ini-dist(INI-RECOMMENDED file) open these files in notepad and search for ‘curl’ and remove ‘;’ symbol, save and close the files. Remember to [...]

How to set default values (input field) in symfony 1.4 generated forms

I was trying to set default values for an input field. public function executeNew(sfWebRequest $request) { $this->customer = Doctrine::getTable(‘Customer’)->find(array($request->getParameter(‘customer’))); $this->forward404Unless($this->customer); $this->form = new CallLogForm(); $this->form->setDefault(‘customer_id’,$request->getParameter(‘customer’)); } This is the way to set hidden values of default values for an input field $this->form->setDefault(‘customer_id’,$request->getParameter(‘customer’));

Symfony Study Guide – Small Project Implementation

Download Symfony Sandbox 1.4 Source : www.symfony-project.org/installation Requirement : Xampp or Wamp Package PHP: 5.2 Above Download Symfony and put this into your website root Rename sf_sandbox to your project name. Here it is CRM open config/properties.yml file and put below details [symfony] name=CRM author=Arun Raj R orm=Doctrine

Symfony 1.4 Doctrine Pagination

Doctrine Pagination is made very simple . public function executeIndex(sfWebRequest $request) { $this->pager = new sfDoctrinePager(‘TableName’, sfConfig::get(‘app_max_jobs_on_homepage’); $this->pager->setQuery(Doctrine::getTable(‘TableName’)->createQuery(‘a’)); $this->pager->setPage($request->getParameter(‘page’, 1)); $this->pager->init(); } Success page <?php foreach ($pager->getResults() as $post): ?><div> <?php if($post->getTitle()) { echo link_to($post->getTitle(), ‘news/fullstory?expand=’.$post->getId(),’class=”mhead”‘); } ?> <?php if($post->getDn2()!=”) { echo image_tag($post->getDn2()); } ?> <?php $content=$post->getContent(); $stripcontent=substr($content,” “,700); echo $stripcontent; ?> <div style=”display:block;” > [...]

Google Search Engine Optimization

Add a page that you’d like to see the next time you search for : Google add url

I noticed a new feature from google while doing Search Engine Optimization. You can able to results to google search results. Here we can inlcude our search results to google. I think this move is an alternative to twitter search. What I meant is twitter updates are done by a manual invention, But google results [...]

PHP MYSQL Tips and Tricks

This is a small article containing tricks and tips I aquired by reading PHP 6 Text Book. I was used isset() function to check whether these arguements are set or not. And also I need to check this is empty or not. Here is another function to check both of this requirement at single line. empty() [...]

PHP 6 upgrade : Advantages covered

PHP Personal Home Page now it is Hypertext Pre Processor. Version : 6 (PHP 6) Advantages, Addition of improved MySql Extension PHP 6 support Unicode, so that PHP 6 can handle all languages in the world. I faced lot of problems with ‘Malayalam’ font integration. PHP 6 cleans up a lot of garbbages that was [...]

Image Resize Simple class

Image Resize Simple class

Here is a sample class file for image resize. imageResize.class Download the File  save it in web root and add .php extension to the file  . How to use ? <?php require_once(‘imageResize.class.php’); // Path to File imagejpeg(imageResize::Resize($fileSavePath,$width,$height),$newFileName); ?> $fileSavePath should be the pathname of source file. Say “uploads/arun.jpg”. $newFileName this should be the source File [...]

Videos, Slideshows and Podcasts by Cincopa Wordpress Plugin