Local Domain Name in Windows

Posted in Web on June 20, 2011 by myleskadusale

This a simple tutorial on how to create a local domain name in windows using Apache.

First go to C:\Windows\System32\drivers\etc and edit the hosts file using notepad
Second add this inside the hosts file 127.0.0.1 www.yourdomain.com
Third go to your apache\conf\extra and edit httpd-vhosts.conf and add the text below

DocumentRoot “C:\xampp\htdocs\your_web_app_folder
ServerName www.yourdomain.com

Next go to apache\conf and uncomment Include conf/extra/httpd-vhosts.conf

Save everything and restart Apache

Then try to access http://www.yourdomain.com

Neat Functions in CakePHP

Posted in CakePHP on June 20, 2011 by myleskadusale

If ever you want to remove a validation temporarily for certain fields

you can use unset before saving the data

unset($model->validates['fieldname']);

I also learned also another function to know what field validation I

violated especially when your updating your records because sometimes

it does not show the validation errors I use debug to display it

if(!$this->save())

{

debug($this->validationErrors);

die();

}

Using CakePHP with IIS7

Posted in CakePHP with tags , on July 13, 2009 by myleskadusale

Found a post the shows how to install CakePHP in IIS7 Click Here

Use memcache in CakePHP

Posted in CakePHP with tags , , , on July 13, 2009 by myleskadusale

Found a blog that shows how to use memcache in CakePHP easily.Click Here

How to get the current URL

Posted in CakePHP, CakePHP 1.2 with tags , on June 11, 2009 by myleskadusale

$this->here

How to redirect to the root of your website

Posted in CakePHP, CakePHP 1.2 with tags , , on June 11, 2009 by myleskadusale

I was having a problem in going to the root of my website and I have solved it by using the code below
$this->redirect(“/”);

How to fix IE PNG problems

Posted in CakePHP, HTML, Javascript, Web with tags , , , on May 27, 2009 by myleskadusale

Today I was having a problem displaying transparent PNG’s in IE and found this solution

It worked well.
Hope this helps :)

How to add a Website Icon in the Address Bar

Posted in HTML, Web with tags , , on May 26, 2009 by myleskadusale

Favorite Icons, or favicons for short, are 16px x 16px icons for your website. They are used by web browsers as your website’s icon when a visitor bookmarks your website or visits you website

Favicons are really simple to make, and because they add to your website’s image, there is really no reason not to have them. Look at the address bar now, you will see a blue W icon.

First you have to create a 16px x 16px icon.
Second rename your icon to the standard name which is favicon.ico
Third copy the icon file to your web root or any place you want
Fourth add this code inside the Head tag
<link rel=”shortcut icon” href=”/favicon.ico”>
The href path depends on where your icon is located.

That’s it!
By the way you can have different icons per page just put your favicons in different directory with the same standard name which is favicon.ico

Understanding CakePHP Model Associations

Posted in CakePHP, CakePHP 1.2 with tags , , on May 22, 2009 by myleskadusale

A clear and concise tutorial for understanding CakePHP Model Associations
Click Here

Sending any binary files to the user in CakePHP using Media Views

Posted in CakePHP, CakePHP 1.2 with tags , , on May 19, 2009 by myleskadusale

For more info Click here

Follow

Get every new post delivered to your Inbox.