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

Author Topic: php for page  (Read 6002 times)

0 Members and 1 Guest are viewing this topic.

debragrant

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 127
php for page
« on: April 08, 2007, 12:52:57 am »

I have installed and tested cftest.php and all is working fine.
What is the php code I need to add to the actual web page?

« Last Edit: April 13, 2007, 04:15:20 pm by vuud »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: php for page
« Reply #1 on: April 08, 2007, 06:15:58 am »

I have installed and tested cftest.php and all is working fine.
What is the php code I need to add to the actual web page?

Good question!  Have you checked the documentation?

Or this thread.
http://forum.coppermine-gallery.net/index.php?topic=39817.0
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

debragrant

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 127
Re: php for page
« Reply #2 on: April 08, 2007, 10:24:00 am »

so i added

Code: [Select]
<?php 
include "./gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

to a file i named images.php

i then uploaded it to gallery/cpmfetch

I added

Code: [Select]
<!--#include virtual="/gallery/cpmfetch/images.php" -->
to my html page is that right?

I don't get any images showing
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: php for page
« Reply #3 on: April 09, 2007, 12:33:14 am »

so i added

Code: [Select]
<?php 
include "./gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

to a file i named images.php

i then uploaded it to gallery/cpmfetch

I added

Code: [Select]
<!--#include virtual="/gallery/cpmfetch/images.php" -->
to my html page is that right?

I don't get any images showing

First, try running your images.php file and make sure it returns some images (does not matter if its not wrapped in HTML, you will get something).


If you do get images, then you need to make sure:

#1) Your html file processing server side includes

#2) Your virtual path is correct... you may need a . in front of the first slash.






Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

debragrant

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 127
Re: php for page
« Reply #4 on: April 10, 2007, 09:46:02 am »

I get this error

Code: [Select]
Warning: main(./gallery/cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /.../helendallimore/gallery/cpmfetch/images.php on line 2

Warning: main(./gallery/cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /.../helendallimore/gallery/cpmfetch/images.php on line 2

Warning: main() [function.include]: Failed opening './gallery/cpmfetch/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /.../helendallimore/gallery/cpmfetch/images.php on line 2

Fatal error: Cannot instantiate non-existent class: cpm in /.../helendallimore/gallery/cpmfetch/images.php on line 3
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: php for page
« Reply #5 on: April 10, 2007, 03:54:52 pm »

I get this error

Code: [Select]
Warning: main(./gallery/cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /.../helendallimore/gallery/cpmfetch/images.php on line 2

Warning: main(./gallery/cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /.../helendallimore/gallery/cpmfetch/images.php on line 2

Warning: main() [function.include]: Failed opening './gallery/cpmfetch/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /.../helendallimore/gallery/cpmfetch/images.php on line 2

Fatal error: Cannot instantiate non-existent class: cpm in /.../helendallimore/gallery/cpmfetch/images.php on line 3


Your include statement for including cpmfetch.php does not have the correct path.

images.php  needs to be able to get to it from where it is.
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

debragrant

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 127
Re: php for page
« Reply #6 on: April 10, 2007, 03:56:10 pm »

images.php need to be in the cmpfetch folder?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: php for page
« Reply #7 on: April 10, 2007, 11:06:51 pm »

images.php need to be in the cmpfetch folder?

No it does not.  But if it is...

Change the include statement to be:

include "./cpmfetch.php";

Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 21 queries.