Jump to content

Recommended Posts

i got a gallery installed and i got that pop up, what does it mean..

 

it says it need it to be true

 

Invalid cURL response.

We expected 'true' from the url : http://site.com/dfg/api/rest/test_curl

 

but i go to that address and nothing, but if i add a index.php in there, i get true: http://site.com/dfg/index.php/api/rest/test_curl

 

tried to change install.php and config.php and .htaccess files, but nothing

 

seeing if anyone here has seen this before..?

It works if you put index.php in their because of their particular mod-rewrite conditions and index page setup.

 

I would image it is not supposed to be 'site.com'. You need to find instructions on setting up the script, or at least that part, to tell you where it should in fact point too. If you just want it to be true all the time (i dont know what it does though), just make those folders on your site and put your site name on there,

 

-cb-

this is the curl parts used in the install.php file, ive tried asking the host, but they say ask the person who made, and hes unreachable, so can anyone see anything wrong with this? that would make the cURL be false..?

 

// CLEAN URLS.
if(extension_loaded('curl')){
	$curl_url = 'http://'.$_SERVER['SERVER_NAME'].substr($_SERVER['SCRIPT_NAME'],0,strpos($_SERVER['SCRIPT_NAME'],'/index.php')). '/api/rest/test_curl';
	$clean_url_check = curl_init($curl_url);
	curl_setopt($clean_url_check,CURLOPT_RETURNTRANSFER,true);
	$clean_url_check_resp = curl_exec($clean_url_check);
	if (curl_errno($clean_url_check)>0){
		$checks[] = array('A curl error occured while checking for clean urls.',false,"URL : $curl_url<br/>cURL message : ". curl_error($clean_url_check));
	}else{
		if($clean_url_check_resp == 'true'){
			$checks[] = array('Clean urls\' have been enabled.',true,'');
		}else{
			$checks[] = array('Invalid cURL response.',false,"We expected 'true' from the url : $curl_url");
		}
	}
}else{
	$checks[] = array('Unable to check clean urls, as curl is disabled.',false,'Please enable cURL extension first.');
}

http://www.dezinerfolio.com/forum/discussion-30

 

If you know that mod-rewrite is working on your server remove the code, some servers apparently block curl requests from the same box.

 

// CLEAN URLS.
if(!extension_loaded('curl')){
	$checks[] = array('Unable to check clean urls, as curl is disabled.',false,'Please enable cURL extension first.');
}

Replace the code with that.

 

-cb-

right.. cURL and mod_rewrite are enabled..

but they user virtual, so i'll have to use RewriteBase, which i did.. but still nothing,

 

and as i thought i may have screwed something up, i redid it all, i redownloaded it and such, so all thats now different to the download files are the .htaccess file is 'RewriteBase /gallery' is the first line in it..

 

and it still says about there being an invalid cURL response :s

 

so confusing...

  • 1 year later...

This does not following redirect, htaccess should redirect u to index.php in this directory.

However htaccess maybe returns u the http 302 or 301, you should setopt follow location.

 

try putting

curl_setopt($clean_url_check, CURLOPT_FOLLOWLOCATION, TRUE);

 

to debug the response u receive from server, send him POST request and echo result, rather than sending GET.

 

HTH

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.