dfgallery: Invalid cURL response. We expected ‘true’ from the url …

I am going to install dfgallery 2.0 as it seems to be one of the best flash image gallery softwares available for free.

Before the installation I was already using mod_rewrite.

A lot of people is getting this error when trying to install df gallery 2.0:

Invalid cURL response.
We expected 'true' from the url : http://www.[yourdomainName]/api/rest/test_curl

Let’s suppose you have installed the gallery in ‘/gallery’ folder.
This is a quick fix that worked for me:

Open .htaccess file, which should be like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
  Order allow,deny
</FilesMatch>
 
Options -Indexes
Options +FollowSymLinks
 
ErrorDocument 404 /index.php
DirectoryIndex index.php
 
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /gallery/index.php/$1 [L]
</IfModule>

To (notice chages in line 15: replace / to ?) :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
  Order allow,deny
</FilesMatch>
 
Options -Indexes
Options +FollowSymLinks
 
ErrorDocument 404 /index.php
DirectoryIndex index.php
 
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /gallery/index.php?$1 [L]
</IfModule>

Upload this file using (for instance, FileZilla client) and check again in http://www.yoursiteName.com/gallery/
It should be working now ;)

____
It is very likely that you are not interested in learning how to use mod_rewrite and RewriteRule’s but I might be wrong, so check:
1. This great step-by-step beginners guide to learn the quirks of Apache mod_rewrite.
2. Here are a
few examples of using rewritecond’s and rewriterule’s
3. And of course, the Apache official website for mod_rewrite
Any more suggestions?
4. And, for spanish speakers guía en español de mod_rewrite
5. To advanced / or wannabe-advanced users, try a deeper look at mod_rewrite

Related posts:

  1. A real case example: my .htaccess in /wordpress subdirectory
  2. PHP: check if url exists (or file via url)
  3. dfgallery 2.0: Flickr “this photo is currently unavailable” [SOLVED]
  4. vBulletin: change the redirect or the url in the login process

10 Responses to “dfgallery: Invalid cURL response. We expected ‘true’ from the url …”

  • Symon says:

    I tryed to do this but nothing happend.

    Invalid cURL response.
    We expected ‘true’ from the url : http://www.XXXX.com/api/rest/test_curl

    Still there.

    I am using Apache 2.0, with all options ON that i need (mod_rewrite, cURL…) What to do ?

  • jotz says:

    check if you get ‘true’ from the url, when you add “index.php” to it, like this: http://www.XXXX.com/index.php/api/rest/test_curl

    if you do, this solution should work, mode details here:
    http://www.siviz.com/photo-software/6-dfgallery-invalid-curl-response-error

  • tjal says:

    Got it working but under php 5.28 – 5.3.0 still got me Invalid cURL response.

  • Souvik Mitra says:

    Thanks a lot for this tip…
    My server is currently running PHP 5.2.13 and this worked like a charm!

  • Nikolaj says:

    Thank you very much. It works !!

  • toopoo says:

    It is not working on my site.
    I got true when I type the url directory in the browser.
    But I still got the same error message when trying to install it.

  • ull0r says:

    Thanks for your help! Now I can install it…

  • Aman says:

    Another way of solving it can be found here
    http://www.cafeinks.com/archives/179

  • Kevin says:

    olution to:

    We expected ‘true’ from the url : http://www……./gallery/api/rest/test_curl
    and a json path error that appears when you view the gallery

    The errors do appear to be path problems correctable with mod_rewrite solutions. People have given code hacks above, but I believe they are most likely just that–hacks. In my case, with godaddy hosting and a “gallery” directory, I solved it with:

    RewriteRule (.*) index.php?/$1 [QSA,L]

    Added to the end of my rewrite directives in my .htaccess file in my gallery directory

    I do not know if this was needed for the gallery, but in my root-level htaccess file I had:
    RewriteBase /

    The code is apparently fine. It is likely, as stated, a rewrite issue, which may vary from server to server, and when dfgallery is in a subfolder.

    More suggestions are here
    http://www.eukhost.com/forums/f38/mod_rewrite-curl-ddfgallery-2-0-a-7237/

    I hope this saves time for someone, as I have spent a day solving it on one server then a year later re-solving it on another server. Good luck!

Leave a Reply

Paypal donate

Please help me keep this blog up by donating.

Por favor, ayúdame a continuar con el blog donando.