[TYPO3-core] Use CURL for more protocols (bug #1364)

Michael Stucki michael at typo3.org
Tue Feb 13 21:02:49 CET 2007


Hi Martin,

> RC or not, can we get CURL support for ftp and ftps into TYPO3?

If it's only this simple change, then go ahead. But I just had another look
at the patch in the bugtracker (http://bugs.typo3.org/view.php?id=1364) and
have the feeling that some of the functionality will be removed by it. So
unless you can prove me wrong, please change the protocol check but not the
rest of #1364.

> BTW, neither the include headers nor nor request headers option of
> t3lib_div::getURL check the protocol correctly. Both options may only be
> used with http(s). Any objections to adding this check?

No, go ahead!

> PS:
> 
> How about a check in the installer and/or EM to test for the availability
> of getURL and http. This sample code checks and returns some advice (meant
> for EM when getting the extension list failed).
> 
> if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlUse'] == '1' &&
>     !extension_loaded('curl'))        {
> $curlExt = TYPO3_OS=='win' ? '.dll' : 'so';
> return 'TYPO3 is configured to use CURL, but PHP extension is not loaded
> (in php.ini set "extension = \'curl.' . $curlExt . '\')';
> } elseif (!ini_get ('allow_url_fopen'))       {
> return 'PHP may not open URLs (in php.ini set "allow_url_fopen = On")';
> } else {
> if (extension_loaded('curl')) {
> return 'TYPO3 is not configured to use CURL (see TYPO3 installer).';
> } else {
> return 'PHP may not open URLs (in php.ini set "allow_url_fopen = On")';
> }
> }

Looks fine!

Regards, michael
-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/


More information about the TYPO3-team-core mailing list