Can't install zfcuser on Zend Framework 2 - zend-framework

I'm starting a new project, so I installed the skeleton zf2 project from github.
I followed the instruction provided here https://github.com/ZF-Commons/ZfcUser, to install zfcuser.
I used composer to install zfcuser and changed the required files.
But although I can see the indexpage of the skeleton project at "http://localhost/Test/public/", when I go to "http://localhost/Test/User" all I see is default page saying
Not Found
The requested URL /Teste/public/user was not found on this server.
It's my first time installing modules on zf2. What am I missing?

Remember: All requests will be served out of public/index.
That means if you set up a route like "/some/route" your current setup will have you go to http://localhost/Test/public/some/route
So the ZfcUser route will be: http://localhost/Test/public/user
If you can, try pointing your host root dir to /public.

Related

PHPUnit was not found in your include_path, therefore no testing actions will be created

I created a new Zend framework 1 project (I need to learn ZF1 for a old app I'll be working on) using the following command: zf create project zf-tutorial
... but I get an error telling me: PHPUnit was not found in your include_path, therefore no testing actions will be created.
However, I have phpunit installed and I can confirm this by going to the terminal and running phpunit
I installed PHPUnit from their homepage - http://phpunit.de/manual/4.1/en/installation.html
I suspect that zf create * will generate my test files/folders similar to Rails? I really like this feature and would like to enable it for ZF too (if possible)
Any reason why zend tool isn't picking up phpunit?
Maybe put the path where the phpunit is located into your include_path in your php.ini file? phpunit may be in your shell PATH but might not be in the include_path...

Problems with Zend

I have downloaded and installed Zend Server community edition. I am on a mac.
I have tried to changed the path in
/usr/local/zend/apache2/conf/httpd.conf
so that it pointed at a test file in my documents folder. However, when I type
http://localhost:10081/test.php
into my browser, I just get 404- page not found.
Any suggestions? I am new to web stuff and don't really know what I'm doing wrong.
You can find step by step directions for setting up your local environment on a mac:
http://www.cmiwebstudio.com/blog/zend-server-ce-for-mac-osx-10-lion/
and some other posts that may also help here:
http://www.cmiwebstudio.com/blog/tag/zend-server-ce/

Creating SVN repository server with XAMPP on windows

For last 3 days I am struggling in setting up my SVN server. I tried several ways and tools but I found always some issue and bug all the files.
I am planning to use the following tools for this project.
For Server and database - XAMPP (Comes with APACHE and MySql)
Version control server - subversion-1.6.16
Version control client - tortoiseSVN
IDE is Eclipse
Following are my queries
1. Is the above combination of tools and softwares is perfect for my project?
2. Is there any open-source software which provides all the above functionalities combined?
3. If anybody of you has already done such kind of project, could you please share with me which are the correct version of softwares I should use to get it worked error free.
If anybody can provide solution for below I can carry on with my current setup also.
My Error Message from server for current configuration : I tried to setup the svn-win32-1.6.16 with my XAMPP installation by copying the two moduels mod_dav_svn.so and mod_authz_svn.so to my apache modules directory and changed the httpd.conf file with Loadmodules of these the so files and set the location also for these. But when i start the server in error logs I get error message like this - "httpd.exe: Syntax error on line 136 of C:/xampp/apache/conf/httpd.conf: Cannot load C:/xampp/apache/modules/mod_dav_svn.so into server: The specified module could not be found."
Following are pre-conditions and configurations prior to this error
Location of SVN - C:/SVN/svn-win32-1.6.16
Location XAMPP - C:/xampp/
Changes in httpd.conf file
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
and for location
# Enter this location in your browser to access the repository
<Location /repos>
DAV svn
SVNPath c:/SVN/svn_repos
</Location>
I have created the repository here - C:/SVN/svn_repos
Is the above combination of tools and softwares is perfect for my
project?
That is impossible to answer, because:
a) we don't know what your project is
b) nothing is perfect
But it is definitely an ok combination of tools. If I were you I would not use XAMPP but Zend Server CE instead! You get a nice web GUI for most php configuration needs.
Is there any open-source software which provides all the above
functionalities combined?
No. These tools are maintained for various target audiences and the combination you're asking for wouldn't make much sense in a bundle.
But of course your IDE (Eclipse in this case) integrates nicely with these tools. 'Integrates' means it plays together, doesn't mean it comes bundled with these things.
If anybody of you has already done
such kind of project, could you please
share with me which are the correct
version of softwares I should use to
get it worked error free.
I used to have such a combination (now I'm on Zend Studio with Zend Server CE) and there is no problem with it. The problem is that you're trying to do something unnecessary and wrong.
If you're using XAMPP, you're on a Windows machine, using .so extensions wouldn't do any good at all, Windows needs .dll extensions.
Why do you want to load such extensions anyways? You don't need those in order to get it all working.
Where are your repositories? Only if you want to host your own repositories do you need to run your own server. If that is the case, look at VisualSVNServer. You just install it, no need for integration with anything.
If your repositories are on a location in the net (more likely) you don't need an SVN server, you just need the client. In that case you're ready to go, no need for php extensions. You can checkout repos, commit, export, branch, tag, etc. From within Eclipse or in your file system with TortoiseSVN.
Try it and get back here, if you still experience problems.

Error with the ZF tool while setting up the GuestBook Application

Iam trying to set up the GuestBook Application which comes with zend framework tutorial , Iam following the steps one by one,
However when I enter this command - zf create db-table Guestbook guestbook
Iam getting an error, I have pasted the error here -
C:\xampp\htdocs\quickstart>zf create db-table Guestbook guestbook
An Error Has Occurred Provider 'db-table' is not a valid provider.
I tried googling and searching on zend forums, but seems no one got this sort of issue so far. Can anyone suggest me whats wrong here?
PS: I have set php in my system path and zf tool works for me, its only this specific command thats giving error.
After Lots of digging in and breaking my head with the ZF tool I found that it is using copy of Zend framework which comes with Xampp for Windows.
When I installed Xampp, Zend Framework(Version 1.9.7) got installed inside the
C:\Xampp\Php\Pear\Zend
directory and since C:\Xampp\Php is in my system path this Zend framework got picked up everytime by Zend Tool.
I copied the latest version of stable Zend Framework(1.10.2) to the Zend folder inside Php\Pear and now its works like cake for me :)
Thanks for all your suggestions!
Download latest version of framework files from this link http://www.zend.com/community/downloads & then extract zip file where you will get folder structure like ZendFramework-1.11.12/library/Zend, So from this folder copy Zend folder to Xampp/php/PEAR/zend folder. Then Go to command mode type Zf --help. Now it shows all the commands.
Now also check version of zend-framework in command mode by typing as
zf show version
it should show as version as zend Framework Version: 1.11.12
Check your version, maybe db-table is newer than your version. I just tried the same command you used (zf create db-table Guestbook guestbook) and it worked.
When i write zf show version it responds 1.11.0dev. What does your version say? If it's low, consider updating after following the changelog and testing the rest of your application with the new version of zf.

Problems with zend-tool reporting that providers are not valid

I have recently setup XAMPP 1.7.3 and ZendFramework 1.10.4 on a new computer and many of the commands that I normally use now fail.
Here are the steps I used to setup and test ZF.
First I added the ZF library folder (C:\xampp\php\ZendFramework-1.10.4\library) to the include path in php.ini.
Then I added the ZF bin folder (C:\xampp\php\ZendFramework-1.10.4\bin) to my Path system variable.
To test that everything is configured correctly I ran the command "zf show version" from the command line. The result is "Zend Framework Version: 1.9.6".
Immediately something appears to be wrong. The file that is downloaded is "ZendFramework-1.10.4.zip" and the reported version is 1.9.6. I have re-downloaded the latest version (1.10.4) and removed old copy. Still the incorrect version number problem persisted.
Having done some research there is a bug in the ZF knowledgebase that version 1.10.3 reports a wrong version number. So that may explain the version number problem.
Moving forward I tried to run some zf-tool commands and certain commands reports that the action or provider is not valid.
Example:
C:\xampp\htdocs>zf create project test
Creating project at C:/xampp/htdocs/test
C:\xampp\htdocs>cd test
C:\xampp\htdocs\test>zf create controller Test
Creating a controller at C:\xampp\htdocs\test/application/controllers/TestController.php
...
Updating project profile 'C:\xampp\htdocs\test/.zfproject.xml'
C:\xampp\htdocs\test>zf create action test Test
Creating an action named test inside controller at C:\xampp\htdocs\test/application/controllers/TestController.php
...
Updating project profile 'C:\xampp\htdocs\test/.zfproject.xml'
C:\xampp\htdocs\test>zf enable layout
An Error Has Occurred
Action 'enable' is not a valid action.
...
C:\xampp\htdocs\test>zf create form Test
An Error Has Occurred
Provider 'form' is not a valid provider.
...
Can any one provide insight into these errors and how to correct them?
I had a similar issue, it turned out that I needed to manually update the zf.bat and zf.php files that came included with xampp after updating to the latest zend framework.
I got them from the zend svn here: http://framework.zend.com/svn/framework/standard/trunk/bin/
the simple way if you are using xampp, just go to the path "xampp\php\PEAR" an replace the older Zend directory with all included files by a new one zend 1.10... dir and your porblems are lost :)
i think your problem is, that Zend Tool is shipped with xampp since some versions.
Try to find zf.bat in your Xampp directory and remove it ;)
ZF friends have written the worst kind of docs. For XAMPP user, it is more difficult. I have learning ZF and posting error getting on the path. I am also using XAMPP.
Your error list is very big. I hope I can help you.
Solution for error "An Error Has Occurred
Action 'enable' is not a valid action." is XAMPP's Zend Tool installation. Delete that.
Check here for more details about the solution and other possible errors: http://www.satya-weblog.com/2010/11/zend-framework-creating-layout.html.