Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails #42

Closed
markushausammann opened this issue Apr 26, 2012 · 4 comments
Closed

Installation fails #42

markushausammann opened this issue Apr 26, 2012 · 4 comments

Comments

@markushausammann
Copy link

I do the following:

  • recursive clone of zend skelton app which includes zf2
  • clone of ZfcBase into vendor
  • clone of ZfcUser into vendor
  • setup the db schema
  • add the provided database.config.php to the config autoload folder
  • copy/paste the module.zfcuser.config.php to the autoloader folder and set the alias (masterdb)
  • go to domain/user

I get this error:

Catchable fatal error: Argument 2 passed to Zend\Db\TableGateway\TableGateway::__construct() must be an instance of Zend\Db\Adapter\Adapter, instance of PDO given in C:\htdocs\zf2-skeleton\vendor\ZendFramework\library\Zend\Db\TableGateway\TableGateway.php on line 100
@mtudor
Copy link

mtudor commented Apr 27, 2012

Hi Markus,

I think the installation instructions are incorrect - I had the same issue as you but it seems that leaving out this step:

  • set the alias (masterdb)

    'zend_db_adapter' => 'masterdb',

and instead leaving that line as:

  'zend_db_adapter' => 'Zend\Db\Adapter\Adapter',

does the trick.

Perhaps one of the devs might confirm if this is the correct way to proceed, as I'm actually experiencing other problems with ZfcUser refusing to authenticate I'll open a separate issue for that one though.

adamlundrigan pushed a commit to adamlundrigan/ZfcUser that referenced this issue May 15, 2012
…r class name should be used in the `zend_db_adapter` confguration key
@gurpreetbhatoa
Copy link

I was getting an exception in the DI layer for wrong parameter name

Uncaught exception 'Zend\Di\Exception\MissingPropertyException' with message 'Missing instance/object for parameter tableName for Zend\Db\TableGateway\TableGateway::__construct' in /mnt/git/ZendSkeletonApplication/vendor/ZendFramework/library/Zend/Di/Di.php:617

To fix this I corrected the parameter name in module.config.php for ZfcUser. Corrected from

'zfcuser_user_tg' => array(
'parameters' => array(
'table' => 'user',
'adapter' => 'zfcuser_zend_db_adapter',
),
),
'zfcuser_usermeta_tg' => array(
'parameters' => array(
'table' => 'user_meta',
'adapter' => 'zfcuser_zend_db_adapter',
),
),

to

'zfcuser_user_tg' => array(
'parameters' => array(
'tableName' => 'user',
'adapter' => 'zfcuser_zend_db_adapter',
),
),
'zfcuser_usermeta_tg' => array(
'parameters' => array(
'tableName' => 'user_meta',
'adapter' => 'zfcuser_zend_db_adapter',
),
),

table => corrected to tableName

@adamlundrigan
Copy link
Contributor

@gurpreetbhatoa you are encountering issue #51. This has been fixed in the latest ZendSkeletonApplication.

@EvanDotPro
Copy link
Member

I believe this is now resolved. Please re-open this issue if this is not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants