1 (edited by wickerman 2007-01-05 04:59)

Topic: extern.php not working anymore :(

Hi guys, I work for a radio station as a webmaster. If you check this link : http://www.klsu.fm/forum/extern.php?act … mp;show=10

top 10 most recently updated threads shows up. But, when I "inlcude" it inside our main home webpage, it doesn't show up anymore. It used to show up before, but suddenly it does no more. Even if I create a new blank .php file and include that above extern link, nothing shows up anymore. Am I missing something?

Edit: I'm running 1.2.12

Any help is appreciated! Thanks in advance smile

2

Re: extern.php not working anymore :(

Maybe this is a similar situation?

http://punbb.org/forums/viewtopic.php?id=14244

Re: extern.php not working anymore :(

Thanks a lot, its working now smile

Re: extern.php not working anymore :(

I'm glad that my post helped you but it still puzzles me why it happened to either of us!

I shouldn't talk while its working or I will jinx myself! LOL

Re: extern.php not working anymore :(

Remote URL includes were disabled on your server tongue

6 (edited by artoodetoo 2007-03-22 12:23)

Re: extern.php not working anymore :(

If remote URL includes were disabled on your server but your frontpage and forum on the same site, you can include extern directly without 'http://...':

in FRONTPAGE script:

$_GET['action'] = 'active';
$_GET['show'] = '10';
include PUN_ROOT.'extern.php';

If PUN_ROOT constant is not defined on your frontpage script, modify last line to './forum/extern.php' or './extern.php' as you need.

But, If PUN_ROOT constant is already defined, there is an error "Constant PUN_ROOT already defined in ...extern.php ..."

To fix it open EXTERN.PHP, find this

define('PUN_ROOT', './');

and add BEFORE it

if (!defined('PUN_ROOT'))
{

then find

    require PUN_ROOT.'cache/cache_config.php';
}

and add AFTER it

}

Now your extern.php will work as standalone script and as included script!

DigitalOcean: VPS from $5/mon. Get $10 bonus!.

Re: extern.php not working anymore :(

How do I make it work if I would like to use artoodetoo's method to display most recent post and plus new post from different fid.

the error I've got: Fatal error: Cannot redeclare escape_cdata() (previously declared in path/to/extern.php:163)

thanks.