# |
Apr 21st 2021, 09:13 |
erwane |
file_get_content and check if it contains desired part of string ? |
# |
Apr 21st 2021, 08:25 |
kevin.pfeifer |
or just the index.php |
# |
Apr 21st 2021, 08:25 |
kevin.pfeifer |
do you have a index.html in that folder |
# |
Apr 21st 2021, 08:20 |
nayakvradhit |
Even though I set doc root to /var/www/html/appname/app/webroot |
# |
Apr 21st 2021, 08:20 |
neon1024 |
Anyone have any tips for asserting in tests, the content of a downloaded csv file? |
# |
Apr 21st 2021, 08:19 |
nayakvradhit |
Problem is when I hit ipaddress/ I am redirecting to apache home page |
# |
Apr 21st 2021, 07:24 |
kevin.pfeifer |
whats your problem now exactly? |
# |
Apr 21st 2021, 07:24 |
kevin.pfeifer |
well if you got your phpinfo working i would say its nothing cent os 7 specific |
# |
Apr 21st 2021, 07:20 |
nayakvradhit |
Can anyone please help me who worked in cent os 7 apache cakephp 2 |
# |
Apr 21st 2021, 07:19 |
nayakvradhit |
Ok thanks |
# |
Apr 21st 2021, 07:05 |
kevin.pfeifer |
so your other src files, vendor etc. cant be accessed via a URL |
# |
Apr 21st 2021, 07:04 |
kevin.pfeifer |
it should be webroot yes |
# |
Apr 21st 2021, 07:03 |
nayakvradhit |
But in cakephp doc for prod set up we need to set the doc root to webroot right? |
# |
Apr 21st 2021, 07:03 |
nayakvradhit |
Yeah also I am able to access ipaddress/appname I am seeing the application |
# |
Apr 21st 2021, 07:02 |
kevin.pfeifer |
that means your webserver is configured correctly |
# |
Apr 21st 2021, 07:02 |
kevin.pfeifer |
but if you get your phpinfo page |
# |
Apr 21st 2021, 07:02 |
kevin.pfeifer |
oh ok i am not experienced in cent os ,:) |
# |
Apr 21st 2021, 07:02 |
nayakvradhit |
In cent os 7? |
# |
Apr 21st 2021, 07:01 |
kevin.pfeifer |
ok good |
# |
Apr 21st 2021, 07:01 |
nayakvradhit |
Page |
# |
Apr 21st 2021, 07:01 |
nayakvradhit |
Yeah I am getting php information pave |
# |
Apr 21st 2021, 07:01 |
kevin.pfeifer |
so you edit your `/etc/apache/sites-available/default` file right? |
# |
Apr 21st 2021, 07:01 |
nayakvradhit |
Ok i will run ipaddress/info.php |
# |
Apr 21st 2021, 07:00 |
nayakvradhit |
Means ipaddress/test.php right? |
# |
Apr 21st 2021, 06:40 |
kevin.pfeifer |
try making a info.php with ```<?php phpinfo();``` and try to call that If that doesn’t work somethings wrong with your apache config and/or .htaccess |
# |
Apr 21st 2021, 06:22 |
nayakvradhit |
Also made AllowOverride All |
# |
Apr 21st 2021, 06:21 |
nayakvradhit |
Can anyone please help me when I set the doc root /opt/rh/httpd24/root/var/www/html/appname/app/webroot , it redirects me to apache home page and also j set the. Same path under directory folder in conf file |
# |
Apr 20th 2021, 20:12 |
joacir.santos |
ok understood! |
# |
Apr 20th 2021, 20:10 |
kevin.pfeifer |
my example from above just continues with the following ``` $categories = $this->paginate( $query, [ 'sortableFields' => array( 'count', 'name' ) ] ); $this->set( compact( 'categories' ) );``` |
# |
Apr 20th 2021, 20:05 |
ndm |
You don't need to put anything in the pagination config, simply pass the query object to the `paginate()` call. https://book.cakephp.org/4/en/controllers/components/pagination.html#basic-usage |
# |
Apr 20th 2021, 19:58 |
joacir.santos |
I understand your example, thank you! However I don know how to use in paginate parameters. I figure out a way to do it using Cake\Database\Connection::newQuery() But i guess Query class probably have a easy way to do it. |
# |
Apr 20th 2021, 19:42 |
slackebot |
->group( 'domain_categories.category_id' );``` |
# |
Apr 20th 2021, 19:42 |
kevin.pfeifer |
depends on the connection i would but here you have an example where domains has and belongs to many categories ``` $query = $this->Categories->find() ->leftJoin( 'domain_categories', 'domain_categories.category_id = Categories.id' ); $query->select( [ 'id', 'name', 'count' => $query->func() ->count( 'domain_categories.ftp_domain_id' ), 'created', 'modified' ] ) |
# |
Apr 20th 2021, 19:21 |
joacir.santos |
Greetings! I think I´m in trouble with "subquerys" using cake4. I read all documentation ORM sections, but I not found it. How can I get a count field from a association table in paginate? In tried, but dont work: ```$views = $this->Pages->getAssociation('Views')->find(); $this->paginate['fields']['views_count'] = $views ->select('Views.id') ->count(); $records = $this->paginate();``` |
# |
Apr 20th 2021, 15:40 |
steinkel |
yeah people is getting tired of frontend frameworks I guess... back to the monolith! |
# |
Apr 20th 2021, 15:36 |
jh |
@steinkel also take not of websockets and ssr aka phoenix live view |
# |
Apr 20th 2021, 15:30 |
steinkel |
@jh I've been following this trend (swoole/fibers) and I'm very interested too. Some time ago I played a bit with reactphp+cakephp and it produced very interesting results |
# |
Apr 20th 2021, 15:20 |
jujni |
hello |
# |
Apr 20th 2021, 14:37 |
slackebot |
like Laravel and Symfony? |
# |
Apr 20th 2021, 14:37 |
jh |
> Meanwhile, there's also Swoole — a PHP extension that actually modifies several core functions to be non-blocking. Swoole itself is a Chinese project and often not very well documented when it comes to English, but recently Laravel announced first party-integration with it. Maybe this is the better strategy when it comes to moving PHP towards a more async model: optionally integrate Swoole or other extensions with frameworks |
# |
Apr 20th 2021, 13:35 |
kevin.pfeifer |
you need to url encode the search parameter |