Skip to main content

Posts

Showing posts from March, 2012

How to work around the limitations set by Same Origin Policy...

Last week, I wanted to make some Ajax requests from a page generated by some web application to another web application. These two applications are hosted in two different servers, with different domains. To do this type of a thing, you can't use a normal method because of the limitations set in place by "Same Origin Policy".

Same Origin Policy is a security concept for client side programing languages. This policy prevents the client side scripts accessing the pages from different web sites. For an example, if your application is hosted in the "hostA" and a client side script of your application wants to send an Ajax request to a another application that is hosted in "hostB", then this request will be prevented by the Same Origin Policy. To be able to make that type of a request, both host and protocol should be same, according to the Same Origin Policy.

For more details :
http://en.wikipedia.org/wiki/Same_origin_policy
https://developer.mozilla.org/En…

Ground Monitor

This is a species of monitor lizards that lives in Sri Lanka. In Sinhalese this animal is called "Talagoya". The one in these photos used to walk around the areas near my house in Sri Lanka, so one day it was captured to my camera.

How to avoid those little issues one can get when creating new projects with Zend Framwork...

CSS styles my not apply to the templates :
Some times this happens when you haven't created a virtual host for the application. After the virtual host is created styles will apply properly, or just use some url helper like "baseUrl" when linking the style sheets to the templates.

Error messages when using the commands like "zf enable layout", "zf create db-table ....", "zf create model ...", "zf configure db-adapter", and "zf create action ...." etc...
You may get error like "Action 'enable' is not a valid action", "Action 'configure' is not a valid action"......... etc...
Reason for this may be, the Zend library is not in the include path. If so add the library path to the include path. Or check whether there are old libraries in any directories of include paths that conflicts with the new one. Check whether there is a one as a PEAR package.

And check whether the "zf" command …