coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: jagaur on September 18, 2007, 03:10:58 AM

Title: getting errors trying to include a coppermine within a page
Post by: jagaur on September 18, 2007, 03:10:58 AM
Hi,
I'm pretty new to using php and coppermine, but I seem to have managed to get coppermine installed and running if I go directly to the url of the index.php file (www.canadianpokerbonus.ca/cpg1412/index.htm)
This loads no problem and allows me to upload and browse photos.

The problems start when I try to use the below command to add coppermine into my html page:

<?php
require 'cpg1412/index.php';
?>

when I go to the url www.canadianpokerbonus.ca/babes.php I get the error message:

Warning: main(include/debugger.inc.php): failed to open stream: No such file or directory in /home/content/html/cpg1412/include/init.inc.php on line 26

Fatal error: main(): Failed opening required 'include/debugger.inc.php' (include_path=''.:html/cpg1412/'') in /home/content/html/cpg1412/include/init.inc.php on line 26

I think this may be caused because the php file is not in the same directory as coppermine so I guess my question is:
1.  Is it possible to run coppermine from a root php page but still keep the coppermine file structure outside of the root
or
2. is it the require command that is causing the problems

I've tried searching the forums but haven't been able to find any answers...any help you can provide would be much appreciated
Title: Re: getting errors trying to include a coppermine within a page
Post by: Joachim Müller on September 18, 2007, 07:50:56 AM
Coppermine can not be embedded into other pages using PHP's include or require command. Not related to install, moving accordingly.
Title: Re: getting errors trying to include a coppermine within a page
Post by: jagaur on September 18, 2007, 06:07:45 PM
Sorry about the location....

So if I wanted to have my url for coppermine look like www.url.ca/coppermine.php I would have to put the entire install in the root folder?

Thanks
Title: Re: getting errors trying to include a coppermine within a page
Post by: Sami on September 18, 2007, 07:23:59 PM
Yes ,
- First of all move your main site somewhere else (where ever you want!)
- Copy content of cpg1412 (files and folders) to root
- Go to config and change the url of gallery
you're done
Title: Re: getting errors trying to include a coppermine within a page
Post by: jagaur on September 18, 2007, 10:44:24 PM
Thanks...I'll give that a try
Title: Re: getting errors trying to include a coppermine within a page
Post by: Joachim Müller on September 19, 2007, 08:23:06 AM
There is no file named "coppermine.php".