Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How to disable the php part?

Quote Reply
How to disable the php part?
How can I disable the php part?
Thanks
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] How to disable the php part? In reply to
Delete page.php :)

Last edited by:

Paul: Apr 26, 2003, 5:18 AM
Quote Reply
Re: [Paul] How to disable the php part? In reply to
That's enough?
Well.. Wink
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] How to disable the php part? In reply to
delete all link to page.php from all templates HTML page.

:)

my MSN: perlchina_at_hotmail.com
Quote Reply
Re: [tsingson] How to disable the php part? In reply to
In Reply To:
delete all link to page.php from all templates HTML page.

:)

There is no need for that, cos the only references to page.php in the templates, are in the php_default folder, located in the /admin/templates folder Tongue Simply deleting page.php is enough.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] How to disable the php part? In reply to
Unfortunately not enough to delete or revoke permissions of page.php file.

Such URL on your site will unhide any of those template source codes, including all php codes there:
http://www.mysite.com/cgi-bin/lsql/page.cgi?d=1&t=default_php

So the default_php should be also deleted, or moved out from the templates dir!

I think, this may have some security risks.
Alex? What do you think about this?

I assume this is a bug.
  • Best solution would be to add an option into Admin/Setup, so to ignore the 'default_php' directory or not. By default should ignore.
  • Also an easy workaround: probably in SiteHTML.pm there should be also ignored the default_php directory (only when called from *.cgi scripts), similarly as the 'admin' and 'help' directories are ignored.
    Code:
    sub _compile {
    ...
    if ($template_set eq 'admin' or $template_set eq 'help') {
    $template_set = $CFG->{build_default_tpl} || 'default';
    }
    ...
    }

    should be:
    Code:
    sub _compile {
    ...
    if ($template_set eq 'admin' or $template_set eq 'help' or $template_set eq 'default_php') {
    $template_set = $CFG->{build_default_tpl} || 'default';
    }
    ...
    }

    Best regards,
    Webmaster33


    Paid Support
    from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
    Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...