# |
Mar 18th 2019, 10:45 |
kkitchen |
k. Well, I'm just being a rubber ducky at this point, because I've not done specifically what you're doing. :slightly_smiling_face: I will say, though, it reminds me of how WordPress handles multisite subdirectory installations... maybe something on their .htaccess page could be helpful: https://codex.wordpress.org/htaccess |
# |
Mar 18th 2019, 10:43 |
patox44 |
yeah. I have 3 folders in project and I join by alias admin and cakephp, but I can't join cake |
# |
Mar 18th 2019, 10:41 |
kkitchen |
Gotcha. Is "public" and "admin" also CakePHP? |
# |
Mar 18th 2019, 10:40 |
patox44 |
after it I got "The requested URL /var/www/project/rest/webroot/ was not found on this server." |
# |
Mar 18th 2019, 10:38 |
patox44 |
It's one domain. Main is on {url}/, admin is on {url}/admin, rest is on {url}/rest |
# |
Mar 18th 2019, 10:36 |
kkitchen |
Also, @patox44, are you using different subdomains for each of these sites or is one domain trying to serve them all? |
# |
Mar 18th 2019, 10:33 |
kkitchen |
@patox44 What happens if you run just the basic comes-with .htaccess? |
# |
Mar 18th 2019, 10:24 |
patox44 |
@kkitchen yes. Here is configuration. front and admin works fine. When I try join rest I can run only homepage. Routing not works |
# |
Mar 18th 2019, 10:20 |
kkitchen |
@patox44 Are you using an Apache virtual host for this site? |
# |
Mar 18th 2019, 10:12 |
patox44 |
it's my htaccess in webroot folder |
# |
Mar 18th 2019, 09:49 |
patox44 |
P.S. I can see only homepage |
# |
Mar 18th 2019, 09:43 |
patox44 |
hello. How can I install cakePHP in subdirectory? When I try do it I got error `The requested URL /var/www/project/rest/webroot/index.php was not found on this server.` |
# |
Mar 18th 2019, 09:05 |
steinkel |
@ssalvatori if you need to override plugin configuration, add your custom configuration and load it in Application::pluginBootstrap method, after bootstrapping the plugin. Keep in mind the plugin configuration is NOT loaded when you call addPlugin, but later |
# |
Mar 17th 2019, 21:34 |
qxd |
sorry noob |
# |
Mar 17th 2019, 21:33 |
qxd |
msg NickServ identify passworda |
# |
Mar 17th 2019, 21:33 |
qxd |
msg NickServ identify password |
# |
Mar 17th 2019, 11:48 |
birdy247 |
so its not a huge overhead |
# |
Mar 17th 2019, 11:48 |
birdy247 |
typically there will only be upto 5 other records |
# |
Mar 17th 2019, 11:46 |
edgaras.jan |
yes, but it retrieves all records, but uses only the last one |
# |
Mar 17th 2019, 11:44 |
birdy247 |
all tests are passing with that |
# |
Mar 17th 2019, 11:44 |
birdy247 |
my original aproach works |
# |
Mar 17th 2019, 11:44 |
birdy247 |
@edgaras.jan to be honest |
# |
Mar 17th 2019, 11:18 |
birdy247 |
no luck :( |
# |
Mar 17th 2019, 11:16 |
edgaras.jan |
comment out for now |
# |
Mar 17th 2019, 11:16 |
edgaras.jan |
yes |
# |
Mar 17th 2019, 11:15 |
birdy247 |
so get rid of the order? |
# |
Mar 17th 2019, 11:15 |
edgaras.jan |
`having(['MAX(CurrentPrices.effective_from) = CurrentPrices.effective_from'])` |
# |
Mar 17th 2019, 11:14 |
birdy247 |
presumably I need to select the having field |
# |
Mar 17th 2019, 11:14 |
birdy247 |
https://book.cakephp.org/3.0/en/orm/query-builder.html#aggregates-group-and-having |
# |
Mar 17th 2019, 11:14 |
birdy247 |
->group('published_date') ->having(['count >' => 3]); |
# |
Mar 17th 2019, 11:13 |
birdy247 |
how can I write that with the query builder |
# |
Mar 17th 2019, 11:12 |
birdy247 |
@edgaras.jan ok, will give it a go |
# |
Mar 17th 2019, 11:06 |
edgaras.jan |
group+order doesn't work on mysql, you need group+having max |
# |
Mar 17th 2019, 11:05 |
edgaras.jan |
try this sql `GROUP by CurrentPrices.id HAVING MAX(effective_from)=effective_from` |
# |
Mar 17th 2019, 10:57 |
edgaras.jan |
check what queries are generated, with DebugKit or query logging |
# |
Mar 17th 2019, 10:54 |
birdy247 |
but... I am then not sure what hapens if I find an entity and contain many entities, each with a current_proce |
# |
Mar 17th 2019, 10:54 |
birdy247 |
if I am a limit(1) it works |
# |
Mar 17th 2019, 10:54 |
birdy247 |
this is the select startegy |
# |
Mar 17th 2019, 10:52 |
birdy247 |
Its taking the last on the list |
# |
Mar 17th 2019, 10:52 |
birdy247 |
My test fails |
# |
Mar 17th 2019, 10:52 |
edgaras.jan |
ok |