[Typo3] htmlArea RTE Extension
Albert van der Veen
albert at jipscompany.com
Thu Mar 17 12:42:41 CET 2005
Hello Emma,
The piece of code that generates the error defines a variable
'MY_PATH_thisScript' according to the value of environment variables. It
gets one of these values: $_SERVER['ORIG_PATH_TRANSLATED'],
$_SERVER['ORIG_PATH_TRANSLATED'], $_SERVER['ORIG_SCRIPT_FILENAME'] or
$_SERVER['SCRIPT_FILENAME']
If you check the environment variables of your typo3 server (with phpinfo()
) you will see that ORIG_PATH_TRANSLATED doesn't exist. Hence the error.
The reason for this check is a change in the naming of variables in php
4.3.2 and higher:
Old Variable Name:
ORIG_PATH_TRANSLATED
ORIG_PATH_INFO
ORIG_SCRIPT_NAME
ORIG_SCRIPT_FILENAME
New Variable Name (PHP 4.3.2):
PATH_TRANSLATED
PATH_INFO
SCRIPT_NAME
SCRIPT_FILENAME
The quick-and-dirty way to get rid of the error is to replace (in
t3_popup.php and rtehtmlarea_select_image.php):
define('MY_PATH_thisScript',str_replace('//','/', str_replace('\\','/',
(php_sapi_name()=='cgi'||php_sapi_name()=='xcgi'||php_sapi_name()=='isapi'
||php_sapi_name()=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])?
($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME']))));
with:
define('MY_PATH_thisScript',str_replace('//','/', str_replace('\\','/',
$_SERVER['SCRIPT_FILENAME'])));
or
define('MY_PATH_thisScript',str_replace('//','/', str_replace('\\','/',
$_SERVER['PATH_TRANSLATED'])));
(depending on which env var exists, probably both? - my knowledge on this
matter is minimal)
Of course, this is not a 'final' solution, but it should work with your
configuration. The check for the existence of the env vars should be
modified (I think, or did I miss something?). I will mail the author to
check this.
Hope this helps!
regards,
Albert van der Veen
t 09:51 AM 3/17/2005, you wrote:
>any thoughts on this anyone? I'd really like to get it working today.
>
>Emma
>
>Hi,
>Sorry to bother you again with this but I've just loaded the latest
>htmlAreal extension and the old error message has returned -
>********
>Notice: Undefined index: ORIG_PATH_TRANSLATED in
>c:\inetpub\wwwroot\mcnfife\typo3conf\ext\rtehtmlarea\t3_popup.php on line 39
>
>Warning: Cannot modify header information - headers already sent by (output
>started at
>c:\inetpub\wwwroot\mcnfife\typo3conf\ext\rtehtmlarea\t3_popup.php:39) in
>c:\inetpub\wwwroot\mcnfife\typo3\t3lib\class.t3lib_userauth.php on line 242
>********
More information about the TYPO3-english
mailing list