# |
Apr 29th 2017, 14:58 |
flashios09 |
i’m using nginx + php + mariadb |
# |
Apr 29th 2017, 14:57 |
loginews |
@flashios09 I haven't used mariadb, but such difficulties are normal. You have to try to test the connection between php and mysql directly first. Then if it works, you have to check the configuration in cake's app.php found in the config folder. |
# |
Apr 29th 2017, 14:55 |
flashios09 |
i installed mysql(mariadb) |
# |
Apr 29th 2017, 14:55 |
flashios09 |
i didn’t test the connection to mysql before |
# |
Apr 29th 2017, 14:55 |
loginews |
@flashios09 and it connects to mysql ? |
# |
Apr 29th 2017, 14:54 |
flashios09 |
yes |
# |
Apr 29th 2017, 14:54 |
loginews |
@flashios09 can you run php scripts directly without using cake? |
# |
Apr 29th 2017, 14:54 |
loginews |
@flashios09 php needs some extensions loaded to use certain options |
# |
Apr 29th 2017, 14:52 |
rudy1976s |
i cannot figure out the error |
# |
Apr 29th 2017, 14:52 |
flashios09 |
i can connect to mysql via `mysql -u -p` |
# |
Apr 29th 2017, 14:51 |
flashios09 |
i have this error `Database driver Cake\Database\Driver\Mysql cannot be used due to a missing PHP extension or unmet dependency` |
# |
Apr 29th 2017, 14:51 |
flashios09 |
hi |
# |
Apr 29th 2017, 14:34 |
rudy1976s |
I am trying to setup an events to occur after adding a record to a table: i have the forllowing error only when adding, while the same event in edit fires without problems: Argument 1 passed to Cake\Event\EventManager::_callListener() must be callable, array given |
# |
Apr 29th 2017, 14:34 |
admad |
on that note, bye |
# |
Apr 29th 2017, 14:33 |
admad |
If users table has param_id it means Users belongs Param(s) and thus multiple users can use the same param record. Now you want to be able to edit ADDRESS1 field on user form, so basically allowing a user to modify a param that multiple users could be using theoretically. Allowing a users to make changes which can affect other users makes no sense to me. |
# |
Apr 29th 2017, 14:23 |
loginews |
@metoyoko I still can't make it work. Note that users.param_id =1 and param.id=1 therefore hasOne and belongsTo will both work. Also there are many records in users table and only one record in param table. I can give you access to the live site. Do you want to try to help me debug this ? |
# |
Apr 29th 2017, 14:13 |
joop |
how can i acces BeforeRender() variable in controller? |
# |
Apr 29th 2017, 13:44 |
loginews |
@metoyoko let me try. |
# |
Apr 29th 2017, 13:44 |
rudy1976s |
Can i bother someone regaring events in cake 3.x ? |
# |
Apr 29th 2017, 13:41 |
metoyoko |
you tried this? $this->belongsTo('Params' => ['foreignKey'=>'param_id']); only.. and your params model is class ParamsTable extends Table{ } and not paramsTable extends Table{ }? because I already solved my problem same as this. |
# |
Apr 29th 2017, 13:39 |
metoyoko |
you tried this? $this->belongsTo('param' => ['foreignKey'=>'param_id']); only.. and your params model is class ParamsTable extends Table{ } and not paramsTable extends Table{ }? because I already solved my problem same as this. |
# |
Apr 29th 2017, 13:21 |
loginews |
yes |
# |
Apr 29th 2017, 13:21 |
metoyoko |
hi @loginews is ADDRESS1 is your field name? and it is all caps? |
# |
Apr 29th 2017, 13:15 |
slackebot1 |
for table param. [cake bake all param] No effect. Same results. Now, since param_id and id follow CakePHP conventions, I tried this: $this->belongsTo('param'); ERROR: THE USER COULD NOT BE SAVED $this->belongsTo('Params'); ERROR: TABLE PARAMS DOES NOT EXIST $this-belongsTo('anythingelse'); DOES NOT SAVE param.ADDRESS1 |
# |
Apr 29th 2017, 13:15 |
loginews |
Regarding : https://gist.github.com/loginews/78dbc099fe1689332c299002d361f472> $this->belongsTo('param')->setForeignKey('id')->setProperty('param_id'); DOES NOT SAVE param.ADDRESS1 $this->belongsTo('anythingelse')->setForeignKey('id')->setProperty('param_id'); DOES NOT SAVE param.ADDRESS1 $this->belongsTo('Params')->setForeignKey('id')->setProperty('param_id'); DOES NOT SAVE param.ADDRESS1 I had not yet baked a crud for table param. So I |
# |
Apr 29th 2017, 12:42 |
bravo-kernel |
thanks for taking the time to reflect, this was driving me crazy |
# |
Apr 29th 2017, 12:42 |
bravo-kernel |
small things do matter ;) |
# |
Apr 29th 2017, 12:42 |
bravo-kernel |
I stand corrected sir, thank you for pointing that out :relaxed: |
# |
Apr 29th 2017, 12:41 |
dereuromark |
its actually char(36) - not that it matters :P |
# |
Apr 29th 2017, 12:41 |
bravo-kernel |
feels just right for this user-land customer :) |
# |
Apr 29th 2017, 12:41 |
dereuromark |
jep |
# |
Apr 29th 2017, 12:41 |
bravo-kernel |
will probably be aweful but at least that will be standard cake for now |
# |
Apr 29th 2017, 12:41 |
bravo-kernel |
5) use cake's varchar(36) uuid now, migrate to binary(16) when things grow beyond performance |
# |
Apr 29th 2017, 12:40 |
bravo-kernel |
@dereuromark thanks, I wish I had the time to do it but unfortunately. I just came up with option 5) |
# |
Apr 29th 2017, 12:39 |
dereuromark |
thats the quickest woraround for the time beeing - but actualy finishing up uuid16 should only be a few hours tops. might be worth going there |
# |
Apr 29th 2017, 12:39 |
bravo-kernel |
@dereuromark right, I forgot about reading that one as well |
# |
Apr 29th 2017, 12:39 |
dereuromark |
using ints internally (for joins), and using a separate uuid column "identifier" or sth for simple get() lookup etc. speed here does not matter |
# |
Apr 29th 2017, 12:38 |
bravo-kernel |
PR? haha |
# |
Apr 29th 2017, 12:38 |
metoyoko |
@loginews is param is your actual table name? |
# |
Apr 29th 2017, 12:38 |
dereuromark |
there is a 4) option. |
# |
Apr 29th 2017, 12:38 |
bravo-kernel |
correct? |