1 (edited by paul_w 2005-01-05 03:18)

Topic: direct footer.php error?

Hi,
Im new to this forum and just getting used to PunBB. Its good stuff.
However, i got my apache server loaded and working with PHP and MySql running fine. Then loaded PunBB and all is working great.
The thing is, just while testing the system for kicks, i found that if i try to access footer.php directly from a browser, ie. not from any other calling page or script, i get the following errors:

------
Notice: Undefined variable: tpl_main in C:\Users\html\p\pcomp\upload\footer.php on line 27
Notice: ob_end_clean(): failed to delete buffer. No buffer to delete. in C:\Users\html\p\pcomp\upload\footer.php on line 28
Fatal error: Call to a member function on a non-object in C:\Users\html\p\pcomp\upload\footer.php on line 216
------

Now why i am worried about this is because it shows my server path to the root folder. A possible security problem?
Dont worry, its a local server, not on line, so dont bother trying to hack it!

Some info:
Apache 2.0.52 server
PHP 4.1
MySql 4.1.8
PunBB 1.1.5
Windows Xp.

Any help/info/enlightenment would be well received.

Thanks
Paul. W

Re: direct footer.php error?

I'm on it.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: direct footer.php error?

Fixed.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: direct footer.php error?

Rickard wrote:

Fixed.

That was quick.

Is there anything i can do here to fix this, or will i need to download an update?

Many thanks...

Re: direct footer.php error?

I meant I fixed it in 1.2 (which will be released anytime now). You can fix it yourself by adding:

// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
    exit;

at the top of footer.php.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: direct footer.php error?

Thanks.