[TYPO3-english] Scheduler: uptime instead of cron job?
    Dennis Hoffland 
    d.o.hoffland at tele2.nl
       
    Wed Jan 11 20:59:29 CET 2012
    
    
  
Hi Xavier,
 
I did some further digging, taking a closer view of cli_dispatch.phpsh.
 
If I use /var/www/g12345/mydomain.com/HTML/typo3/cli_dispatch.phpsh as my
path for passthru () (= option 1 in my previous mail, which I believe to be
the correct path) I get the following error: The first argument must be a
valid key. (See line 107 of cli_dispatch.phpsh).
 
To see what is actually happening I made a copy of cli_dispatch.phpsh,
renamed it to test_args.php, put it in typo3/.  
 
Everything after line 105 I have replaced by:
 
                // Define absolute path to this script
define('PATH_thisScript',$temp_PATH_thisScript);
 
echo 'PATH_thisScript: ' . PATH_thisScript . "\n";
 
                // First argument is a key that points to the script
configuration
define('TYPO3_cliKey', $_SERVER['argv'][1]);
 
echo 'TYPO3_cliKey: ' . TYPO3_cliKey . "\n";
 
echo 'init.php path: ' . dirname(PATH_thisScript).'/init.php' . "\n";
 
echo "Test Arguments:\n";
echo 'argc:'. $_SERVER["argc"]."\n";
echo 'argv 0: '. $_SERVER["argv"][0] . "\n";
echo 'argv 1: '. $_SERVER["argv"][1] . "\n";
?>
 
As output I get:
 
PATH_thisScript: /var/www/g12345/mydomain.com/HTML/typo3/testargs.php
 
TYPO3_cliKey: 
init.php path: /var/www/g12345/mydomain.com/HTML/typo3/init.php
Test Arguments:
argc:1
argv 0: /var/www/g12345/mydomain.com/HTML/typo3/hbs_testargs.php
argv 1:
 
It clearly demonstrates that $_SERVER["argv"][1] is empty (which would
indeed trigger the error at line 107) and also leaves TYPO3_cliKey
undefined.
 
Everything else looks normal to me.
 
Your thoughts on this?
 
Kind regards,
 
Dennis
 
 
    
    
More information about the TYPO3-english
mailing list