Skip to main content

Posts

Installing CAKEPHP on your ubuntu machine

Hi Everyone,            I'm listing out the steps to install cakephp :  1. Install the necessary packages using the command        sudo apt-get install apache2 mysql-server php5  2. In case you encounter any Lock Error, make sure no other installation is      happening and close Synaptic Package Manager if open. Even if the problem      exists, execute sudo killall apt-get  3. Enable Mod-rewrite:  sudo a2enmod rewrite   4. Download the latest stable version of cake from http://cakephp.org/ and save      it to your machine.  5. Extract the downloaded file and rename the extracted folder with your project      name(assume, project name is cakephp) and move it to the document root      (most of the times it will be /var/www/)  6. Give writable permissi...

Installing Eclipse Galileo , PHPEclipse plugin and SVN plugin

Steps to Install Eclipse Galileo on Ubuntu , PHPEclipse and SVN plugin   : Start with Eclipse Installation first    Login as root user         Update the package repository by the following command :          apt-get update (or) aptitude update         To install eclipse use the following command :           aptitude install eclipse    This will complete the Eclipse Installation. Now, Install PHPEclipse and SVN plugins    Go to Applications->Programming->Eclipse    In Eclipse menubar, select Menu->Help->Install New Softwares    Click on Add, and insert the follwing:        Installing PHPEclipse plugin      Name: PHPEclipse      URL: http://phpeclipse.sourceforge.net/update/nightly_1.2.x/ ...

Cakephp Findings

Essential things where we go wrong or do mistakes :- 1. Save() does not work! Sometimes it happens that save() fails without any obvious reason. Your data array looks fine and you’ve build the form correctly, etc., etc., but no query was executed. It is very possible that save had failed due to validation errors. Maybe you are updating some model and while the current fields in the form pass the validation, there is a chance that some “other ones” are causing the validation rules to fail. An easy (and helpful) way to see what’s going on with validation is to do pr($this->validationErrors); in your view. By employing this method you’ll see exactly what’s happening with your model’s validation. The other option is to pass false as a second parameter to save(); in order to disable the validation. However, the latter method does not give much of hint and should not be used to fix a failing problem, but rather to purposely avoid validation. 2. Save() still does not w...
What is Cakephp Actually ? CakePHP is a PHP Rapid Development Framework. PHP Framework? What is it? Why should I rely on a Framework? PHP developers are mostly self-trained (at least I am so) and being rather easy-to-develop, lots of developers jump-start developing applications without caring for code organisation/optimization and security.So one should know before you start with the exact application.It becomes a real challenge to DEBUG an unorganized code! Basically we need to follow up some conventions.Since to maintain a proper format of coding.So that it can be understood by any one who refers the code . CakePHP does that. It sets few CONVENTIONs for following and also perform a lot of tasks automatically - like generating a web form from database tables (with ALL VALIDATION RULES), integrating AJAX (Yes! It does so! Even if you do not have much understanding of AJAX), creating sophisticated SQL queries (master-detail type even), and it does so in a bette...