6CS028 Workshop - Web Frameworks

From mi-linux
Revision as of 16:36, 7 February 2013 by In9352 (talk | contribs)
Jump to navigationJump to search

Main Page >> Advanced Web Technologies >> Workbook >> Week 02

Consider using a PHP framework for your assessment. Here are some popular ones:

CodeIgniter

Yii

CakePHP

mod_rewrite

Note that because of the way mod_rewrite is set up on the server you need to add a RewriteBase line in the existing .htaccess file, as follow:

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteBase /~0123456/cake
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

IMPORTANT: Replace "0123456" with your student number and "cake" by the folder in which you have uploaded the framework.

Alternatively you could NOT use mod_rewrite, the tutorial above tells you how (see "A Note on mod_rewrite" section)

Cache

If you are getting the following error message: Warning: _cake_core_ cache was unable to write 'cake_dev_en-gb' to File cache in /studhome/staff/acad/in9352/public_html/cake/lib/Cake/Cache/Cache.php on line 309

You need to make the "app/tmp" folder (and all its sub-folders) writable by all in order to solve this.

If you are still getting cache errors/warnings after this, it might be because the version of PHP running on the server is too old, and caching doesn't work. You could always hide the errors by changing this line in the Config/core.php file:

Configure::write('debug', 0);

Not ideal though :/

Symfony

Akelos

Zend Framework

IMPORTANT: So far I have not managed to successfully install Zend on mi-linux :(