Logs for #cakephp

Page 4 of 36,290, showing 100 records out of 3,628,966 total, starting on record 301, ending on 400

# At Username Text
# Sep 13th, 16:52 alexis752 the problem is the render of custom error
# Sep 13th, 16:52 alexis752 Yes, but my problem isn't about the error itself
# Sep 13th, 16:49 challgren `Error: [MongoDB\Driver\Exception\BulkWriteException] Can't extract geo keys: { _id: ObjectId('5cc8937534908a4b46542773'), id: "12632774", title: "ESTACION LOS ANDES", address: "CR 2 38 55", phone: "", location: { coordinates: [ -75881.5637, 876.26365 ], type: "Point" }, createdAt: 1568392500, updatedAt: 1568392500, countryId: 5, status: 1, publish: false, cityId: 4699, products: [ 136, 137 ], club: false, merchantType: { id: 151, name:
# Sep 13th, 16:49 slackebot "Todo para tu vehículo", icon: "ion-android-pin" }, highlight: false, gridLocation: { x: -2054770, y: 29431 } } lo`
# Sep 13th, 16:48 challgren Looks like your issue is related to geo keys
# Sep 13th, 16:41 alexis752 i edited the hostname
# Sep 13th, 16:40 alexis752 https://gist.github.com/ruano84/01adc53e5447a86dce7dac38d6859d3e
# Sep 13th, 16:36 louis Yeap
# Sep 13th, 16:35 alexis752 the cake logs?
# Sep 13th, 16:35 louis could you paste it in a gists ?
# Sep 13th, 16:34 alexis752 the error associated, but nothing related to the custom errors
# Sep 13th, 16:34 alexis752 In fact the cakephp's `logs/error.log` shows the error
# Sep 13th, 16:34 louis And in CakePHP logs ?
# Sep 13th, 16:33 slackebot <alexis752>
# Sep 13th, 16:33 alexis752 even for the json views
# Sep 13th, 16:33 alexis752 I have nothing in the apahce logs
# Sep 13th, 16:31 louis Yeap, especially that i’m using DomPDF (that’s an old projet) and this engine is a bit slow and heavy for the server ^^
# Sep 13th, 16:30 admad Check the webserver aka Apache logs
# Sep 13th, 16:30 alexis752 i'm using apache 2.4 + php-fpm 7
# Sep 13th, 16:30 slackebot <alexis752>
# Sep 13th, 16:30 alexis752 I'm having a bit of trouble with the apache config, the custom errors of Cakephp doesn't work for me
# Sep 13th, 16:29 alexis752 Hi guys
# Sep 13th, 16:26 challgren And your not depending on the request to generate everything and deal with potential timeouts
# Sep 13th, 16:25 challgren That way theres a bit of parallel processing going on
# Sep 13th, 16:25 challgren I use it to generate my pdfs/zips
# Sep 13th, 16:25 louis Wow that’s perfect
# Sep 13th, 16:24 challgren https://sandbox.dereuromark.de/sandbox/queue-examples/scheduling
# Sep 13th, 16:24 challgren Plus you can see whats been cleaned and what failed cleanup
# Sep 13th, 16:23 louis I’m going to try this way ! I agree, never thought about it :expressionless: Thank you @challgren
# Sep 13th, 16:22 challgren A little bit cleaner IMHO
# Sep 13th, 16:22 challgren Yeah same idea except the queue handles it
# Sep 13th, 16:21 louis Okay, in previous projects I was writing CakePHP shell planned with a cron task. this is why I’m looking for better solution :slightly_smiling_face:
# Sep 13th, 16:20 challgren That way if the user wants to redownload it again, Im not hammering the server with another pdf creation/zip process and can quickly serve them the “cached” package
# Sep 13th, 16:19 challgren Using https://github.com/dereuromark/cakephp-queue
# Sep 13th, 16:19 challgren But what I do is create my pdfs/zips and then create a queue task to clean it up in an hour
# Sep 13th, 16:18 challgren Nah Im just waking up so the mt dew hasnt kicked in yet
# Sep 13th, 16:18 louis Should I explain in another way ?
# Sep 13th, 16:18 challgren Oh probably do a queue task
# Sep 13th, 16:18 louis @challgren Yeap I’m using it ;) . Sorry if my question is not well formulated
# Sep 13th, 16:17 challgren @louis https://github.com/FriendsOfCake/CakePdf is awesome!
# Sep 13th, 16:16 louis Hello everyone, I’m looking for advices for PDF generation. At the moment i’ve a method that saving multiple Pdf files into TMP directory (named with a uuid) adnd then I create an archive of theses Pdf. The problem is what is a good way to remove this directory after serving file to user using `response->withFile()`
# Sep 13th, 16:15 ruano84 Hi guys
# Sep 13th, 14:35 admad welcome
# Sep 13th, 14:33 felipe.marinho Nice, thank you :pray:
# Sep 13th, 14:29 admad https://dev.mysql.com/doc/refman/8.0/en/memory-storage-engine.html
# Sep 13th, 14:29 admad *storage engine
# Sep 13th, 14:28 admad also if possible use 'MEMORY' engine for the temp table
# Sep 13th, 14:27 felipe.marinho Awesome... a temp table and an action to match those 2 tables... I'll try this too... Thank you @admad
# Sep 13th, 14:26 admad *if your
# Sep 13th, 14:26 admad then do whatever processing you need
# Sep 13th, 14:25 admad if you table columns don't directly match csv columns then first dump the csv in a temp table with matching columns
# Sep 13th, 14:24 felipe.marinho the problem is to match the fields from the CSV and the table columns...
# Sep 13th, 14:23 admad you should just upload file and use a shell / command to do the importing in background
# Sep 13th, 14:23 admad ideally importing 500,000 lines of csv should be even done in a web request.
# Sep 13th, 14:22 felipe.marinho Yes, his approach was to use the input type="hidden"... I'll try to upload the CSV, match the fields, and after use the uploaded CSV.
# Sep 13th, 14:22 admad sorry but i am not going to bother reading that :slightly_smiling_face:
# Sep 13th, 14:21 felipe.marinho I adapted this tutorial: https://quickadminpanel.com/blog/how-to-import-csv-in-laravel-and-choose-matching-fields/
# Sep 13th, 14:20 admad if not possible then query builder to do multi insert
# Sep 13th, 14:20 admad next don't use ORM methods to insert. if server allows Best would be to `LOAD DATA INFILE` syntax to directly make mysql use the csv file to insert rows
# Sep 13th, 14:18 admad also make sure post_max_size and max_file_size are set to large enough values in php.ini to allow large file uploads
# Sep 13th, 14:18 admad using hidden input to pass csv data sounds like a very brittle approach. use a file input to upload
# Sep 13th, 14:17 ckjksl Locally will be faster, but are you trying to save 500,000 entities all at once?
# Sep 13th, 14:15 felipe.marinho I'm using MYSQL 5.5, I read about update the mysql version, I'll try to install the MariaDB updated and test it... and maybe latter try to create all this entities using an uploaded csv... I tried to use the file inside the TMP folder, but after it uploads and use it inside the action the server delete the file... I saved the tmp file path in the input type="hidden" i created first, but the file was deleted :( I think the upload
# Sep 13th, 14:15 slackebot approach is the best option for now... locally it will be faster.
# Sep 13th, 14:11 ckjksl Maybe instead of trying to create them all at once, you can stagger it so it saves 100 (or whatever number you want) at a time? 1000 seconds isn't very long
# Sep 13th, 14:07 felipe.marinho @ckjksl The PHP Timeout in the php.ini is max_execution_time=1000, and it crashes instantaneously, not even a single second lol... Yes, I'm using saveMany to save all those data...
# Sep 13th, 14:02 sdevore I realize I asked this yesterday afternoon but any thoughts on how to find where xdebug is crashing in __debugInfo() after updating from 3.6 to 3.7, I updated chronos to 1.2.8 since that seemed to mention some issues with __debugInfo() the line in my code that seems to trigger it is $enrolled_course->set(‘course’, $overlap); and stepping though it is almost seems that something in DateFormat::__debugInfo(); ``` return [ 'ti
# Sep 13th, 14:02 slackebot => $this->toIso8601String(), 'timezone' => $this->getTimezone()->getName(), 'fixedNowTime' => static::hasTestNow() ? static::getTestNow()->toIso8601String() : false ]; ``` seems to trigger it.
# Sep 13th, 14:02 ckjksl Is it because of PHP timeout?
# Sep 13th, 14:00 felipe.marinho Locally, using the WAMP the page loads for 2 minutes, but create the 500.000 entities.... but in the production the page crash (ERR_CONNECTION_RESET on chrome) when I start the processing...
# Sep 13th, 13:56 ckjksl Would it be easier to save the file and read the lines you need rather than passing it through `type="hidden"`?
# Sep 13th, 13:55 ckjksl @felipe.marinho Are you sure the 500,000 line CSV uploaded successfully?
# Sep 13th, 13:27 info315 I will track it, looks like this is the best practice
# Sep 13th, 13:15 dereuromark if you dont leverage it, you can also exclude for now :slightly_smiling_face:
# Sep 13th, 13:11 info315 Ok
# Sep 13th, 13:08 dereuromark usually people track it for project level.
# Sep 13th, 13:00 info315 Should the file `Migrations/schema-dump-default.lock` be excluded from git or better get tracked?
# Sep 13th, 12:59 felipe.marinho hey guys... I created an CSV uploader action, but I'm passing the CSV data to from 1 page to another using an input type="hidden". I tested with 30 lines, 100 lines, and it was OK BUT now the client is testing with a 500.000 lines CSV, and it's not working. What is another approach to pass this content and not screw up with the user's browser?
# Sep 13th, 11:12 spriz Ah wait, it actually does in `PhpConfig`
# Sep 13th, 11:11 spriz I guess the Configure::load does not fail even though there is no file? Or no?
# Sep 13th, 10:57 lilhermit Thanks anyway guys
# Sep 13th, 10:57 lilhermit maybe, I just like to keep my build/deployment as simple as possible
# Sep 13th, 10:56 dereuromark Maybe. Writing out an empty file on deploy was always easier ^^
# Sep 13th, 10:51 lilhermit @dereuromark might be worth adding the loading of `app_local.php` in a file_exists on your blog?
# Sep 13th, 10:50 lilhermit I thought I must have been missing something
# Sep 13th, 10:50 spriz :tada:
# Sep 13th, 10:50 lilhermit Yes just tested it and your correct ;)
# Sep 13th, 10:49 lilhermit perfect then ignore everything I've said it won't break on deployment ;)
# Sep 13th, 10:49 spriz unless you removed it, I guess it is :ok_hand:
# Sep 13th, 10:49 spriz https://github.com/cakephp/app/blob/master/src/Console/Installer.php#L59 @lilhermit
# Sep 13th, 10:49 lilhermit I did not know the `cp` is one on `composer install` ?
# Sep 13th, 10:47 spriz actually when you do `composer install`, exactly that is done by default :slightly_smiling_face:
# Sep 13th, 10:46 spriz Put all the sensitive stuff in env vars and move on :ok_hand:
# Sep 13th, 10:46 spriz or just add `cp config/app.default.php config/app.php` to your deploy script :slightly_smiling_face:
# Sep 13th, 10:42 dereuromark Easy enough to solve on project level though :)
# Sep 13th, 10:41 dereuromark Bottom line: current approach with one big file is bad
# Sep 13th, 10:41 dereuromark Fair enough
# Sep 13th, 10:41 lilhermit Maybe I will do a PR
# Sep 13th, 10:41 lilhermit @dereuromark The only problem I have with your blog post is add `Configure::load('app_local');` should be wrapped in a `file_exists` Personally I think `Configure::load` should support the second param being a config array so you could add a `only_if_exists` flag and then pass the merge and config key into the config array
# Sep 13th, 10:34 dereuromark Someone could PR a more logical approach as I outlined. It also helps with core vs custom vs private data.