Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3 4 5 6 ... 9   Go Down

Author Topic: Random image include? (SSI.php)  (Read 183088 times)

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #20 on: December 26, 2003, 10:49:09 am »

ssi.php has been written for cpg1.1 and is not recommended for usage anymore (see above postings), that's why there's no support, additional documentation or whatever - in other words: use it at your own risk.
Currently, I'm working on a new version that will go into the next release, with (hopefully) all issues fixed that were reported. (And no: I don't know when it will be released!).

GauGau
Logged

chillypk

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Random image include?
« Reply #21 on: December 26, 2003, 11:18:59 am »

Ah I see - well no security issues here as well - as nothing private here as well.

Works well for me though :)  Just wondering if I was missed reading something somewhere as I saw the code concerning in ssi.php.

For anyone looking for the fix I was looking for (captions after photo include)

Find:
if ($cpg_include_link==1){$return_value.="</a>";}

in ssi.php


and after ADD:

if ($row['title']!="") {$return_value.= "<br>".$row['title'];}
if ($row['caption']!="") {$return_value.= "<br>".$row['caption']." ";}
$return_value.=$td_end."\n";


Thanks for the mod :)

I'm not a programmer (don't know PHP at all) - but I'm good at looking at code and figuring things out :)
Hope thats helps anyone looking for something similar.
Logged

Quadsk8

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
    • http://www.quadsk8.nl
SSi does not work on my Smarty-templated homepage
« Reply #22 on: December 30, 2003, 12:08:52 am »

Hello Gaugau, chillypk and others,

I installed SSI.php script and example.php works as it should, also a little include script i made in the coppermine directory gives the expected result  (nice script Gaugau!)

But...

On my Homepage I use Scripty as template engine and when using an {include_php file="SSI_includefile.php"} I get the following error:
Quote
Coppermine critical error:
Unable to connect to database !

MySQL said: Access denied for user: 'wwwrun@localhost' (Using password: NO)


Does anyone know what is causing this and what would be the solution??

appreciate any answer on this!!!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #23 on: December 30, 2003, 08:23:34 am »

you simply can't use ssi.php within coppermine, only on non-coppermine pages.

GauGau
Logged

Quadsk8

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
    • http://www.quadsk8.nl
Random image include?
« Reply #24 on: December 30, 2003, 12:20:45 pm »

Thanks Gaugau for replying:
Quote from: "gaugau"
you simply can't use ssi.php within coppermine, only on non-coppermine pages.

But I don't, that is why I do not understand this error message....

But what is special about Coppermine pages?
Do Smarty-generated pages than have the same problem?

Here you can see that my little include script works, giving all SSI-generated statistics of Coppermine
but when I try to include it in my Homepage I get the mentioned error.
Logged

binocle

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
    • http://www.surf-bzh.com
random image
« Reply #25 on: January 08, 2004, 11:01:35 pm »

I've got a problem for displaying a random image ont he main page of my site.

I've follow all of the instruction (using ssi.php)but it didn't work.

to see what happen :

http://surfbzh.free.fr/

tahnk you in advance
 :wink:
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #26 on: January 09, 2004, 09:59:49 am »

The error
Quote
Warning: php_hostconnect: connect failed in ssi.php on line 32

Warning: Failed opening 'http://surfbzh.free.fr/coppermine_dir/include/config.inc.php' for inclusion (include_path='/var/www/free.fr/14/s/u/r/f/surfbzh/include/:.') in ssi.php on line 32
Coppermine critical error:
Unable to connect to database !

MySQL said: Can't connect to MySQL server on 'sql.free.fr' (111)
is so easy to understand - it says "you're not meant to use this application untill you gain a little more knowledge about web technology".
The usage of ssi.php isn't recommended any longer, you're on your own (at least no support from me for such newbie questions).

GauGau
Logged

Quadsk8

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
    • http://www.quadsk8.nl
Random image include?
« Reply #27 on: January 09, 2004, 12:14:44 pm »

Quote from: "gaugau"
is so easy to understand - it says "you're not meant to use this application untill you gain a little more knowledge about web technology".

Don't loose your patience with us Gaugau! (das war nicht so nett!)
There must have been a time when you where not an expert on web-technology yourself.
And back then you probably also have seen some errormessage and did not have a clue.

Too bad I'm not a surfer, because binocle has put up some nice waves from Bretagne in his Coppermine.
So his config.inc.php is probably good enough to connect to his database!

Since I'am not the expert, I can only tell how I solved my (similar?) problem, see some posts back:

I was including an include file which included SSI.class.
This was probably too much so I just inserted the script into my homepage and then it worked just fine.
Don't know why it gave the MySQL Access denied message, but it works now!

Good Luck and keep on surfing binocle!!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #28 on: January 09, 2004, 01:10:17 pm »

you're right, I used to be a beginner as well (everyone is at some point), but I didn't try to apply rocket science on my site (or what appeared to be rocket science to me at that time), and I didn't ask silly questions on support boards in the first place, but used some search engines to tackle the problems on my own. Only after hours of research I would have dared to post a question on a board/mailing list, as I didn't want to waste everybody's time.
The problem with coppermine support is the same as on most support boards: people don't realize a support board is not a hotline, and that they're requested to do some research first.

There have been rants on this on many boards (including this one), and a vast majority of people behave nicely (they read the documentation, search the board, search on google, think twice about their postings, post on the proper board etc.) - that's why I keep up the support work on this project.

There are things that make supporters - well - reluctant to help:
  • people who don't stick to forum rules/common sense
  • people who post on the wrong board
  • silly subject lines
  • postings that show that users haven't even tried to solve the problem on their own[/list:u]Sometimes I lose my patience when people break those rules and I fire a not-so-nice answer (as happened with above posting), I hope you can understand why.

    I'll try to be nice in the future...

    GauGau
Logged

Quadsk8

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
    • http://www.quadsk8.nl
Random image include?
« Reply #29 on: January 09, 2004, 02:01:27 pm »

No problem, we appreciate your work!

binocle will probably have found your answer about free.fr in http://forum.coppermine-gallery.net/index.php?topic=2921 since he does not seem to be real beginner

PS two small modifications to SSI.php made it XHTML valid on my homepage:
replaced two occurences of <br> with <br /> of the patch mentioned above and made the closing tag of  the <img> an /> as in line:
Code: [Select]
$return_value.= "\" align=\"left\" class=\"padright\" />";
Logged

khm1972

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
    • http://www.markussens.dk
ssi.php - how to access database with username and password
« Reply #30 on: January 10, 2004, 07:44:28 pm »

Hi

I'm trying to get the ssi.php to work "random image" but I get the message  "Cant access database (mysql) no@password" ore something like this.

How and where do edit the code and list my username and password???

And how shall it be written

Thanks
Klaus - Copenhagen
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #31 on: January 11, 2004, 12:31:33 am »

[list=1]
  • the usage of ssi.php isn't recommended nor supported any more, as it's unsecure.
  • Did you have a look at the readme that comes with it? The file ssi.php has to be in the coppermine directory. If it is (and all configuration vars in it are filled in properly), you shouldn't have a problem and a database connection error shouldn't occur.[/list:o]To tell you more, give us a link to your coppermine dir...

    GauGau
Logged

khm1972

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
    • http://www.markussens.dk
That helped
« Reply #32 on: January 11, 2004, 11:01:07 am »

Thanks - I know you don't do support for ssi.php any longer. But can you tell me what changes to do to make the random function to a "Picture of the Day" script??

Thanx GauGau

Klaus
Logged

binocle

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
    • http://www.surf-bzh.com
Random image include?
« Reply #33 on: January 11, 2004, 12:33:34 pm »

Quote
people who post on the wrong board


I don't understand something :

I use copermine 1.1 and ssi.php have been done for this version !

Why this topic is in this board ????
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #34 on: January 11, 2004, 02:18:32 pm »

ssi.php should work with all versions since 1.1.0
If we'd put the topic into the cpg1.1.x support board, most users running cpg1.2 wouldn't notice it.

GauGau
Logged

khm1972

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
    • http://www.markussens.dk
ssi.php - problem with open link in frames
« Reply #35 on: January 13, 2004, 10:21:51 pm »

Hi

I know the ssi version in Mods is not supported any longer. But still, can any one tell me why I can't open the link in the intended frame. Statistics and the printing of the random image are working perfectly - but when I use one of GauGau examples (open in your_frame_name) and write the name of my frame "main"- print cpg_random(1,1,1,12,1,"main"); - it just opends as if I typed "_parent".

I'm using version 1.2.1 (standalone).

Please - anyone?????  :shock:
Klaus / Copenhagen
Logged

Celaine

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
    • http://celaine.com
Random image include?
« Reply #36 on: January 16, 2004, 03:44:33 am »

Forgive me for being dense...I am very new to php. I tried using the ssi.php deal to show last uploaded within my invision board, with no success. I didn't get any error...nothing happened at all. I am sure this is due to some stupid error on my part.

I did upload ssi.php to my coppermine directory, and did my best at following the directions in the readme.
Logged
best...

Christine

gmarik

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Random image include?
« Reply #37 on: January 17, 2004, 02:41:37 pm »

so

<?php
print cpg_thumb(0,0,1,"",1);
?>

will work even in vb3?
Logged
webmaxtor.com

dale

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 41
    • http://club.storm-riders.org
Random image include?
« Reply #38 on: January 17, 2004, 08:06:53 pm »

Celaine,

This didn't work with my Invision board either. Although it works on its own and in other places on my site. I think it has something to do with the fact that I was adding it to the template. And the templates in invision are strange. I have had other scripts i couldn't get to work with invision. However I have gotten IFrames to work. But I'm just a PHP kid too.
Logged
Im not a complete idiot... Some parts are missing.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Random image include?
« Reply #39 on: January 17, 2004, 09:53:35 pm »

I have no idea of the vbulletin template engine, so I can't tell...
If vbulletin templates work similarly to other bbs template systems, this will not work.

GauGau
Logged
Pages: 1 [2] 3 4 5 6 ... 9   Go Up
 

Page created in 0.094 seconds with 20 queries.