Hi,
I have moved site from another server running PLEKS to the server with cPanel. Both servers have installed PHP 5.2.17 with CURL support but after site move to cPanel site is crashing on curl_exec to "self" (part of the web site with blog CMS).
Code for that part looks like:
Any clue why cPanel server can't handle that?
PS.
EasyApache profile details returns that:
Thanks
I have moved site from another server running PLEKS to the server with cPanel. Both servers have installed PHP 5.2.17 with CURL support but after site move to cPanel site is crashing on curl_exec to "self" (part of the web site with blog CMS).
Code for that part looks like:
PHP:
# INSTANTIATE CURL.
$curl = curl_init();
# CURL SETTINGS.
curl_setopt($curl, CURLOPT_URL, "http://www.mydomain.com/news/index.php?tempskin=_rss2");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);
# GRAB THE XML FILE.
$xmlData = curl_exec($curl);
curl_close($curl);
# SET UP XML OBJECT.
$xmlObjData = simplexml_load_string( $xmlData );
$tempCounter = 0;
foreach ( $xmlObjData->channel->item as $item )
{
# DISPLAY ONLY 10 ITEMS.
if ( $tempCounter < 10 )
{
echo "<li><a href=\"{$item -> link}\">{$item -> title}</a></li>
";
}
$tempCounter += 1;
}
?>
PS.
EasyApache profile details returns that:
CurlSSL
This option will make the following changes to your profile prior to the build:
Disables:
Curl
Thanks
Last edited: