SimplePortal

Support => English Support => Topic started by: Deathshot on March 27, 2014, 02:36:35 PM

Title: [SOLVED] PHP Blocks error
Post by: Deathshot on March 27, 2014, 02:36:35 PM
* Using SMF version 2.0.7
* SimplePortal version 2.3.5

Problem:
When creating custom PHP Blocks I get an error: "Syntax error in block code. Please check the code.". When trying to do just: echo 'Hello World';
The preview works and I can see what I have done but cannot create the block.

See screenshots below!

Screenshots:
(http://i.imgur.com/o4W4VnB.png)

(http://i.imgur.com/dfvA4H0.png)

Question:
Is this a problem of what I have done? Or is this a bug in SimplePortal. Because the Hello World should work everywhere in php.

EDIT:
Same problem when creating PHP pages.
Title: Re: PHP Blocks error
Post by: [SiNaN] on March 28, 2014, 01:39:41 PM
Hello and welcome to SimplePortal!

We use quite a different method to try to make sure PHP blocks and pages do not cause parse and database errors. Although it works pretty well, sometimes it does not, due to forum root directory not being writable.

You either can make sure that forum root directory is writable or disable this extra check by checking Admin > SimplePortal > Configuration > General Settings > Disable PHP Validation option.
Title: Re: PHP Blocks error
Post by: Deathshot on March 28, 2014, 08:21:37 PM
Thank you!
I'm looking forward to working with SimplePortal as a portal to my forum and customizing it to my liking. I thought this looked most promising of all the other portals I tried.

I saw that option but didn't think it would help me with this problem... I was wrong should have tested. I thank you for your help!
We might see each other on the forum again!
SimplePortal 2.3.8 © 2008-2024, SimplePortal