Page 2 of 5

Re: New Release X3.23.0 :deer:

Posted: 26 Jun 2017, 15:35
by EHRETic
Hi there,

My little contribution to the community. After required to install ZipArchive, but that one was easy, I have a little error "post upgrade" which is :
"your server does not allow curl or file_get_contents for Url" when I want to create site object.

I never got this error before, so I assume  something is new.

This is not a real problem as I test my upgrades first on a local VM (ubuntu 16.04, php7.x latest)

Is curl missing or is it a special security setting (my install is "default", nothing fancy) ?

Re: New Release X3.23.0 :deer:

Posted: 26 Jun 2017, 17:08
by mjau-mjau
EHRETic wrote:I never got this error before, so I assume  something is new.
There is actually nothing new in the script that creates the site object. It has always been:
Code
if(function_exists('curl_version')) {
 $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $path);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, TRUE);
$site = curl_exec($ch);
curl_close($ch);
} else {
$site = @file_get_contents($path);
}

if($site === false) {
echo '{ "error": "Your server does not allow curl or file_get_contents for Url." }';
} else {
if(file_put_contents($file, $site)){
echo '{ "success": true }';
} else {
echo '{ "error": "Can\'t write to ' . $file . '" }';
}
}
In either case, either CURL or FILE_GET_CONTENTS simply fails on your server. Why it changed for you now I don't know, but the script was always like this. Perhaps something security related?

Im surprised you managed to run the x3_updater though, because that also requires CURL. If you have FTP for me, I can take a look to see if I can find out anything ... Could be it's related to something else also, for example the URL that is called to create the site object.

Re: New Release X3.23.0 :deer:

Posted: 27 Jun 2017, 05:16
by Gorescore
Here are the Rewrite rules for the Hiawatha Webserver for Imagevue X3.23.0.
https://gist.github.com/mjau-mjau/72fc8 ... d79b0d1596

See it running here : https://mviess.de/test

Re: New Release X3.23.0 :deer:

Posted: 28 Jun 2017, 07:27
by Martin
Great!!... updated my sites... no problems, works like a charm!    :smiley:

Re: New Release X3.23.0 :deer:

Posted: 28 Jun 2017, 08:51
by mjau-mjau
Gorescore wrote:Here are the Rewrite rules for the Hiawatha Webserver for Imagevue X3.23.0.
https://gist.github.com/mjau-mjau/72fc8 ... d79b0d1596

See it running here : https://mviess.de/test
Thanks! I have added the Hiawatha config as a GIST:
https://gist.github.com/mjau-mjau/72fc8 ... d79b0d1596

Appreciated! :thumbsup: :clap:

Re: New Release X3.23.0 :deer:

Posted: 28 Jun 2017, 08:58
by roseline
Updated very quick = great :-) Thank you very much!

BUT I have a bug :-(
In this page under "Post-production" the image must be (is) a comparison-slider.

Work fine before update (v0.21.5 if I remember....).

My code is:
Code
<div class="comparison-slider x3-style-frame" data-orientation="horizontal" data-offset="0.5" data-hover="true">
<img src="{{path}}av1.jpg">
<img src="{{path}}ap1.jpg">
</div>
Thank you in advance for your help :-)

Re: New Release X3.23.0 :deer:

Posted: 28 Jun 2017, 09:59
by roseline
Request: how to updated from X3 v0.15.1 ?
:-)

Re: New Release X3.23.0 :deer:

Posted: 28 Jun 2017, 16:56
by mjau-mjau
roseline wrote:BUT I have a bug :-(
In this page under "Post-production" the image must be (is) a comparison-slider.
Not quite sure what the question is. Where is the link? Comparison slider is not working? Works fine in our Comparison-slider demo, and nothing changed in the code for the comparison slider:
https://demo.photo.gallery/examples/plu ... on-slider/

Re: New Release X3.23.0 :deer:

Posted: 28 Jun 2017, 16:59
by mjau-mjau
roseline wrote:Request: how to updated from X3 v0.15.1 ?
:-)
I would perhaps recommend simply running the x3_updater. You will just have to do some "house cleaning" after ...

Re: New Release X3.23.0 :deer:

Posted: 29 Jun 2017, 02:26
by EHRETic
mjau-mjau wrote:Im surprised you managed to run the x3_updater though, because that also requires CURL. If you have FTP for me, I can take a look to see if I can find out anything ... Could be it's related to something else also, for example the URL that is called to create the site object.
I've updated finally a copy of my website on the same hosted server - worked like a charm. I'll do the productive one today.
I'ts hard to reproduce the same environnement at home when you don't have an experienced Apache/PHP knowledge. But VMs are so much easy going for testing...  :upside_down:

Re: New Release X3.23.0 :deer:

Posted: 29 Jun 2017, 02:42
by roseline
mjau-mjau wrote:
roseline wrote:BUT I have a bug :-(
In this page under "Post-production" the image must be (is) a comparison-slider.
Not quite sure what the question is. Where is the link? Comparison slider is not working? Works fine in our Comparison-slider demo, and nothing changed in the code for the comparison slider:
https://demo.photo.gallery/examples/plu ... on-slider/
Sorry, here is the link: http://ozimages.ch/infos/prestations/
Scroll down to "Post-production" to see (or not) the comparison slider....
For me also your demo work fine.... and before to post on the forum yesterday I had re-put the code without any change.

Re: New Release X3.23.0 :deer:

Posted: 29 Jun 2017, 02:43
by roseline
mjau-mjau wrote:
roseline wrote:Request: how to updated from X3 v0.15.1 ?
:-)
I would perhaps recommend simply running the x3_updater. You will just have to do some "house cleaning" after ...
Thank you, I will try it :-)

Re: New Release X3.23.0 :deer:

Posted: 29 Jun 2017, 12:49
by mjau-mjau
roseline wrote:Sorry, here is the link: http://ozimages.ch/infos/prestations/
Scroll down to "Post-production" to see (or not) the comparison slider....
For me also your demo work fine.... and before to post on the forum yesterday I had re-put the code without any change.
I did some research, and it seems your comparison-slider is OUTSIDE the main "content". The comparison slider (and other content plugins) are only triggered from within the content section.
Image

WHY is it outside the "content" element? Likely because you have an orphan <div> or </div> tag somewhere in your custom html "content" for that page, which would generally break the layout.

Re: New Release X3.23.0 :deer:

Posted: 29 Jun 2017, 13:41
by roseline
mjau-mjau wrote:
roseline wrote:Sorry, here is the link: http://ozimages.ch/infos/prestations/
Scroll down to "Post-production" to see (or not) the comparison slider....
For me also your demo work fine.... and before to post on the forum yesterday I had re-put the code without any change.
I did some research, and it seems your comparison-slider is OUTSIDE the main "content". The comparison slider (and other content plugins) are only triggered from within the content section.
Image

WHY is it outside the "content" element? Likely because you have an orphan <div> or </div> tag somewhere in your custom html "content" for that page, which would generally break the layout.
:-(
So sorry my Dear, your totally right.
I delete a </div> from the above content and it's work yet :-)

Re: New Release X3.23.0 :deer:

Posted: 30 Jun 2017, 04:36
by roseline
mjau-mjau wrote:
roseline wrote:Request: how to updated from X3 v0.15.1 ?
:-)
I would perhaps recommend simply running the x3_updater. You will just have to do some "house cleaning" after ...
Hi Dear,
That's work perfectly :-)
Thank you once more for your great work!