cakephp

CakePHP 3 is NOT able to connect to the database due to a missing PHP extension

妖精的绣舞 提交于 2020-08-22 11:41:48
问题 I am trying to install cakePHP 3.0.0 with WT-NMP, but i got this message: CakePHP is NOT able to connect to the database. Database driver Cake\Database\Driver\Mysql cannot be used due to a missing PHP extension or unmet dependency my php.ini has this: extension = php_bz2.dll extension = php_curl.dll extension = php_gd2.dll extension = php_imap.dll extension = php_mbstring.dll extension = php_exif.dll extension = php_mysql.dll extension = php_mysqli.dll extension = php_pdo_mysql.dll extension

CakePHP 4.1 User entity as authorization identity associated fields

假装没事ソ 提交于 2020-08-10 13:02:01
问题 I have just created a very minimal project in CakePHP 4.1, mostly mimicking the CMS tutorial, and want to implement a fairly straightforward piece of logic. Using the Authorization module I want to allow a user A to be able to view a user B if 1) they are actually the same user ( A = B ) OR 2) if A is an admin. There are two DB tables - users and user_types . users has a foreign key user_type_id to user_types . This relationship is reflected in code as: ##### in UsersTable.php ##### class

CakePHP 4.1 User entity as authorization identity associated fields

ぐ巨炮叔叔 提交于 2020-08-10 13:01:25
问题 I have just created a very minimal project in CakePHP 4.1, mostly mimicking the CMS tutorial, and want to implement a fairly straightforward piece of logic. Using the Authorization module I want to allow a user A to be able to view a user B if 1) they are actually the same user ( A = B ) OR 2) if A is an admin. There are two DB tables - users and user_types . users has a foreign key user_type_id to user_types . This relationship is reflected in code as: ##### in UsersTable.php ##### class

cant connect to database using cakephp and wampserver

梦想的初衷 提交于 2020-07-31 04:19:32
问题 I am using 64bit WampServer and cakephp 3.2 and win10. I have a new computer and need to transfer a cakephp project. There is a user Root with all privileges, with no password and database 'aptutori_apt4' n exists on phpmyadmin The project loads if it doesnt need the database but this is what I get error: sqlstate[hy000] [1049] unknown database 'aptutori_apt4' I cant connect the database! Is the host setting wrong ? 'Datasources' => [ 'default' => [ 'className' => 'Cake\Database\Connection',

cant connect to database using cakephp and wampserver

孤人 提交于 2020-07-31 04:17:40
问题 I am using 64bit WampServer and cakephp 3.2 and win10. I have a new computer and need to transfer a cakephp project. There is a user Root with all privileges, with no password and database 'aptutori_apt4' n exists on phpmyadmin The project loads if it doesnt need the database but this is what I get error: sqlstate[hy000] [1049] unknown database 'aptutori_apt4' I cant connect the database! Is the host setting wrong ? 'Datasources' => [ 'default' => [ 'className' => 'Cake\Database\Connection',

Cakedc.users => always redirect to homepage

混江龙づ霸主 提交于 2020-07-30 07:43:11
问题 I'm using the plugins "CakeDC/Users" on a brain new Cakephp installation. I've got two controllers : PagesController.php, CardsController.php. Pages has 1 action (Beta, it's the homepage), and Cards two actions (index, and single). Here is the setup in the bootstrap : Configure::write('Users.config', ['users']); Plugin::load('CakeDC/Users', ['routes' => true, 'bootstrap' => true]); And the configuration of the plugin in config/users.php : return [ 'Users' => [ 'Email' => [ 'validate' => false

Cake 3.x How to setup a queue technology for jobs and news feeds?

前提是你 提交于 2020-07-19 18:32:49
问题 I am using Cake 3.x I need to have the following things set up. A job queue to queue jobs that require long processing in the background A feed (like Facebook Feed) that informs various users of what's happening within the app This is what I have in terms of requirements: Job Queue This needs to be persistent and reliable. Meaning to say if the server suddenly rebooted, any jobs queued but not yet executed will still be there waiting to be processed upon reboot. News Feed / Activity Stream