[TYPO3-ect] PEAR extension praxis test
Ernesto Baschny [cron IT]
ernst at cron-it.de
Tue Sep 25 17:57:38 CEST 2007
Hi,
keep in mind that "realpath" will also resolve out symlinks that might
be in the way to the actual directory. This is why this cannot be used
in TYPO3-Core (or "sysext" or "ext" in typo3-core subdirectory) to find
out the current TYPO3 installations base directory, because it might be
a symlinked directory.
If there are no such obstables, I would use dirname(__FILE__), which is
there in PHP4 for as far as I remember. I have never heard about that
minimum requirement (works well in a still active PHP 4.0.6 installation).
Cheers,
Ernesto
Daniel Brüßler wrote: on 25.09.2007 17:28:
> thanks :-) I corrected it, just have to upload it.
>
> I keep on using the TYPO3-constants.
>
> ----
>
> dirname has the minimum PHPversion 4.3.0, because there was a change
> with the path, or PHP 5.0.0 .
>
> I found also this to get the relative path:
> $relativePath = basename(realpath(".."))
>
> kind regards
> Daniel
>
>
>> /var/www/dbsv/typo3conf/pear/PEAR
>> That is quickly fixed in line 20 of ext_localconf.php
>
>> Today I discovered a really simple method to set pathes relative to the
>> current file, independent of the "back path".
>> $pearDir = dirname(__FILE__) . '/PEAR/';
>>
>> Could extension management haven been that simple since years?
>> Regards
>> Elmar
More information about the TYPO3-team-extension-coordination
mailing list