PHP & Zend Framework Tutorial

PHP & Zend Framework Tutorial. I did a lot of googling, installing, re- installing, ? but finally got my first php project to …

More PDF Content

PHP & Zend Framework Tutorial
Page 1
PHP & Zend Framework Tutorial I did a lot of googling, installing, re-installing, … but finally got my first php project to work. I used WAMP for the apache install, the Zend Framework as an MVC, and PostGreSQL as a backend database. Below you can find a basic tutorial on how to get started. Included are following steps: 1. Install & configure WAMP 2. Configure PHP 3. Install & configure PostGres 4. Set up the Zend Framework 5. Start programming I’m gonna try to keep everything as simple as possible. Downside is that you’ll have to try & configure some things on your own. On the other hand it’ll keep this tutorial from becoming too big (and you probably didn’t even got to reading this sentence)… Oh yeah, I’m doing this on my Windows XP system, I don’t know how differently all of this should be done on other systems. 1. Install & configure WAMP. Why WAMP? Well it’s the Windows version of the popular LAMP distribution and the installer configures a lot of things for you. I started with installing & configuring everything (Apache, MySQL/PostGres & PHP) separately which worked (after some time), but I want to spare you the frustrations I had to endure. I’m not gonna tell you how to download it and click next during the installer. The most important thing is the ‘httpd.conf’-file which configures the server. Following parameters are quite important (but should be set correctly after installing WAMP): – the parameter “documentRoot” points to your ‘www’-folder, where you can drop your PHP-files that can be viewed by browser when the server’s URL is given – the parameter “loadModule” points to the PHP configuration that should be used (PHP runtime environment normally is a separate install – Apache can’t handle PHP on his own) Important! I installed WAMP in my “program files” folder, so I recommend you do this too, otherwise you will have to adjust the php.ini file, which is discussed later. So, normally no configuration is need, and after installing you should see an “It works!” when you browse to your http://localhost. If you are having problems, make sure all service are running. 2. Configure PHP
Page 2
The WAMP install will do a lot for you, but you will still have to set your system variables: – Path: add your php folder (e.g: …existingPathValues…;C:\Program Files\wamp\php) – PHPRC (=PHP Runtime Conf): e.g. “C:\Program Files\wamp\php” You can google if you don’t know how to set system variables, but remember to restart your PC after having done this. A very important file is php.ini! It configures your PHP runtime environment. I’ll list the most important parameters (to me): (remember to remove the “;” in front of a parameter to uncomment it) – display_errors: set it to “On” – display_startup_errors: set it to “On” – log_errors: set it to “On” (this is good for a dev environment but remember it affects performance) – extension=… (to add dll’s – we’ll need some to connect to PostGres, so I’ll come back to it later) – extension_dir: to tell PHP where it can find dll’s that are added through the

Download PHP & Zend Framework Tutorial pdf from, 6 pages, 93.85KB.