Error while installing Zend Framework 2 - zend-framework2

I have done accordingly as shown in this below 2 tutorial
http://www.inmotionhosting.com/support/website/zend/installing-zend-framework
http://www.inmotionhosting.com/support/website/zend/testing-your-zend-framework-installation
But on the installation checker, I get the following error .
Zend Framework Installation Errors Tested
0 Exception thrown trying to access Zend/Loader.php using 'use_include_path' = true. Make sure you include Zend Framework in your include_path which currently contains: .:/usr/local/php5_3/lib/php
The following are the paths I tried to include in php.ini
include_path = ".:/usr/local/php5_3/lib/php/home/content/54/10750054/html/zf/library"
And
include_path = "/home/content/54/10750054/html/zf/library"
I get the same error either way.

For a start, there is no file Zend/Loader.php in ZF2. The "testing your Zend Framework installation" article appears to have been written for ZF1 (and not the most recent version of it).
Composer is the best way to install ZF2, and you should be doing this on your own machine (or development machine) rather than straight on to your production hosting. I'd suggest you see how you get on with the instructions in the main ZF2 docs: http://framework.zend.com/manual/2.3/en/user-guide/overview.html

Related

Do zend framework has application setup wizard module?

I'm looking at zend framework 2 to use it for my project.
Wanted to know if it has an in-build php web application installer script/module like mentioned in this thread How I can create installer for website. PHP mysql
I would say using Composer with your own composer.json is as close as you can get...
As an example there is the ZF2 Skeleton Application. Similarly you can also make a composer.json for your own custom application pointing to your custom repository and all dependencies.

ZEND2 project not working after cloned to separate machine

I have cloned my office colleague's zend2 project from our server. He used zfcuser, zfcbase, and zfcadmin. But when I tried to run the project in my local machine its giving
<b>Fatal error</b>: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException'
with message 'Module (ZfcBase) could not be initialized.' in C:\xampp\htdocs\coolshop
\vendor\ZF2\library\Zend\ModuleManager\ModuleManager.php:140
Everything is fine to me as the same project 100% working in my colleague's machine. I tried the composer as well. But no luck
This is a result of loading the ZfcBase module as a git submodule. If you fix this module you'll receive the same error for other modules or dependencies you're using in that manner. I've encountered this problem when someone tries to clone the project on a new machine or you delete the project locally and try to re-clone it.
The simple answer here is to use composer as your dependency manager, you'll have a better day. Head over to ZfcBase on Packagist and copy the require statement into your composer.json file (You'll need to run the composer script after saving your .json file). Most modules should have instructions on using composer to grab them in the README.
I should note that if you're using other modules that depend on ZfcBase, you'll likely just need to have a require statement for those, and not their dependencies (like ZfcBase).
Someone had a similar question regarding the ZfcUser module. Using composer solved his issue.

Using Zend Framework 2 Tool / ZF2 Tool

Apparently there is a version of ZF Tool for ZF2.
The tool should handle the following:
Module maintenance (installation, configuration, removal etc.)
Inspection of application configuration.
Deploying zf2 skeleton applications.
The problem is that the tools is itself installed as a module and the Usage described in the Readme does not provide "correct" details.
It mentions commands such as :
zf.php config [list]
but the zf.php command is not part of the tool and the doc does not provide information. Does anyone know if there is some dependency or other configurations that will make this tool useful?
I don't know. What I can do, is offer an alternative tool:
https://github.com/ebanolopes/zf2-module-generator
Currently (v0.0.1), it only supports adding new modules to your project.

symfony plugin installation failing [bhLDAPAuthPlugin]

I'm working on a symfony project and I need a user access conected to an LDAP server. So I searched for something already done to add to my app and found this plugin that has all I wanted.
So I tried to install with the command $ php symfony plugin:install bhLDAPAuthPlugin
for some reason it throws me this error:
No release avaiable for plugin "bhLDAPAuthPlugin"
I don't really understand what that message means. I've checked the spell of the command (also copied the command given in the page of the plugin) and same error appears. If I had no all requeriments for instalation, other errors would be thrown, right?
PS: If you know some easy way to implement by myself the comunication with LDAP (Microsoft Active Directory) will also be appreciated.
No exactly sure how to solve the error message, perhaps it helps is specifically specify which version you wish to install.
Otherwise there's an easy workaround:
Just download the tgz file from here:
http://www.symfony-project.org/plugins/bhLDAPAuthPlugin/6_0_0
and do
php symfony plugin:install bhLDAPAuthPlugin-etc-etc.tgz

symfony doctrine:insert-sql - "Couldn't locate driver named mysql" error

hey, I am a newbie in symfony.
I am following this joobet tutorial on symfony-project.com, I am on there day 3 http://www.symfony-project.org/jobeet/1_4/Doctrine/en/03
Whenever I type php symfony doctrine:insert-sql, I get the
following error:
doctrine creating tables
Couldn't locate driver named mysql
I am using it on WAMP. I have symfony present at C:\wamp\bin\php\php5.3.0\PEAR\symfony
and my project is present in C:\wamp\www\jobeet
Kindly help me resolve this, as I am stuck here, and cant move further.
You need to enable the mysql driver of PDO. You will need to edit 1 or 2 php.ini files, depending on your system.
First you need to edit the php.ini apache uses, you can find it by creating a new file that does a phpinfo(), checking it via a browser and searching for "php.ini".
The second one is the one the command line uses, open a terminal (start - run - cmd.exe), and run php -i > phpinfo.txt, then open the text file and search for "php.ini".
You are looking for the extensions part of it, uncomment the line with pdo_mysql (remove the ; at the beginning). After all these, restart apache and you're good to go.

Resources