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?
Quote from: debragrant 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?
Good question! Have you checked the documentation?
Or this thread.
http://forum.coppermine-gallery.net/index.php?topic=39817.0
so i added
<?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
<!--#include virtual="/gallery/cpmfetch/images.php" -->
to my html page is that right?
I don't get any images showing
Quote from: debragrant on April 08, 2007, 10:24:00 AM
so i added
<?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
<!--#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.
I get this error
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
Quote from: debragrant on April 10, 2007, 09:46:02 AM
I get this error
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.
images.php need to be in the cmpfetch folder?
Quote from: debragrant on April 10, 2007, 03:56:10 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";