include in php page include in php page
 

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]

Main Menu

include in php page

Started by falieson, September 18, 2006, 08:03:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

falieson

I would like to use the php command include to integrate cpg into my website, what edits do I need to make so that I no longer encounter the errors:
Warning: main(include/debugger.inc.php) [function.main]: failed to open stream: No such file or directory in /home2/w3b4dm1n/public_html/new/cpg/include/init.inc.php on line 26

Fatal error: main() [function.require]: Failed opening required 'include/debugger.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/w3b4dm1n/public_html/new/cpg/include/init.inc.php on line 26

Joachim Müller

That's not possible. Coppermine doesn't work that way, it can not be integrated into an existing website using the PHP commands "include" or "require". Instead, create a custom theme that matches the look of your site.
Not related to bridging, moving accordingly. Please read the docs and the sticky threads on the sub-board I moved your thread to.

falieson

Perhaps then it should be a requested feature, gallery2 has a seperate php file which is 'include'able: gallery2embed.php
A similar file would be pretty useful for cpg!

falieson

well I really dislike when people say something can't be done - so perhaps this is something that should be thrown in the FAQ.
What you can do is simply make a nice little iframe, my code:
<IFRAME src="cpg/index.php" width="550" height="713">
</IFRAME>


Tada =)
http://cpsigmapi.com/new/index.php?show=photo

Joachim Müller

Quote from: falieson on September 18, 2006, 09:54:33 AMwell I really dislike when people say something can't be done - so perhaps this is something that should be thrown in the FAQ.
You asked about Coppermine being integrated using PHP includes, and my answer was accordingly. Of course you can use frames or iframes. Another technology that will of course work (with severe drawbacks that are inherent to the frames technology in itself).

falieson

meh - I knew include wouldn't work cause of session data but I needed to throw it in their best way I could - and for this making a single iframe works perfect. =)

Joachim Müller

No, session data are not the reason. Anyway, glad this works for you.

frank_gayer

Hallo,

i`m interested to know how CPG works on an existing website. You are using an iframe. Can you tell me how is the solution for this ?