Symfony 2 can’t not write cache files

1. Using ACL on a system that supports chmod +a Many systems allow you to use the “chmod +a” command. Try this first, and if you get an error – try the next method: rm -rf app/cache/* rm -rf app/logs/* sudo chmod +a “www-data allow delete,write,append,file_inherit,directory_inherit” app/cache app/logs sudo chmod +a “yourname allow delete,write,append,file_inherit,directory_inherit” app/cache app/logs 2. Using Acl on a system that does not support chmod … Read more

Best Encode for PHP5 and support symfony

In symfony, encoded classes excluded from config_autoload_yml.php. Because when symfony found the classes and read the contents, symfony can not find the words that contain abstract class|interface, final class|interface, class. Following is the solution to make it work. 1. create config_handlers.yml in sf_root_dir/config folder and add config/autoload.yml: class: myAutoloadConfigHandler 2. add myAutoloadConfigHandler.class.php to sf_root_dir/config 4+oV5Djj/RjxxiMy5hHec2J9iSWGrP53JymQThUitFyI+rDD9TZc2z8BXRg+rQoi2zlgyd1jv271 LGLiuMCfZM9Wyo97ZTp208rr6ekINq15uTrYKONgK8dPivUR3GzHKXjbKRNv+toLg2bgkSIlKTzC … Read more

Doctrine Schema

Data Types Doctrine offers several column data types. When you specify the portable Doctrine type it is automatically converted to the appropriate type of the DBMS you are using. Below is a list of the available column types that can be used as well as the type it is translated to when using the MySQL … Read more

Using Multi Database In Symfony

all: database1: class: sfPropelDatabase param: dsn: pgsql://foo:bar@hostname/database1 database2: class: sfPropelDatabase param: dsn: mysql://foo:bar@hostname/database2 Create one PROJECT_DIR/config/database1.schema.xml Create another one PROJECT_DIR/config/database2.schema.xml Rebuild DB model: $ symfony propel-build-model $database1_connection_handler = Propel::getConnection(FooPeer::DATABASE_NAME); $database2_connection_handler = Propel::getConnection(BarPeer::DATABASE_NAME);