Self Sign Multiple Domain Cert

1. create the CA cert

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt

2. create client req csr

openssl genrsa -des3 -out server.key 2048

*edit the openssl.conf

uncomment “req_extensions = v3_req”

in [ v3_req ] add

subjectAltName = @alt_names

add the end of the file

[ alt_names ]
DNS.1 = test.domain.com
DNS.2 = www1.domain.com

openssl req -new -key server.key -out server.csr

*create a config file “server.conf”

subjectAltName = @alt_names

[ alt_names ]

DNS.1 = test.domain.com
DNS.2 = www1.domain.com
openssl x509 -req -days 365 -in server.csr -CA ca.crt  -CAkey ca.key -set_serial 01 -extfile server.conf -out server.crt
FacebookTwitterGoogle+WeChatWhatsAppShare/Save

Symfony 1.2 APC Cache

;##### APC config ###
;apc.enabled = On
apc.enable_cli = On
apc.shm_size = 128

Doctrine cache

As of sf 1.4

http://www.symfony-project.org/advent_calendar/12/en

http://www.doctrine-project.org/documentation/manual2/1_0/en/one-page#caching

http://www.sfblog.fr/page/utiliser-memcache-avec-doctrine-sous-symfony

Setup for sf 1.2

In the ProjectConfiguration:

  •   public function initialize()
      {
        //enable Doctrine cache
        $manager = Doctrine_Manager::getInstance();
        $cacheDriver = new Doctrine_Cache_Apc();
        $manager->setAttribute(Doctrine::ATTR_RESULT_CACHE, $cacheDriver);
      }

Example query (in UllFlowAppTable.class.php):

  •   /**
       * Find by Id
       *
       * @param integer $id
       * @return Doctrine_Record
       */
      public static function findById($id)
      {
        $q = new Doctrine_Query;
        $q
          ->from('UllFlowApp')
          ->where('id = ?', $id)
          ->useResultCache(true)
        ;
    
        return $q->execute()->getFirst();
      }