# |
Jun 13th 2019, 09:53 |
conehead |
Short version: Through data is trying to create duplicate unique keys and I do not know why |
# |
Jun 13th 2019, 09:48 |
conehead |
Hm mark maybe you have a minute to have a look at this. Somehow I cannot get this working with my through association. I created an issue (but just noticed it is working with your tag plugin and closed it again) https://github.com/cakephp/cakephp/issues/13344 |
# |
Jun 13th 2019, 09:46 |
dereuromark |
See queue plugin how it does it |
# |
Jun 13th 2019, 09:39 |
yamcomnet |
maybe just use Symphonys one? https://symfony.com/doc/current/components/process.html |
# |
Jun 13th 2019, 09:25 |
yamcomnet |
is it just exec() inside console command? |
# |
Jun 13th 2019, 09:25 |
yamcomnet |
still not sure howto run system commands from cake? |
# |
Jun 13th 2019, 09:03 |
conehead |
https://book.cakephp.org/2.0/en/development/configuration.html |
# |
Jun 13th 2019, 09:02 |
conehead |
probably `database.php` |
# |
Jun 13th 2019, 09:02 |
office |
by config files you mean paths.php? |
# |
Jun 13th 2019, 09:00 |
conehead |
Probably you can just copy over the folder from your server to your local xampp folder and adjust the config file(s) |
# |
Jun 13th 2019, 08:53 |
office |
@noel @conehead Thank you. I use XAMPP and ihave the DB exported with Heidi SQL, but i really tought i am closer to fixing that. |
# |
Jun 13th 2019, 08:45 |
dereuromark |
sure |
# |
Jun 13th 2019, 08:44 |
yamcomnet |
is this somehow right way to do it? |
# |
Jun 13th 2019, 08:44 |
yamcomnet |
https://book.cakephp.org/3.0/en/console-and-shells/commands.html#creating-a-command |
# |
Jun 13th 2019, 08:44 |
yamcomnet |
need to execute binary application exec() |
# |
Jun 13th 2019, 08:41 |
noel |
@office you need a local stack on your computer that matches the server stack. You can probably use MAMP PRO for example. Then you need to export and clone the database using either mysql cli or workstation. Then you probably want to zip the code up and copy it to your local machine. Then there will be some config, e.g. database settings. Sounds like you're really jumping into the deep end though... I'd be wanting to start in the shallows. |
# |
Jun 13th 2019, 08:34 |
office |
Anywhere to look for instructions? |
# |
Jun 13th 2019, 08:33 |
office |
Well that is too advanced for me. I have no idea how to do it. |
# |
Jun 13th 2019, 08:31 |
conehead |
Yes but I guess you should not update it on a live server. Don't you have a local copy where you can test? Randomly updating packages without testing them might screw stuff up |
# |
Jun 13th 2019, 08:29 |
office |
Well that API worked a year ago. And now i come back to see that. IS it possible that it worked with composer installed? |
# |
Jun 13th 2019, 08:28 |
conehead |
Maybe composer is not installed at all? |
# |
Jun 13th 2019, 08:27 |
office |
@conehead composer update bash: composer: command not found php composer.phar update Could not open input file: composer.phar |
# |
Jun 13th 2019, 08:25 |
neon1024 |
Morning all :wave: |
# |
Jun 13th 2019, 08:22 |
conehead |
Then run `composer update` (or `php composer.phar update` respectively). But to be honest I do not think that just updating this library will work |
# |
Jun 13th 2019, 08:22 |
conehead |
You could update this. |
# |
Jun 13th 2019, 08:21 |
conehead |
`"friendsofcake/crud":"~4.0"`` |
# |
Jun 13th 2019, 08:21 |
conehead |
Well there you go |
# |
Jun 13th 2019, 08:21 |
office |
And although i am on php 7.2 i do not need to touch composer.json which looks "require": { `"php": ">=5.5.9", "cakephp/cakephp": "~3.2", "mobiledetect/mobiledetectlib": "2.", "cakephp/migrations": "~1.0", "cakephp/plugin-installer": "", "friendsofcake/crud":"~4.0"` |
# |
Jun 13th 2019, 08:20 |
conehead |
But you can just run it to see what happens |
# |
Jun 13th 2019, 08:19 |
conehead |
It depends on the setup. `php composer.phar` might be the same as `composer` |
# |
Jun 13th 2019, 08:19 |
office |
@conehead I use Cake PHP is 2.10.16. So i acess via SSH and run `php composer.phar`? |
# |
Jun 13th 2019, 08:15 |
conehead |
and `composer update` should only be run in your root folder as well |
# |
Jun 13th 2019, 08:15 |
conehead |
Would be nice to know which cake version you are currently using |
# |
Jun 13th 2019, 08:14 |
conehead |
Only update the composer.json in your root folder (or in your own plugins if applicable) |
# |
Jun 13th 2019, 08:13 |
conehead |
But you should not update composer.json in the vendor folder |
# |
Jun 13th 2019, 08:13 |
conehead |
@office try `php composer.phar` instead of `composer` |
# |
Jun 13th 2019, 08:11 |
noel |
oh cool. Good to know. |
# |
Jun 13th 2019, 08:10 |
conehead |
@noel Guess that is not 100% correct. You actually can specify a given commit. I have done it with a package that it not maintained anymore, but someone still created a PR. `"jpgraph/jpgraph": "4.x-dev#934753128231805c1feacddd131f37fa92be3430",` GitHub :`https://github.com/ztec/JpGraph/pull/20/commits/934753128231805c1feacddd131f37fa92be3430` |
# |
Jun 13th 2019, 08:05 |
noel |
Or you might be able to use composer: https://stackoverflow.com/questions/12954051/use-php-composer-to-clone-git-repo |
# |
Jun 13th 2019, 08:03 |
noel |
@office you can't update to a PR (pull request) on github using composer. Composer links to packagist.org, so you can only update to new releases on that site. If you want bleeding edge then you have to manually update the vendor files. |
# |
Jun 13th 2019, 07:57 |
slackebot1 |
and here is the response ```bash: composer: command not found``` |