[TYPO3] Loading TYPO3 outside TYPO3
Mathias Schreiber
mathias.schreiber at wmdb.de
Tue Mar 21 12:14:08 CET 2006
"Andreas Balzer" <eMail at andreas-balzer.de> schrieb im Newsbeitrag
> if you find any solution, please post it :)
> I noticed, that any output via cmd comes also via webbrowser, so you can
> access the script via browser too..
First off: you can't.
Call it via command line.
Second:
init.php checks paths wrong.
Meaning: It checks paths wrong on WINDOWS.
Background:
The Apache Webserver (and IIS as well possibly) change \ to /.
As a result TYPO3 works perfectly fine when being called via the webserver.
But you don't call it via apache...
Using the standard way, PHP might be installed the call on the CL looks like
this:
c:\php\cli\php
d:\wwwroot\kb.internal.dus.wmdb.de\typo3conf\ext\kb_linkchecker\import\class.linkcheck.php
Now, since no webserver is involved the paths that are returned by PHP are
like this:
d:\wwwroot\kb.dus. [you get the rest]
init.php check with a substring, if the last parts of that path include
../typo3conf/
Notice the forward slashes!
init.php is not x-classable so you will have to patch the complete file.
Right before the check I wrote this:
if (defined('TYPO3_cliMode') && TYPO3_OS == 'WIN') {
$temp_path = str_replace('\\','/',$temp_path);
}
This solution works for us here but I do NOT suggest it since this is a
quick hack which is mostly untested!!
all the best
Mathias
More information about the TYPO3-english
mailing list