coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: ljmonaco on July 04, 2008, 06:35:18 PM

Title: [Solved]: Custom pages outside of coppermine root
Post by: ljmonaco on July 04, 2008, 06:35:18 PM
I have searched the forums and can't find help on this particular problem.  I get the result I'm looking for when I use the following code:

<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader(Test);
starttable('100%');
print 
'<tr>';
print 
'<td class="tableb">';
echo 
'Test';
print 
'</td>';
print 
'</tr>';
endtable();
pagefooter();
?>


Let's call this file test.php and it works fine in the following location:
/test.php

but I get "HTTP 500 Internal Server Error" when I move it outside of the root:
/test/test.php.

I've tried the following for require, but with no success:

require('/include/init.inc.php');
require('./include/init.inc.php');
require('../include/init.inc.php');
require('httpdocs/include/init.inc.php');
require('/httpdocs/include/init.inc.php');
require('/var/www/vhosts/domain.com/httpdocs/include/init.inc.php');
require('var/www/vhosts/domain.com/httpdocs/include/init.inc.php');
require('http://domain.com/include/init.inc.php');


Can someone shed some light?  Is this possible to do?

Thanks...

Title: Re: Custom pages outside of coppermine root
Post by: Nibbler on July 04, 2008, 06:38:53 PM
This was asked only a week ago.

http://forum.coppermine-gallery.net/index.php/topic,53524.0.html

Answer is to chdir() into the coppermine folder so that the include will work.

http://forum.coppermine-gallery.net/index.php/topic,33658.0.html
Title: Re: Custom pages outside of coppermine root
Post by: ljmonaco on July 04, 2008, 06:44:47 PM
Thanks much for the quick reply.  Sorry I missed the previous post.

Coppermine Rules!