In this post i`ll explain how to easily set up the Zend Framework. Why Zend Framework?, you may ask and this is the reason.
Anyways, first download the framework from http://framework.zend.com/. You`ll need to register in order to download the full package.
If you haven`t setup a PHP environment I suggest to download xampp here. xampp also comes with an apache server and is very easy to install (for security reasons you may want to read about how to configure your php and apache files somewhere else).
After installing xampp extract the Zend Framework files into a folder of your choice. Next step is to edit the php.ini. Usually this file can be found in the php folder in your xampp installation. Find the line that says include_path and edit the line like this:
include_path = “.;D:\Informatik\SERVER\xampp\php\pear\;D:\Informatik\SERVER\xampp\php\ZendFramework\library”
Of course you have to adjust the path so it actually fits the path where you have extracted the Zend Framework.
Now, inside the ZendFramework\bin folder you can find a batch file that is used to create the project structure (MVC). For convenience we`ll create a project inside xampp`s htdocs folder, because apache serves files from there. To do that open a shell and cd to xampp\htdocs folder and type this:
in\zf.bat create project testproject
Again, adjust the path so it fits your own xampp\htdocs folder as well as the path to the zf.bat file within the ZendFramework\bin folder.
If you don`t see any error messages displayed in the shell during this process you can check the xampp\htdocs\yourtestproject folder. If you see these folders:
creating a project went fine. Next you need to copy the Zend Folder from your ZendFramework folder to the library folder of your project. Now start up the apache server from the xampp console and point your browser to localhost/yourproject/public and you should see this screen:
Congratulations, now move on and read more about getting started with Zend Framework.
I had a couple of problems to use the zf.bat file due to incorrect settings in the php.ini file, if the same happens to you, you may as well leave a comment with the error message and we`ll try figure out what`s wrong.
Thanks for reading.