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] 7 8 9   Go Down

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

0 Members and 1 Guest are viewing this topic.

foei

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Random image include?
« Reply #100 on: July 25, 2004, 06:00:23 pm »

I think script is good work. I just mod show picture on my main page don't gallery page to show last pic, random pic,Statistics Of Galleries and miage of the week.It ok

Not work safe
http://heretheporn.com
« Last Edit: July 25, 2004, 07:15:19 pm by Nibbler »
Logged

punjabicity

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Random image include?
« Reply #101 on: August 03, 2004, 12:12:02 am »

im getting the following errors. please help me

Warning: main(): open_basedir restriction in effect. File(/home/httpd/vhosts/punjabicity.co.uk/httpdocs/mmi/ssi.php) is not within the allowed path(s): (/usr/local/psa/home/vhosts/punjabicity.co.uk/httpdocs:/tmp) in /usr/local/psa/home/vhosts/punjabicity.co.uk/httpdocs/mmi/rndimage.php on line 3

Warning: main(/home/httpd/vhosts/punjabicity.co.uk/httpdocs/mmi/ssi.php): failed to open stream: Operation not permitted in /usr/local/psa/home/vhosts/punjabicity.co.uk/httpdocs/mmi/rndimage.php on line 3

Warning: main(): Failed opening '/home/httpd/vhosts/punjabicity.co.uk/httpdocs/mmi/ssi.php' for inclusion (include_path='.:/usr/local/psa/apache/lib/php') in /usr/local/psa/home/vhosts/punjabicity.co.uk/httpdocs/mmi/rndimage.php on line 3


Fatal error: Call to undefined function: cpg_thumb() in /usr/local/psa/home/vhosts/punjabicity.co.uk/httpdocs/mmi/rndimage.php on line 20
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #102 on: August 03, 2004, 08:11:52 am »

The first message tells it all: on your server, an open_basedir restriction is in place. Here's what the manual at php.net has to say about it:
Quote
open_basedir string
Limit the files that can be opened by PHP to the specified directory-tree, including the file itself. This directive is NOT affected by whether Safe Mode is turned On or Off.

When a script tries to open a file with, for example, fopen() or gzopen(), the location of the file is checked. When the file is outside the specified directory-tree, PHP will refuse to open it. All symbolic links are resolved, so it's not possible to avoid this restriction with a symlink.

The special value . indicates that the directory in which the script is stored will be used as base-directory.

Under Windows, separate the directories with a semicolon. On all other systems, separate the directories with a colon. As an Apache module, open_basedir paths from parent directories are now automatically inherited.

The restriction specified with open_basedir is actually a prefix, not a directory name. This means that "open_basedir = /dir/incl" also allows access to "/dir/include" and "/dir/incls" if they exist. When you want to restrict access to only the specified directory, end with a slash. For example: "open_basedir = /dir/incl/"

Note: Support for multiple directories was added in 3.0.7.

The default is to allow all files to be opened.
This means that you will have to contact your webhost to have this fixed.

GauGau
Logged

punjabicity

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Random image include?
« Reply #103 on: August 03, 2004, 03:50:55 pm »

thank you so much my problem is solved!

does anyone know how to make the random thumbnail size bigger?
Logged

punjabicity

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Random image include?
« Reply #104 on: August 03, 2004, 03:54:57 pm »

i would also like to put a border round the thumbnail! any ideas?
Logged

Xi_Master

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • S.V. Zwolle
Re: Random image include? Strange Problem
« Reply #105 on: August 03, 2004, 05:23:37 pm »

Ok,

After I've read most of the comments in this topic, I made it to install the -unsupported- random image script.
But when I've put the code on my site; ik get this error:
Code: [Select]
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site93/fst/var/www/html/fotoalbum/ssi.php on line 115

I've opened ssi.php and this is what line 115 has to say:
Code: [Select]
while ($row = mysql_fetch_array($result)) {

I would'nt have a clue what's wrong with it ???. I've read the manual again and decided to upload the example.php into the same dir as index.php (where i get the error message) and guess what? It works!
So the example works, but not index.php.

this is the site with the error message: www.svzwollevoetbal.nl. You can find the message on the right side
and the site with the example: www.svzwollevoetbal.nl/example.php
Logged

Xi_Master

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • S.V. Zwolle
Re: Random image include?
« Reply #106 on: August 03, 2004, 06:39:21 pm »

Well,

I've done the same thing with the random pic and it's working fine for me. So the problem is getting more strange to me now.... :-\\
Logged

punjabicity

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Random image include?
« Reply #107 on: August 03, 2004, 08:06:07 pm »

i would like to put a border round the thumbnail! any ideas?
Logged

Xi_Master

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • S.V. Zwolle
Re: Random image include?
« Reply #108 on: August 03, 2004, 10:57:46 pm »

Come on man, it's not that hard to put a border around ur thumbs. And asking the same question twice does not help to get it answered.
Put the php-code in a table and make it 100px wide and there u have ur border....
Logged

punjabicity

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Random image include?
« Reply #109 on: August 04, 2004, 11:26:32 am »

yes I have tried that but it doesn't work  ???

anyway another thing is when you click on the random pic it goes to that wallpaper. does anyone know a way that when you click on it it goes to that wallpaper album instead of the actual wallpaper.

please can someone help with this
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #110 on: August 04, 2004, 01:10:29 pm »

this thread deals with the random image mod, nothing else. Do not try to hijack this thread!

GauGau
Logged

herbie

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Random image include?
« Reply #111 on: August 25, 2004, 06:48:14 am »

Guys, I'm greener than Granny Smith at this. I'm running 1.3 and tried the ssi mod, learned the hard way that it has to work on the same server as coppermine is running.
I tried a sample page in a test directory in coppermine:

<html>
<? include_once("http://sulu.maxit.net/coppermine/ssi.php"); ?>
This is a test page only.
<br>
<br>
<br>
<? print cpg_random(); ?>

<br>Did it work?
</html>

It returns the test page only, the rest is blank. Teach me, O great masters. I'd like to put a random thumb w link onto my main website, which resides on a far away server.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #112 on: August 25, 2004, 07:33:43 am »

If your remote server allows includes to remote servers (allow_url_fopen, see http://www.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen ), this should work as well (not tested though).

GauGau
Logged

bpm32

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Random image include?
« Reply #113 on: September 08, 2004, 02:03:27 am »

I've read and reread this threat multiple times.  If this is not an allowable post, please remove it.

I have put in place the ssi mod after having read the warnings, etc.  I extend my sincerest gratitude to those who have worked so hard to create this script and put up with such dealings as I'm about to present.

The script works beautifully for me on pages ending in .htm, .html, or .php.  However, my site uses .shtml in order to employ some ssi files for quicker menu editing, as well as a few news feeds from our forums. 

As long as my site files end in .shtml, I cannot get this script to work.  As soon as I change the ending to .htm, .html, or .php, the script works perfectly, but then I lose my menus and news feeds.

Is it possible to get both working simultaneously?

I appreciate any guidance, whether it's direct or via other threads or offsite links.  I have searched, but cannot find anything so specific.

I thank you for your time,

Brian
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #114 on: September 08, 2004, 08:51:28 am »

This has been requested in the past: shtml usually means you have true "server side includes" working on that page. In fact the ssi-mod is named inacurately, as it isn't using the server side includes technology, but plain php includes. When I started ssi-mod I had in mind to make it work for true ssi as well, but I failed (one reason for this being the fact that I didn't have access to a webserver that had ssi at that time), so I gave up. Basic answer is: in theory, it is possible, but it requires someone with know-how to look into this. I won't be that one, as I have abandoned this mod a long time ago, sorry. Currently, the mod will not work on ssi-enabled pages, so the short answer to your question is: the mod will not work for shtml pages.

Joachim
Logged

erezcarmel

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Showing original pic and not the thumbnail (using SSI mod ofcourse)?
« Reply #115 on: September 11, 2004, 10:12:40 pm »

How can I show the original picture and not only the thumbnail?
Logged

bbbbug

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Random image include?
« Reply #116 on: September 17, 2004, 02:45:58 pm »

does SSI.php work with 1.3.2?
Logged
(http://www.mytfls.com/photo/myphoto.php)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #117 on: September 17, 2004, 11:52:49 pm »

yes
Logged

bbbbug

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Random image include? [Suggestion]
« Reply #118 on: September 29, 2004, 01:25:19 pm »

I like to use Random image include in this way:

<SCRIPT language=JavaScript src="/randompics.js"></SCRIPT>

Can anyone develope this Add-Ons? I need it so crazily~~~ ::) ::)
Logged
(http://www.mytfls.com/photo/myphoto.php)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Random image include?
« Reply #119 on: September 30, 2004, 07:29:13 am »

requests for new mods shouldn't go into existing mods threads. JavaScript is client sided, there's little chance you will get this to work.

Joachim
Logged
Pages: 1 2 3 4 5 [6] 7 8 9   Go Up
 

Page created in 0.023 seconds with 20 queries.