ZF Setup

From Triangle Wiki

Jump to: navigation, search

Apache Setup

Use the following below to set up the virtual hosts to work with Zend Framework. The developer should also change there hosts file to allow the keyword Triangle to browse the Site_Template via a browser.

In the hosts file

  • cd /etc
  • sudo vi hosts
  • add "127.0.0.1 triangle" to the list of hosts

Please note the include Path should be one line.

  1. NameVirtualHost *:80
  2.  
  3. <VirtualHost *:80>
  4. ServerName triangle
  5. DocumentRoot /var/www/html/Site_Template
  6.  
  7. php_value include_path '.:/usr/share/php:/var/www/html/
  8. .. ZendFramework-1.5.0/library:/var/www/html/Site_Template
  9. .. :/var/www/html/Site_Template/library'
  10. </VirtualHost>
  11.  
  12. <VirtualHost *:80>
  13. ServerName localhost
  14. DocumentRoot /var/www/html
  15. </VirtualHost>
  16.  
  17. # URL rewrite for Site Template
  18. <Directory "/var/www/html/Site_Template">
  19. RewriteEngine on
  20. RewriteRule !\.(js|ico|gif|jpg|png|css|swf|csv|xml|flv|pdf)$ index.php
  21. </Directory>

Triangle utilises some PEAR packages to allow the Site Template to function

Install PEAR and then do the following commands:

  • sudo pear channel-update pear.php.net
  • sudo pear config-set preferred_state alpha
  • sudo pear install -a HTML_Quickform

External Links

Navigation

Edit Navigation

Personal tools