This Father’s day, zendcasts is doing 2 videos back to back! There’s been a bit of talk in the comments about how to setup the Zend Framework on Windows. Thankfully, Tawfek Daghistani took some initiative and put together this short piece on setting up WAMP Server with Zend.
For a first time doing a screencast, it’s pretty solid! The text is a bit hard to read, but luckily you can follow along with the source code. If you want all his files, just grab the zipped version.
Thanks Tawfek!
Like the video? Support Zendcasts:

Wow, thanks a lot! I was just about to give up on getting Zend Framework installed this evening when I found your tutorial.
)
I can now skip any further complicated admin tasks and start coding!
Thanks Bazz For your nice feed back

and please dont give up again
cuz every things in this world has its own helper method but you should know how to implement it
Thank you again
ما شاء الله
Hello,
thanks a lot for this video tutorial. Your english, for a swiss man, is completely understanding… And the tutorial is really good ! I think I looking for it for a while !
Godd luck for the rest et thank you again !
thank you Mic ,
i am really happy to hear that
hello Mic,
After doing all task what you have told in viedo, there is problem in starting wampserver.
don’t know why?
I am getting this error
“Server not found
Firefox can’t find the server at http://www.dev.local.”
Please help me to find out the problem
when i type http://dev.local/, URL get changes into http://www.dev.local/
Pls check my previous comment and please give me the solution
Hi Lokesh ,
1-you should check that wamp server is running (apache is stopping when he found some error in config file )
2-double check the :
#first Domain NameVirtualHost dev.local ServerName dev.local ServerAlias dev.local DocumentRoot C:/Sites/zfapp/public ErrorLog “C:/Sites/zfapp/public/error.log” CustomLog C:/Sites/zfapp/public/access.log common Options -Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all
3- don’t use any proxy or add the (*.local) to NO PROXY text input in connection setting in Firefox like this [localhost, 127.0.0.1 , *.local]
you may also declare [www.dev.local] and delete [dev.local] in both hosts file and apache config and it should work after restarting wamp .
i think now this 3 tips will help you
if it doesn’t please let me know
2-double check the [apache config ], download them form example file .
its unclear above because of php escaping.
thank you again
hello tawfekov,
thank you for solution. I have followed all steps what u commented but still same problem is there.
Here is host.co
127.0.0.1 localhost
127.0.0.1 dev.local
—————
2 httpd-vhosts.conf
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn’t need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
#
# for further details before you try to setup virtual hosts.
#
# You may use the command line option ‘-S’ to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any block.
#
#again define localhost
NameVirtualHost localhost:80
DocumentRoot “c:/wamp/www”
ServerName localhost
ServerAlias localhost
#first Domain
NameVirtualHost dev.local
ServerName dev.local
ServerAlias dev.local
DocumentRoot “C:/Sites/zfapp/public”
ErrorLog “C:/Sites/zfapp/public/error.log”
CustomLog “C:/Sites/zfapp/public/access.log” common
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
——————————————–
when i type http://dev.local
it throws me to a search engine
Please tell me the correction which i should make. Also there is some problem in RAR file…not being extracted.
Hi ,
i catch it
you are editing Here is host.ics i guess ,
but our wanted file is hosts with out any extention “C:\WINDOWS\system32\drivers\etc\hosts” and you might see it hidden or a system file [go to file option and show hidden files and system files also and add them 127.0.0.1 localhost
127.0.0.1 dev.local
]
and i guess now eery thing will be okey
also check if localhost is viewed correctly
let me know if you still had errors
and about the ZIP file you can download it form
http://rapidshare.com/files/256097982/zc27-getting-started-with-zf-and-wamp-server.zip.html
Thank you tawfekov,
Its working. I just cross checked once again as you suggested. hey you can add me in gmail so we can chat my email address is lokegupta@gmail.com
thks for the help,but I still get the same error the line 18 error, even after adding the include_path in php.ini and turning the shortcut on.Need help abt tht…
Fatal error: require_once() [function.require]: Failed opening required ‘Zend/Application.php’ (include_path=’C:\ZendFramework\bin\quickstart\library;.;c:\php\includes;C:\ZendFramework\library\Zend’) in C:\ZendFramework\bin\quickstart\public\index.php on line 18
Hi Umar ,
your error is : C:\ZendFramework\library\Zend
the correct one is C:\ZendFramework\library
because “Zend” folder is part of folder structure “Zend_ACL” for example
i guess this will bootstrap your app correctly
if its doesn’t please let us know
we are happy to help .
thnx dude….it worked out…
Merci pour ce tutoriel très explicite sur la configuration de wamp server pour Zend Framework
Ferdinand trop vous remercier pour votre gentil commentaire .
The following contents are in my error.log file:
[Mon Jun 15 22:38:09 2009] [error] [client 127.0.0.1] client denied by server configuration: C:/sites/zfapp/public/
[Mon Jun 15 22:38:09 2009] [error] [client 127.0.0.1] client denied by server configuration: C:/sites/zfapp/public/
[Mon Jun 15 22:38:09 2009] [error] [client 127.0.0.1] client denied by server configuration: C:/sites/zfapp/public/
[Mon Jun 15 22:38:10 2009] [error] [client 127.0.0.1] client denied by server configuration: C:/sites/zfapp/public/
[Mon Jun 15 22:38:10 2009] [error] [client 127.0.0.1] client denied by server configuration: C:/sites/zfapp/public/
[Mon Jun 15 22:38:10 2009] [error] [client 127.0.0.1] client denied by server configuration: C:/sites/zfapp/public/
[Mon Jun 15 22:38:26 2009] [alert] [client 127.0.0.1] C:/sites/zfapp/public/.htaccess: Invalid command ‘!RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration
[Mon Jun 15 22:40:26 2009] [error] [client 127.0.0.1] client denied by server configuration: C:/sites/zfapp/public/
Please help me… its
Heyyyyyyyy its working…….. thanks lot…. wht i need i got it thanks thanks……
Good work dear Tawfek
God bless you!
Hope for you all the best
regards,
Yasser
Hi Tawfek ,
It is Wonderful demo.
I am unable to download the zip file even from rapidshare. Can you please post it again or send to babufamily@gmail.com.
I am a professor in an Engg. college in Coimbatore ,India.
It will be useful to me to show the demo to students.
Thank You
Ganesh Babu
thank you Mr Ganesh Babu very much
and i had sent you the file to your email you mention it but could you please let me know why you had problem with downloading the files [its hosted within google code ]
again thank you very much
Hey !
It looks like good, but I think you shouldn’t comment line “Deny from all”, else the server will be available online (allow from all). So you don’t have to comment this if your are using vhosts with their own access configuration (into Directory)…
Hi Toumimi!,
You are right but i did this because i dont want it to be an apache config cast and focus more on easier setup of ZF on wamp
you know there are alot of ideas on configuration ZF with Wamp that is My own experience and i found easy to use and useful
another easy idea [rob allen mention it ]
http://akrabat.com/zend-framework-tutorial/
“If you are deploying to a “user” site (e.g. http://localhost/~rob), then you need a RewriteBase line in your .htaccess file that looks something like: RewriteBase /~rob/zf-tutorial/public/. ”
Very good recourse about ZF
Hi tawfekow,
It’s a great video. It help me a lot to configure zend on window server.I need some more help from u to configure and run zend on window server.
Please guide me whether i am right or wrong the step which i followed to configure zend and install zend on window server.
1) download zend framework and extract on desktop.
2) copy the liberary file and paste it in c://wamp/www/projectname/ folder.
3) follow the configuration step from your video.
My confusion is, I have not found the zend architecture in the projectname folder like,
application,script and other file index.php(bootstrap file)
Please guide me for the same as am unable to work in zend environment .
Thanks
Sanjay
91+09372999749
A big thanks to you !
Starting the quickstart is very easy in WAMP because you just have to delete the .htaccess to make it work… trying to go further by creating the guestbook is a nightmare because the Zend router is not kicking in (of course, I’ve deleted the .htaccess because WAMP complained!)
Now everything works because of you ! I wish I had found this webcast 10 hours of work ago
Hi Sanjay ,
could you please let me know the error msg you got to help you 100 %
Hi Greg!,
WAMP complained when he had problem with his config so make sure to read apache error log ,
and deleting .htaccess wont help you too much
because routing will not be working correctly
thank you both Sanjay and Greg
Hi Tawfekov,
I am having problem in http.vhost file which is in apache/conf/extra folder.
I have write the following code to create the virtual host as per your instruction.
NameVirtualHost localhost:80
DocumentRoot C:/wamp/www
ServerName localhost
ServerAlias localhost
#first domain
NameVirtualHost dev.local
ServerName dev.localhost
ServerAlias dev.localhost
DocumentRoot C:/site/zframe/public
ErrorLog “C:/site/zframe/public/error.log”
CustomLog “C:/site/zframe/public/access.log” common
Option Indexes Multiviews
AllowOverride All
Order Allow,deny
Allow from all
I have confusion about the code in the directory i.e, whether it is correct or not.
When i save the above code and try to start the apache service it not getting start ,and when i run http://dev.local then i got file not connect error in the browser. Even when i try to run http://localhost then also i got the same error file not connect.
Please tell me what to do as my configuration got stop because of the above error.
Regards
Sanjay
Hi Tawfekov,
After saving the all the changes in the http.vhost file, when i tried to start the apache server, it not getting started.
Please tell me what could happen.
I follow all the step which your told in the video. But still i am not getting the Internal server error as per your instruction in the video. Even when i tried to run the localhost server ie http://localhost it also not running and give me the File not Connect error in the browser.
Guide me
Sanjay
Hi Sanjay ,
I advise you to take alook to the sample file above you will sample conf file
and in order to understand what is this error you may check apache error log in
wamp menu > apache > error log
Hi,
Thanks for the advice, Could u plz tell me after made the changes in the http.vhost file when i tried to start the apache why didnt it start?
Regards
Sanjay
Hi!,
when apache is not starting its claim that he has error in its conf please read the error log wamp menu > apache > error log
and make sure to install the apache service form
wamp menu > apache > service > install service
Hi,
I check the wamp service >apache>error log and got following text in the file.
[Mon Aug 31 23:15:14 2009] [notice] Server built: Jan 18 2008 00:37:19
[Mon Aug 31 23:15:14 2009] [notice] Parent: Created child process 3940
[Mon Aug 31 23:15:14 2009] [notice] Child 3940: Child process is running
[Mon Aug 31 23:15:14 2009] [notice] Child 3940: Acquired the start mutex.
[Mon Aug 31 23:15:14 2009] [notice] Child 3940: Starting 64 worker threads.
[Mon Aug 31 23:15:14 2009] [notice] Child 3940: Starting thread to listen on port 80.
[Mon Aug 31 23:29:39 2009] [notice] Parent: Received shutdown signal — Shutting down the server.
[Mon Aug 31 23:29:39 2009] [notice] Child 3940: Exit event signaled. Child process is ending.
[Mon Aug 31 23:29:40 2009] [notice] Child 3940: Released the start mutex
[Mon Aug 31 23:29:41 2009] [notice] Child 3940: All worker threads have exited.
[Mon Aug 31 23:29:41 2009] [notice] Child 3940: Child process is exiting
[Mon Aug 31 23:29:42 2009] [notice] Parent: Child process exited successfully.
Even when i go to install service through wamp service > apache >install service, it has display one black window and show massage Please enter to continue and when i press the enter key the window disappear.
Please tell me what to do.
Could you plz give me your contact number so that i can call u to resolve my problem.
Thanks
Sanjay
Hi,
It working now. Actually I have downloaded the default Zend Directory Structure which contain one demo project and in the application->config->application.ini file there is some code written regarding the project.Because of which it not getting connect to the database. I have remove the code and it working now.
Thanks a lot for guiding such a nice live demo. It helps me a lot to configure zend on window.
If you know how to configure other framework like cakephp or symphany please inform me.
Waiting for your response.
Once again thanks you very much.
God Bless You.
Regards
Sanjay
(Mumbai->India)
thanks very useful and very helpful tuts!
Tawfek, I followed 2 or 3 other tutorials and couldn’t get ZF to work. But thanks to your very complete one, I finally got it working. Woohoo! Thank you so much.
Hi,
First of all , i really appreciated your effort. The tutorial is very nice.It is really helpful.
I am using wamp server 2.0 … Some how i able to manage to get the welcome screen of zend framework without editing the php.ini file.
Hosts
======
127.0.0.1 localhost
127.0.0.1 dev.local
HTTPD.CONF
===========
# Virtual hosts (Line 466)
Include conf/extra/httpd-vhosts.conf
HTTPD-VHOSTS.CONF
=================
NameVirtualHost localhost:80
DocumentRoot C:/wamp/www
ServerName localhost
ServerAlias localhost
#first Domain
NameVirtualHost dev.local
ServerName dev.local
ServerAlias dev.local
DocumentRoot C:/TLLINTRANET/ZendFramework/public
ErrorLog “C:/TLLINTRANET/ZendFramework/public/error.log”
CustomLog “C:/TLLINTRANET/ZendFramework/public/access.log” common
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
Hi,
Thank you very much.Its veryuseful and very simple way.Thanks alot.Do this type of postings.
Hi Sateesh ,
Thanks a lot For your nice feed back
i am happy to hear that
Hi
I am new to zend framework and tried to configure zend framework on Wamp
Till now what i did is
1 Downloaded zend framework in c:/program files.
2 set up class path of zend framework which is in c:/program files.
3: Created a new folder in wamp/www/sites/dev
where I created my project files.
4: I added a new line in system32/drivers/etc/host file with Ip address 127.0.0.1 and dev.localhost.
5: i modified the http:vhost file in apache/config/exta folder as in the video tutorial.
I am getting errors in apache error log.
can any one tell me what i did is correct or wrong.
Please tell me what i supposed to do
Hi laxmi,
could you please provide me with that error log so i can know where is your problem
Hi Tawfek ,
I am new to zend framework and tried to configure zend framework on Wamp too.
After doing all task what you have told in viedo,I get this :
Fatal error: Uncaught exception ‘Zend_Controller_Dispatcher_Exception’ with message ‘Invalid controller specified (error)’ in C:\Sites\ZF\Zend\Controller\Dispatcher\Standard.php:242 Stack trace: #0 C:\Sites\ZF\Zend\Controller\Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\Sites\ZF\Zend\Application\Bootstrap\Bootstrap.php(77): Zend_Controller_Front->dispatch() #2 C:\Sites\ZF\Zend\Application.php(358): Zend_Application_Bootstrap_Bootstrap->run() #3 C:\Sites\zfapp\public\index.php(26): Zend_Application->run() #4 {main} thrown in C:\Sites\ZF\Zend\Controller\Dispatcher\Standard.php on line 242
Also there is some problem in RAR file…not being extracted & I am unable to download the zip file even from rapidshare. Can you please send it to jihadenligne@gmail.com
Thanks
Hi jihade ,
this error mean that your app can’t find the error controller for some reason (usually its a wrong path issue )
double check your “APPLICATION_PATH” you any other paths
and i had sent you the wanted file
thanks !
Hi I got a job and I am new to zend frame work. I got a task to remove zend dependencis from following code
public function setDbTable( $dbTable )
{
if ( is_string( $dbTable ) )
{
$dbTable = new $dbTable();
}
if ( !$dbTable instanceof Zend_Db_Table_Abstract )
{
throw new Exception( ‘Invalid table data gateway provided’ );
}
$this->_dbTable = $dbTable;
return $this;
}
please help
Hi laxmi ,
i will be happy to see you in new & good job ,but i am not sure if i understand the question well
do you mean by removing the dependencies form Zend framework (use it at will or alone ) ????
or using Zend db alone ???
I’ve tried to make Zend Framework work with wamp per 2 days and Couldn’t finally I found your video and you display all the errors I got in my local. You Rocks! thanks