php for page php for page
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

php for page

Started by debragrant, April 08, 2007, 12:52:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

debragrant

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?


vuud

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
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

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

vuud

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.






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

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

vuud

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.
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

images.php need to be in the cmpfetch folder?

vuud

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";

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