[Typo3] TYPO3_cliMode initializing typo3 in a php shell errors

"Christoph Köpernick @ atkon" c.koepernick at atkon.de
Fri May 6 14:45:16 CEST 2005


dear list,

i´m trying to initialize the typo3 backend in an php shell script. I 
followed the guidelines described in "inside typo3", but some problems 
occur:

1. $HTTP_ENV_VARS["_"]

it seems impossible for me to get the script path by this statement. I 
tested this on debian and red hat systems. First of all i can´t call the 
element by it´s name ("_"), but by it´s number. And the value is: 
/usr/bin/php so that doesn´t help me. So i set the path manually, that 
works. Do you know if this problem depends on the OS or my 
configuration? But now i can use the conf.php file ;)

2. init.php

i call init.php by require('/home/www/htdocs/typo3/typo3/init.php'); 
because also the relative $BACK_PATH = '../../../../typo3/'; doesn´t 
work. But now i get the following message:

Error in init.php: Path to TYPO3 main dir could not be resolved 
correctly. <br /><br />
                This happens if the last 6 characters of this path, 
/home/www/htdocs/typo3/typo3conf/ext/atkon_searchagent/, (\$temp_path) 
is NOT "typo3/" for some reason. <br />
                You may have a strange server configuration.
                Or maybe you didn't set constant TYPO3_MOD_PATH in your 
module?<br /><strong>If you expect any help from anybody on this issue, 
you should save this page as an html document and send it along with 
your request for help!</strong><HR><pre>Array
(
    [TYPO3_OS] =>
    [PATH_thisScript] => 
/home/www/htdocs/typo3/typo3conf/ext/atkon_searchagent/cronmod
    [php_sapi_name()] => cli
    [TYPO3_MOD_PATH] => ../typo3conf/ext/atkon_searchagent/cronmod/
    [PATH_TRANSLATED] => 
/home/www/htdocs/typo3/typo3conf/ext/atkon_searchagent/cronmod/index.phpsh
    [SCRIPT_FILENAME] => 
/home/www/htdocs/typo3/typo3conf/ext/atkon_searchagent/cronmod/index.phpsh
)

... phpinfo()


So something with the script path isn´t right yet. Can please anyone 
make some suggestions how to solve this/had the same problem and found a 
solution?

Searching the archive and looking into EXT: direct_mail shows me that 
it´s very rarely to use this typo3 feature. In direct_mail the init.php 
isn´t used. Maybe because it´s not possible?

thanks for comments,
christoph köpernick






More information about the TYPO3-english mailing list