[TYPO3-dev] how to include t3lib_http_Request and PEAR packages from contrib/pear folder

Philipp Gampe typo3.lists at philippgampe.info
Fri Jan 27 17:17:40 CET 2012


Hi Michael,

Michael wrote:
> $request = t3lib_div::makeInstance('t3lib_http_Request', $url, $method,
> $config);
> 
> ...loads the PEAR file "Request2.php", which tries to include
> "Net/URL2.php" and fails, because it can not find the file:
> 
> PHP Fatal error: require_once(): Failed opening required 'Net/URL2.php'
> (include_path='.:/usr/share/php:/usr/share/pear') in

*arg* sorry, this is my fault.

This happens because it was never tested in frontend :|

Quick fix is to include this in your plugin, just before calling 
makeInstance:
http://git.typo3.org/TYPO3v4/Core.git?a=blobdiff;f=typo3/init.php;h=d216af8212eb11d6474d0a6e2fe41301f0a3f051;hp=4f5ae7207340f3631d757dddbbab08055e6e7b02;hb=addec7b35713a9cbd5b2fa170ccba0d1a9e113b2;hpb=36c833022064aa22fcb04d84c436f43970175cf8

See: http://forge.typo3.org/issues/33497

Best regards
-- 
Philipp Gampe – PGP-Key 0AD96065




More information about the TYPO3-dev mailing list