Advanced search  

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

Pages: [1]   Go Down

Author Topic: [Solved]: Custom pages outside of coppermine root  (Read 2041 times)

0 Members and 1 Guest are viewing this topic.

ljmonaco

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 11
[Solved]: Custom pages outside of coppermine root
« 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:

Code: [Select]
<?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:

Code: [Select]
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...

« Last Edit: July 04, 2008, 06:54:49 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Custom pages outside of coppermine root
« Reply #1 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
Logged

ljmonaco

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 11
Re: Custom pages outside of coppermine root
« Reply #2 on: July 04, 2008, 06:44:47 pm »

Thanks much for the quick reply.  Sorry I missed the previous post.

Coppermine Rules!

Logged
Pages: [1]   Go Up
 

Page created in 0.048 seconds with 17 queries.