forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: my evil twin on September 18, 2006, 03:00:00 pm

Title: crossing subdomains now possible in any way?
Post by: my evil twin on September 18, 2006, 03:00:00 pm
hello,

yes, i did read the readme.
yes, i did read through all the 54 pages of the support thread.
yes, i did a search.

but i still haven't found the solution.
maybe that's because my english is not very good and i might suffer from translation errors, but....

i have my gallery at http://chamaeleons-online.com/galerie
and my forums at http://chamaeleons-online.com/forum

that all worked fine.

but my users can also access my forums through http://forum.chamaeleons-online.com which leads to the error, that cpm_fetch thinks the gallery was at http//forum.chamaeleons-online.com/galerie which it is NOT.

is there ANY possibility to fetch three latest images from chamaeleons-online.com/forum AND forum.chamaeleons-online.com without getting errors?

it would be such a nice feature to have, i am very sad i had to disable it again because my users could not access the forums because of the errors.


thanks in advance for any answers and greetings from germany :)
ines
Title: Re: crossing subdomains now possible in any way?
Post by: vuud on September 18, 2006, 06:53:04 pm
hello,

yes, i did read the readme.
yes, i did read through all the 54 pages of the support thread.
yes, i did a search.

but i still haven't found the solution.
maybe that's because my english is not very good and i might suffer from translation errors, but....

i have my gallery at http://chamaeleons-online.com/galerie
and my forums at http://chamaeleons-online.com/forum

that all worked fine.

but my users can also access my forums through http://forum.chamaeleons-online.com which leads to the error, that cpm_fetch thinks the gallery was at http//forum.chamaeleons-online.com/galerie which it is NOT.

is there ANY possibility to fetch three latest images from chamaeleons-online.com/forum AND forum.chamaeleons-online.com without getting errors?

it would be such a nice feature to have, i am very sad i had to disable it again because my users could not access the forums because of the errors.


thanks in advance for any answers and greetings from germany :)
ines


Tag,

(and that is half the german I know)

If you just want to retrieve the three latest images, you can do that a number of different ways.  One of the easiest, if your host allows it, would be to create a PHP file on the real server (the one with CPG) that just gets the three images.  Then, on your other server do a php include.  This will execute it on the other subdomain, but send you back the html code.

We may need to tweak a bit the settings to get the domains right in there, but let me know if that gets you any closer.

Danka

(and that is the other half)


Title: Re: crossing subdomains now possible in any way?
Post by: my evil twin on September 18, 2006, 10:06:01 pm
Well, hello,
i tried but i do not get it?!

just have no clue how it works.

i did install the dev version 1.9.3 i think?!
and the installer worked fine.

then, whenever i try to make a include, it tells me that it didnt't found the config file.
what the hell?

which config file?
coppermines' or cpmfetchs'?

then, whatever path i try, i get a basedir restriction thing.
what the hell?

i just don't know what the hell i am doing wrong.

it worked with version 1.6.4 but only on chamaeleons-online.com/forum
and only with the include directly in the template of the forum.

hell.
i work on this since yesterday morning,
it's even harder then bridging smf, mediawiki and coppermine and the programming of the templates altogether.
grrrrrrrrrrrr.

and thanks for your reply in advance
(Danke! <-- that's what I have to say, not you :) )
Title: Re: crossing subdomains now possible in any way?
Post by: vuud on September 19, 2006, 12:21:36 am
Well, hello,
i tried but i do not get it?!

just have no clue how it works.

i did install the dev version 1.9.3 i think?!
and the installer worked fine.

then, whenever i try to make a include, it tells me that it didnt't found the config file.
what the hell?

which config file?
coppermines' or cpmfetchs'?

then, whatever path i try, i get a basedir restriction thing.
what the hell?

i just don't know what the hell i am doing wrong.

it worked with version 1.6.4 but only on chamaeleons-online.com/forum
and only with the include directly in the template of the forum.

hell.
i work on this since yesterday morning,
it's even harder then bridging smf, mediawiki and coppermine and the programming of the templates altogether.
grrrrrrrrrrrr.

and thanks for your reply in advance
(Danke! <-- that's what I have to say, not you :) )

Whats with the "e" on danka - is that like a gender thing?  English is blessed with much of it being non-gender, but it being confusing as all hell.

Anyway...

Take this in steps. 

1) On domain with cpg installed make a php file named lastthree.php.

2) Into this put cpmfetch code to get the images you want

3) Run it from a web browser to make sure you get three pictures.  If not, keep working on #2 till it does.

4) Go to your php page on your other subdomain and insert an include

include "http://realdomain.domain.com/lastthree.php";

5) Load the subdomain page and see if you get the lastthree.


Hope that helps.

Title: Re: crossing subdomains now possible in any way?
Post by: my evil twin on September 19, 2006, 12:30:55 am
hello,

no, the word is "danke" (thanks), not danka.
no gender thing here ;)

the point where i get stuck is number three ;)

i keep working on number two but oh well, it just doesn't want to.....

i think i'll give it up.

who needs coppermine previews anyways ;)

greetings :)
Title: Re: crossing subdomains now possible in any way?
Post by: gullars on January 06, 2007, 03:48:15 pm
My problem starts at point number 4/5.

I get the following error: URL file-access is disabled in the server configuration in /hsphere/local/home/sveio/test.sveioskulekorps.no/testwp.php on line 2

Apparently, i cannot include across subdomains. How do I activate this?

Link to the file which I want to include: http://forum.sveioskulekorps.no/cpmfetch/test.php

Link to the file with the error: http://test.sveioskulekorps.no/testwp.php
Title: Re: crossing subdomains now possible in any way?
Post by: gullars on January 06, 2007, 04:00:16 pm
Well, as you can see by clicking the links, I have managed to go around the problem, but now I'm facing a new problem... Follow the last link and see for yourself.

test.php:
<?php   
include "cpmfetch.php";
$objCpm = new cpm('/../forum.sveioskulekorps.no/galleri');
$objCpm->cpm_viewRandomMedia (3,1);
$objCpm->cpm_viewLastAddedMedia (3,1);
$objCpm->cpm_close();
?>

testwp.php:

<?php   
include "../forum.sveioskulekorps.no/cpmfetch/test.php";
?>
Title: Re: crossing subdomains now possible in any way?
Post by: vuud on January 06, 2007, 04:55:13 pm
Well, as you can see by clicking the links, I have managed to go around the problem, but now I'm facing a new problem... Follow the last link and see for yourself.

test.php:
<?php   
include "cpmfetch.php";
$objCpm = new cpm('/../forum.sveioskulekorps.no/galleri');
$objCpm->cpm_viewRandomMedia (3,1);
$objCpm->cpm_viewLastAddedMedia (3,1);
$objCpm->cpm_close();
?>

testwp.php:

<?php   
include "../forum.sveioskulekorps.no/cpmfetch/test.php";
?>

URL file access is controlled by your web server and php.ini - if you are hosted you would have to convince them to turn it on.

I think in the dev version you can change the domain name to use to access the cpg gallery, which would probably fix the missing images.

If you upgrade, post the results and I will tell you what to change from there...

Vuud

Title: Re: crossing subdomains now possible in any way?
Post by: gullars on January 06, 2007, 05:34:10 pm
thanks for quick reply!

But are you sure this has to be done now as well? Now, as you can see, I manage to access the test.php file from the other domain.

Now my problem is that the image url becomes http://test.sveioskulekorps.no/forum.sveioskulekorps.no/galleri/etc...., instead of http://forum.sveioskulekorps.no/galleri/. Isn't this possible to manipulate in cpmfetch.php?
Title: Re: crossing subdomains now possible in any way?
Post by: vuud on January 06, 2007, 06:08:46 pm
thanks for quick reply!

But are you sure this has to be done now as well? Now, as you can see, I manage to access the test.php file from the other domain.

Now my problem is that the image url becomes http://test.sveioskulekorps.no/forum.sveioskulekorps.no/galleri/etc...., instead of http://forum.sveioskulekorps.no/galleri/. Isn't this possible to manipulate in cpmfetch.php?

With the development version I think you can get around talking to your isp.

There was a call in the stable cpmfetch for overriding the domain name part, but it never worked really well - and I don't remember exactly how to get it working right.
Title: Re: crossing subdomains now possible in any way?
Post by: gullars on January 06, 2007, 06:11:05 pm
okay, i have sent them a mail. hope they can solve the problem.

if they won't, is there anyway to go around the problem, for example my modifying my .htaccess?
Title: Re: crossing subdomains now possible in any way?
Post by: vuud on January 06, 2007, 07:43:13 pm
okay, i have sent them a mail. hope they can solve the problem.

if they won't, is there anyway to go around the problem, for example my modifying my .htaccess?

Sigh. 

If you upgrade cpmfetch, you do not need to call your ISP.

You can work around it
Title: Re: crossing subdomains now possible in any way?
Post by: gullars on January 10, 2007, 04:18:46 pm
Well, my host told me that they couldn't help me for security reasons, and I cannot manage to find out what to do to cpmfetch to get it working...

can anyone please help me?
Title: Re: crossing subdomains now possible in any way?
Post by: vuud on January 10, 2007, 06:01:52 pm
Well, my host told me that they couldn't help me for security reasons, and I cannot manage to find out what to do to cpmfetch to get it working...

can anyone please help me?

Did you even read my last two posts?

You've given no indication that you read or acted on any of it.


Title: Re: crossing subdomains now possible in any way?
Post by: gullars on January 10, 2007, 06:19:15 pm
sorry, but I have the latest version of cpmfetch and what do you then mean about upgrading cpmfetch? you also say that the call for overriding the domain name part doesn't work. How can I get it working?

I hope I don't sound ungratefull or anything. I really appreciate the work you and others put into this script.
Title: Re: crossing subdomains now possible in any way?
Post by: gullars on January 10, 2007, 07:16:11 pm
<iframe> seems to work, but then the images opens inside the frame. working on solving this issue
Title: Re: crossing subdomains now possible in any way?
Post by: gullars on January 10, 2007, 07:47:09 pm
well, now it works! thanks for a great plugin!
Title: Re: crossing subdomains now possible in any way?
Post by: vuud on January 10, 2007, 08:11:45 pm
well, now it works! thanks for a great plugin!

If you have time, please post the solution so others can benefit from it.

thanks,

Vuud
Title: Re: crossing subdomains now possible in any way?
Post by: epopen on March 22, 2007, 05:55:09 pm
Hello everyone ;D

I am first time post reply and poor English... Sorry :P

I search and reference this thread, But can't solvemy problem....
Can let me discuss?

I have a my web page http://www.epopen.com (http://www.epopen.com), It run Mediawiki
And Coppermine gallery http://gallery.epopen.com (http://gallery.epopen.com), gallery install at root directory.
These subdomain are different root directory.

I wish my main web page display random picture form gallery...

1.
  1.1 Put http://gallery.epopen.com/cpmfetch/lastthree.php (http://gallery.epopen.com/cpmfetch/lastthree.php) on gallery. (source code form cpmfetch installer, Work fine).
  1.2 Mediawiki install runphp extension http://www.mediawiki.org/wiki/Extension:Runphp (http://www.mediawiki.org/wiki/Extension:Runphp)
  1.3 Mediawiki page edit add "<php>include "http://www.mediawiki.org/wiki/Extension:Runphp";</php>
  1.4 Result: FAIL
2.
  2.1 use "<img src="http://gallery.epopen.com/cpmfetch/cfimageget.php">" tag on mediawiki page
  2.2 Result: FAIL

Current solution
  Install http://meta.wikimedia.org/wiki/Mediawiki_Coppermine_Photo_Gallery_random_photo (http://meta.wikimedia.org/wiki/Mediawiki_Coppermine_Photo_Gallery_random_photo)
  Demo:http://www.epopen.com/index.php/%E8%B2%93%E5%92%AA%E6%8E%A8%E5%80%92%E7%9A%84%E7%B6%B2%E7%AB%99:%E5%B9%AB%E5%8A%A9 (http://www.epopen.com/index.php/%E8%B2%93%E5%92%AA%E6%8E%A8%E5%80%92%E7%9A%84%E7%B6%B2%E7%AB%99:%E5%B9%AB%E5%8A%A9)
But have some problem...It display private picture !!

I known cpmfetch are best solution...But I can't use it on my web page.... :'(
Can everyone help me....
Thanks everyone very much....

Title: Re: crossing subdomains now possible in any way?
Post by: vuud on March 22, 2007, 06:13:26 pm
Hello everyone ;D

I am first time post reply and poor English... Sorry :P

I search and reference this thread, But can't solvemy problem....
Can let me discuss?

I have a my web page http://www.epopen.com (http://www.epopen.com), It run Mediawiki
And Coppermine gallery http://gallery.epopen.com (http://gallery.epopen.com), gallery install at root directory.
These subdomain are different root directory.

I wish my main web page display random picture form gallery...

1.
  1.1 Put http://gallery.epopen.com/cpmfetch/lastthree.php (http://gallery.epopen.com/cpmfetch/lastthree.php) on gallery. (source code form cpmfetch installer, Work fine).
  1.2 Mediawiki install runphp extension http://www.mediawiki.org/wiki/Extension:Runphp (http://www.mediawiki.org/wiki/Extension:Runphp)
  1.3 Mediawiki page edit add "<php>include "http://www.mediawiki.org/wiki/Extension:Runphp";</php>
  1.4 Result: FAIL

Should  the above <php> by <?php>?  Also, FAIL is not a real report... what actually happened and what it gave for an error would be helpful.




Quote
2.
  2.1 use "<img src="http://gallery.epopen.com/cpmfetch/cfimageget.php">" tag on mediawiki page
  2.2 Result: FAIL

I tried that link to cfimageget in a web browser and did not get an image.  Did you enable cfimageget?  Set its settings?



Quote
Current solution
  Install http://meta.wikimedia.org/wiki/Mediawiki_Coppermine_Photo_Gallery_random_photo (http://meta.wikimedia.org/wiki/Mediawiki_Coppermine_Photo_Gallery_random_photo)
  Demo:http://www.epopen.com/index.php/%E8%B2%93%E5%92%AA%E6%8E%A8%E5%80%92%E7%9A%84%E7%B6%B2%E7%AB%99:%E5%B9%AB%E5%8A%A9 (http://www.epopen.com/index.php/%E8%B2%93%E5%92%AA%E6%8E%A8%E5%80%92%E7%9A%84%E7%B6%B2%E7%AB%99:%E5%B9%AB%E5%8A%A9)
But have some problem...It display private picture !!

I don't care about this... it does not use CpmFetch - you should contact the author of figure out how to get CpmFetch working.  Please do not post here about other non-cpmfetch related programs.