SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: CapadY on November 20, 2011, 05:43:05 AM

Title: SP 2.3.4 PHP-block problems
Post by: CapadY on November 20, 2011, 05:43:05 AM
I keep on having problems with PHP-blocks, using them it will always give a syntax error.

I copied code from 2.3.3 to 2.3.4 and it gave a syntax error.

even very simple code as next will give a syntax error:

Code: [Select]
<?php
include_once("http://www.mysite.nl/chat/info.php");
?>

Title: Re: SP 2.3.4 PHP-block problems
Post by: Sapinho® on November 20, 2011, 05:16:04 PM
in the  php block u not need the tag <?php   ----- ?>

try this

Code: [Select]
include_once("http://www.mysite.nl/chat/info.php");
Title: Re: SP 2.3.4 PHP-block problems
Post by: [SiNaN] on November 21, 2011, 01:20:35 PM
I keep on having problems with PHP-blocks, using them it will always give a syntax error.

I copied code from 2.3.3 to 2.3.4 and it gave a syntax error.

Can you please apply this change and try adding the same block again?

Subs-PortalAdmin.php

Code: (Find) [Select]
if ($result === false)
Code: (Replace) [Select]
var_dump($result);
die();
if ($result === false)

Then copy the page source (HTML contents) of the page here. After that, you can take the change back.

in the  php block u not need the tag <?php   ----- ?>

That should not cause problems. SimplePortal will take care of opening tags.
Title: Re: SP 2.3.4 PHP-block problems
Post by: spuds on November 24, 2011, 11:16:53 PM
I had a problem with this as well, can't remember the error but it might have been syntax.  Anyway in my case it was because the test install I was running was protected with an .htpasswd setup, so SP could not get the test file it created to test the code.  Once I took down the password protection it ran fine.
Title: Re: SP 2.3.4 PHP-block problems
Post by: [SiNaN] on November 25, 2011, 03:28:30 PM
Well, it's the limitation of the implementation we have. Not sure if we can do anything about it.
SimplePortal 2.3.8 © 2008-2024, SimplePortal