Installing CakePHP: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
(minor edit 1)
Line 1: Line 1:
Since the cake wiki is down, i am reposting relevant parts of the tutorial i wrote there regarding using cake and the uniform server (originally http://wiki.cakephp.org/tutorials:forl_beginners_using_uniform_server). Learn more about cake at http://bakery.cakephp.org/ or simply http://bakery.cakephp.org/
Since the Cake Wiki is down, i am reposting relevant parts of the tutorial i wrote there regarding using cake and the uniform server [http://wiki.cakephp.org/tutorials:forl_beginners_using_uniform_server originally]. Learn more about cake at http://bakery.cakephp.org/ or simply http://bakery.cakephp.org/


The uniform server doesn't "install" so much as you just unpack it. I recommend unpacking it in the root of a drive and not buried somewhere in a special "my documents" or desktop folder, so like, "c:\". Once you have unpacked it, you have to follow the instructions that come with the php4 plugin and the unitray. I prefer to install the php4 plugin because, although cake runs on php5, most hosting services do not run php5, so i want to make sure my development environment is the same just in case there are any issues (especially with vendor classes). anyway it's simple: you just replace some crap into the uniserver/diskw/usr/local/php folder and change one line in your apache's httpd.conf (all described in the plugin's readme). installing the unitray is also easy, but to make the unitray compatible with uniserver 3.3 (not 3.2) you have to change one line in the uniserver\diskw\plugins\UniTray\unitray.ini file from "Start.bat" to "Server_Start.bat" under the "StartUniServer" section. no biggie, and then we get to use the ultra-handy shortcuts on the uniserver system tray icon. you can also launch the unitray now and/or make a shortcut in your startup items folder if you like.
The uniform server doesn't "install" so much as you just unpack it. I recommend unpacking it in the root of a drive and not buried somewhere in a special "my documents" or desktop folder, so like, "c:\". Once you have unpacked it, you have to follow the instructions that come with the php4 plugin and the unitray. I prefer to install the php4 plugin because, although cake runs on php5, most hosting services do not run php5, so i want to make sure my development environment is the same just in case there are any issues (especially with vendor classes). anyway it's simple: you just replace some crap into the uniserver/diskw/usr/local/php folder and change one line in your apache's httpd.conf (all described in the plugin's readme). installing the unitray is also easy, but to make the unitray compatible with uniserver 3.3 (not 3.2) you have to change one line in the uniserver\diskw\plugins\UniTray\unitray.ini file from "Start.bat" to "Server_Start.bat" under the "StartUniServer" section. no biggie, and then we get to use the ultra-handy shortcuts on the uniserver system tray icon. you can also launch the unitray now and/or make a shortcut in your startup items folder if you like.
Line 44: Line 44:
from here you unpack cake into your document root, so that inside your www directory you have a "cake" folder and your various app folders, which won't be named "app" unless you only have one project. done this way, i don't think you even have to edit the app/webroot/index.php file (you can split up the cake files any way you want, in production for example, you may want only the app/webroot folder's contents to be in your hosting space's public_html folder, and the app folder and cake folders to be in your non-public user folder, in which case you will have to edit the app/webroot/index.php in at least one place -- see the cake site for instructions on all kinds of different filesystem configurations, but remember, you should not have to edit the .htaccess files or anything in the cake folder or anything other than the three constants in the index.php file in app/webroot to get cake working). next, edit your app/config/database.config file, and start baking (ie: open a command prompt inside w:/www/cake/scripts/ and type: "w:\usr\local\php\php.exe bake.php -help" or just "php.exe bake.php -help" if you did the path setting step above).
from here you unpack cake into your document root, so that inside your www directory you have a "cake" folder and your various app folders, which won't be named "app" unless you only have one project. done this way, i don't think you even have to edit the app/webroot/index.php file (you can split up the cake files any way you want, in production for example, you may want only the app/webroot folder's contents to be in your hosting space's public_html folder, and the app folder and cake folders to be in your non-public user folder, in which case you will have to edit the app/webroot/index.php in at least one place -- see the cake site for instructions on all kinds of different filesystem configurations, but remember, you should not have to edit the .htaccess files or anything in the cake folder or anything other than the three constants in the index.php file in app/webroot to get cake working). next, edit your app/config/database.config file, and start baking (ie: open a command prompt inside w:/www/cake/scripts/ and type: "w:\usr\local\php\php.exe bake.php -help" or just "php.exe bake.php -help" if you did the path setting step above).


i know this tutorial had a lot more beginner instructions on baking a basic app, but a lot has changed since then anyway and mostly i just wanted to repost this uniform-server-specific info. hope someone finds it useful.
I know this tutorial had a lot more beginner instructions on baking a basic app, but a lot has changed since then anyway and mostly i just wanted to repost this uniform-server-specific info. hope someone finds it useful.
 
 
==Other Links==
# [http://www.tm4y.co.za/cakephp/absolute-beginners-guide-to-cakephp-windows.html Absolute Beginners guide to Cakephp (Windows)]
 
[[Category: Installation]]
[[Category: User Made]]
[[Category: Self Install]]
[[Category: Development]]