How can I make email template in Zend Framework?

Hi this is realy common. Create an view script like : /views/emails/template.phtml <body> <?php echo $this->name; ?> <h1>Welcome</h1> <?php echo $this->mysite; ?> </body> and when creating the email : // create view object $html = new Zend_View(); $html->setScriptPath(APPLICATION_PATH . ‘/modules/default/views/emails/’); // assign valeues $html->assign(‘name’, ‘John Doe’); $html->assign(‘site’, ‘limespace.de’); // create mail object $mail = new … Read more

Starting with Zend Tutorial – Zend_DB_Adapter throws Exception: “SQLSTATE[HY000] [2002] No such file or directory”

I would say that you have a problem connecting from PHP to MySQL… Something like PHP trying to find some socket file, and not finding it, maybe ? (I’ve had this problem a couple of times — not sure the error I got was exactly this one, though) If you are running some Linux-based system, … Read more

Is en_UK an illegal locale?

The correct country code is en_GB. Locales use ISO 3166-1 for country codes. The wikipedia writeup includes: The codes are chosen, according to the ISO 3166/MA, “to reflect the significant, unique component of the country name in order to allow a visual association between country name and country code”.[7] For this reason, common components of … Read more

How to print exact sql query in zend framework ?

Select objects have a __toString() method in Zend Framework. From the Zend Framework manual: $select = $db->select() ->from(‘products’); $sql = $select->__toString(); echo “$sql\n”; // The output is the string: // SELECT * FROM “products” An alternative solution would be to use the Zend_Db_Profiler. i.e. $db->getProfiler()->setEnabled(true); // your code $this->update($up_value,’customer_id =’.$userid.’ and address_id <> ‘.$data[‘address_Id’]); Zend_Debug::dump($db->getProfiler()->getLastQueryProfile()->getQuery()); … Read more

how to create virtual host on XAMPP [duplicate]

Step 1) C:\WINDOWS\system32\drivers\etc\ Open the “hosts” file : 127.0.0.1 localhost 127.0.0.1 test.com 127.0.0.1 example.com Step 2) xampp\apache\conf\extra\httpd-vhosts.conf <VirtualHost *:80> DocumentRoot C:/xampp/htdocs/test/ ServerName www.test.com </VirtualHost> <VirtualHost *:80> DocumentRoot C:/xampp/htdocs/example/ ServerName www.example.com </VirtualHost> Step 3) C:\xampp\apache\conf\httpd.conf. Scroll down to the Supplemental configuration section at the end, and locate the following section (around line 500), Remove the # … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)