[TYPO3] Loading TYPO3 outside TYPO3
eMail at andreas-balzer.de
Sun Mar 19 15:08:37 CET 2006
> Andreas Balzer schrieb:
>> derjoerg schrieb:
>>> Johannes Reichardt schrieb:
>>>> Hi there,
>>>> i have some neat functions in my own extensions that use the dbal
>>>> and other Typo3 functions. But i also have a script outside the
>>>> scope of typo3 (for a cronjob) that uses these functions.
>>>> The point is, that i am confused how i can properly "load" typo3 and
>>>> its classes so i can access them from an "outside" script. Would be
>>>> glad if someone has some hints. Unfortunatly i have not much
>>>> knowledge about handling classes in general and moreover handling
>>>> classes with typo3 ;)
>>>> - Johannes
>>> Look at
>>> and search for "CLI mode".
>>> Joerg Schoppet
>> I tried it, but it doesn't really work :-/
>> Here is my try.. Can you help me and say me, what i have done wrong?
>> (i know, it's very unsecure, but it's just my first try..)
> Try to start it over the command-prompt "php -f
> c:\Programme\typo3\htdocs\typo3wamp\winremote\script.php" and look at
> the output.
> Sometimes this helps a lot.
> - wrong paths
> - _cli_winremote is not allowed to be a admin
> - look at the log in the be. Perhaps the user has not the necessary
> rights to insert a record
> - look in the table-content (phpmyadmin), if the record is created
Hi! I looked through.. Well, you're right, the access settings were not
correct and also the paths..
I changed it to:
/*This file should create a BE cli connection to the user _cli_winremote
with pwd winremote
This file is in
Typo3 BE is in
As soon as a connection is set up, this file should simply create a new
The only id that's already used is 1, so we create the pid 2.
Problem: It does not work, no output, nothing..
(Script is opened via Webbrowser..)
// Standard initialization of a CLI module:
// Defining circumstances for CLI mode:
// Defining PATH_thisScript here: Must be the ABSOLUTE path of this
script in the right context:
// This will work as long as the script is called by it's absolute path!
//define(PATH_thisScript, $_ENV['_'] ? $_ENV['_'] : $_SERVER['_']);
// Include configuration file:
$BACK_PATH = 'c:/Programme/typo3/htdocs/typo3wamp/typo3/';
$MCONF['name'] = '_CLI_winremote';
// Include init file:
$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->stripslashes_values = 0;
$inhalte['pages']['2'] = array(
"title" => "The page title",
"subtitle" => "Other title stuff",
"pid" => "1"
Well, nothing happens.. I looked in the Typo3 log. If i change the cli
user to admin (which is not allowed), i get an error. If i try to log in
as a different user, i get an error too.. ..so actually the script can
find typo3. Then i looked into phpmyadmin, because typo3 doesn't show
anything.. > There is no new entry.. So actually nothing happens :-/ By
the way, the command prompt outputs 4 empty lines and then asks me for
an other command.. (but it seems to work, because my firewall asked me,
if i want to allow cli to act as a server or allow internet connection..
(i use zonealarm)..
So, what do i have to do?
Please help me
More information about the TYPO3-english