Zend Framework – a sample project

Sample project for Zend framework mentioned at manual is easy to create and document is also good. I just need to work on php.exe file PATH. Due to this, the command at the start of document was not working. I have already set the include_path in php.ini for Zend Framework. Help for solving the error due to php.exe is also discussed there.

Error due to php.exe path problem:
C:\xampp\htdocs\ZendFramework\demos>C:\xampp\htdocs\ZendFramework\bin\zf.bat create project quickstart
'"php.exe"' is not recognized as an internal or external command,
operable program or batch file
.

For solving PATH problem for php.exe, add the PATH to php.exe in PATH environment variable. For Win7, just search PATH and select the top result. Set the path and close the command window to open it again. In the new command line window, the project creation command should work.

I have decided to store the new project in demos folder, so I have changed my directory to that address as seen in the above error message.

Other than the above problem there are no potholes. Just need to read the document for understanding Zend Framework folder structure and its technologies. At last, VirtualHost creation method is given. It can be just for looking nice in Web browser address bar. After creating the VirtualHost, I need to enter this: http://quickstart.local/ instead of this: http://localhost/ZendFramework/demos/quickstart/public/.

How the sample project look like:

zend-framework-sample-project

Extra VirtualHost setting is needed to save localhost path for other project you may like to view using old path.

Add the following just above the Virtual Path setting you are going to add for the project and that is mentioned in the project documentation.

NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
#ServerAlias domain.tld *.domain.tld
DocumentRoot C:/xampp/htdocs
</VirtualHost>

Here is my VirtualHost directive for the project:

<VirtualHost *:80>
ServerName quickstart.local
DocumentRoot C:/xampp/htdocs/ZendFramework/demos/quickstart/public
SetEnv APPLICATION_ENV "development"
<Directory C:/xampp/htdocs/ZendFramework/demos/quickstart/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
  • # 1 - by xrumer seo

    Excellent goods from you, man. I’ve understand your stuff previous to and you are just too fantastic. I really like what you have acquired here, really like what you are saying and the way in which you say it. You make it enjoyable and you still care for to keep it sensible. I cant wait to read much more from you. This is really a great site.

Comments are open for an year period. Please, write here on Facebook page.