Including PHP in pages

Things you don't like, this is not a bug report or wish list, just those things big or small that drive you mad.

Including PHP in pages

Postby xdpirate » Tue Nov 10, 2009 3:58 pm

Hai thar.

I run my own web server, and to put less strain on my MySQL installation, I use RazorCMS to manage my site, and it works great, apart from one little thing.

My question is:
Would it be possible to use include() instead of just getting all the text from the flatfiles, parsing it, and then printing it? I would like to include PHP code in my pages.

Sincerely,
Lars-C. G. Bakken
xdpirate
 
Posts: 2
Joined: Tue Nov 10, 2009 3:54 pm

Re: Including PHP in pages

Postby markfoz » Tue Nov 10, 2009 11:29 pm

Yes it can seem a pain this, but it is for good reason...

Any wysiwyg editor that allows html to be created for a page ie ANY cms which uses tinyMCE, FCK editor or any of the other javascript editors to create pages will always strip out php iframe and script tags on save for security anyway to stop malicious script injection and this is also why razor works as it does by first parsing the data and removing anything harmful. Creating an in-page blade pack is simple enough with just a little code knowledge.

You can still use php include() in your outer template file so far as I know. Or even file get contents(). A hacky way is to write a simple inpage blade pack and include the required functionality in a separate file which loads an iframe in the page - see the mods section.

Im no coder but i found it simple enough. One of the great things about razor is its security and this is one of the key importances of its creator - it is cleverly thought out even stopping access if an incorrect password is entered too many times which i found out to my amusement when i forgot a password as all attempts are logged. So this prevents brute force attacks also.

Although not being able to include() script so simply does seem a right pain, it is this for this good reasoning. Allowing php include in the page editor can be security risk for this reason it will probably not change.
markfoz
 
Posts: 86
Joined: Sun Aug 09, 2009 2:41 pm

Re: Including PHP in pages

Postby xdpirate » Fri Nov 13, 2009 2:04 am

Security is not a concern.

I want to include PHP in my pages. My question was, and still is: How can I do that?
xdpirate
 
Posts: 2
Joined: Tue Nov 10, 2009 3:54 pm

Re: Including PHP in pages

Postby smiffy6969 » Fri Nov 13, 2009 8:55 am

Security is not a concern.


Thats a brave statement, so his answer still stands buddy, If you want an insecure version of a CMS then there is plenty of other systems, so please respect that we require a system that is secure, if you want to use razor insecurely thats your choice but also your effort as I will not waste time doing this.

My question was, and still is:


statements like that will only rub peoples backs up, ask yourself this, if you rub someones back up, are they likely to help you at all??.

If you did not mean for it to be took that way, maybe you should think more before posting.

Thanks markfoz for taking the effort to answer.

smiffy
on a long enough time line, everyones survival rate drops to zero... [ed norton - fight club]
http://www.razorcms.co.uk
http://www.mis-limited.com
smiffy6969
Site Admin
 
Posts: 1372
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK


Return to Man that sucks

Who is online

Users browsing this forum: No registered users and 1 guest