Hi,
I have an template that is executed once a day by Cron. This page is very simple but this is enough for the test:
The task is tag pages to load all pages one by one in the usual way.
Interestingly, all this works up to 30 pages.
The remaining pages (31 and over) are not being loaded. There seems to be a problem between Pages & Curl.
I know that if I do this in a browser, there will be no problem, but this is impossible because it is more complex queries that need to be done automatically by Cron Jobs.
My question is can we use the Pages with Pagination feature run by the server not in browser?
I did a lot of tests without success, I do not know if this can help, but I noticed that if I load the page in a browser (which is incorrect given the PHP code is still there) an error message is displayed:
Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given in /home/evropest/domains/evropest/panel/includes/mysql2i/mysql2i.class.php on line 139
Thanks
I have an template that is executed once a day by Cron. This page is very simple but this is enough for the test:
- Code: Select all
<?php require_once('panel/cms.php'); ?>
<cms:template hidden='1' />
<cms:pages masterpage='marketing_prices_products.php' limit='1' paginate='1' order='desc' >
<cms:log "Product №: <cms:show k_current_record />, ID <cms:show k_page_id />, <cms:show k_page_title />" file='test.log' />
<cms:if k_paginate_link_next >
<cms:show k_paginate_link_next/>
<cms:php>
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "<cms:show k_paginate_link_next />" );
curl_setopt($ch, CURLOPT_USERAGENT, 'CouchCMS <cms:show k_cms_version />');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
curl_close($ch);
echo $output;
</cms:php>
</cms:if>
</cms:pages>
<?php COUCH::invoke(); ?>
The task is tag pages to load all pages one by one in the usual way.
Interestingly, all this works up to 30 pages.
The remaining pages (31 and over) are not being loaded. There seems to be a problem between Pages & Curl.
I know that if I do this in a browser, there will be no problem, but this is impossible because it is more complex queries that need to be done automatically by Cron Jobs.
My question is can we use the Pages with Pagination feature run by the server not in browser?
I did a lot of tests without success, I do not know if this can help, but I noticed that if I load the page in a browser (which is incorrect given the PHP code is still there) an error message is displayed:
Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given in /home/evropest/domains/evropest/panel/includes/mysql2i/mysql2i.class.php on line 139
Thanks