Quote:
Originally Posted by mffowler
OK, this problem was fixed by putting a bash script at server root (below public_html):
Create a file with the correct paths and call it html_catalog.sh
Code:
cd /home/your/path/to/admin
/usr/local/bin/php -q -f html_catalog.php
mv /home/user_account_here/public_html/*.html /home/user_account_here/public_html/dir_for_store/
Now you just need to create the cron job. In cPanel this is easy: Cron jobs/Advanced (UNIX Style)
Enter the time to run the job and the script: /bin/sh /home/user_account_here/html_catalog.sh
Now, html catalog is created automatically at whatever time you choose. The previous posts create the modification in the html_catalog.php and this just moves the files from root to the dir. of the store. If you want them in root, that's OK, just skip the bash script. - Mike
|
I need my index.html to stay put in my docroot so my initial splash page will come up. I tried the code mentioned above and the generation works great but I really need a way to drop this automatically into my store/catalog dir....
My html_catalog.php reads like this:
Code:
# require $xcart_dir."/include/security.php";
##########################
# CATALOG SCHEDULER CODE
##########################
if ($_SERVER[DOCUMENT_ROOT]) {
#
# Running from the web, make sure we authenticate the user
#
require $xcart_dir."/include/security.php";
} else {
#
# Running from command line
#
$command_line_mode = true;
ini_set('html_errors', '0');
$REQUEST_METHOD = 'POST';
$start_category = '';
$mode = 'catalog_gen';
$namestyle = 'hyphen_4';
$process_subcats = 'checked';
$pages_per_pass = 0;
$gen_action = 3;
$process_staticpages = 'checked';
$lngcat[US] = '/..';
}
$location[] = array(func_get_langvar_by_name("lbl_html_catalog"), "");
define ('DIR_CATALOG', '/catalog');
##########################