View Single Post
  #7  
Old 06-24-2004, 08:48 AM
 
NuAlpha NuAlpha is offline
 

X-Adept
  
Join Date: Aug 2003
Location: US
Posts: 598
 

Default

Tried using 27stars post but I soon discovered it wasn't actually creating the catalog, but merely loading the page. Learned this from trying to run the HTML catalog script from the commandline...all that happened was that the html code for that page loaded. So I adapted the code a little and here is what we are using.

Replaced:
Code:
require $xcart_dir."/include/security.php";

With:
Code:
if ($_SERVER['argv'][1] != 'CatalogCron') require $xcart_dir."/include/security.php"; else { $REQUEST_METHOD = 'POST'; $mode = 'catalog_gen'; $namestyle = 'hyphen'; $process_subcats = 'checked'; $pages_per_pass = 0; $gen_action = 3; }

Use the cron (or something similar):
Code:
05 02 * * * cd /home/path_to_your_account/x-cart/admin; /usr/local/bin/php -q -f html_catalog.php CatalogCron

Please note that your PHP setup must have argv registered. If it doesn't, you can add php_value register_argc_argv 1 to your .htaccess file to enable it.
__________________
X-Cart Pro 4.5.5 Platinum
X-Payments 1.0.6
PHP 5.3.14
MySQL 5.1.68
Apache 2.2.23
Reply With Quote