TinyPortal

Development => Support => Topic started by: sportsguy on May 17, 2007, 06:08:20 PM

Title: phpbox error - searched here, scant info found. :(
Post by: sportsguy on May 17, 2007, 06:08:20 PM
I'm trying to use the phpbox to allow me to place my ad code from phpads.  Each time I enable the phpbox, I see this error:

Parse error: syntax error, unexpected '<' in /home/hfx4sale/public_html/Sources/Load.php(1735) : eval()'d code(35) : eval()'d code on line 1

Naturally, no other box will display my ad - heck, I'm not even sure if the phpbox is the right one to be using, but since the ad innvocation code is php, it seemed logical.

I found one tidbit during my search where a poster was successful by removing certain portions of the php coding - the <php? and ?> bits - everything between them stayed at it apparently worked for them - I tried it, didn't work.

Running the latest versions of TP and SMF (well, 1.1.2 of SMF).
Title: Re: phpbox error - searched here, scant info found. :(
Post by: G6Cad on May 17, 2007, 06:14:04 PM
If the code you have in the block use the <?php and ?> you need to remove them as the php block have that defines allready.
Title: Re: phpbox error - searched here, scant info found. :(
Post by: sportsguy on May 17, 2007, 06:43:31 PM
Quote from: G6â„¢ on May 17, 2007, 06:14:04 PM
If the code you have in the block use the <?php and ?> you need to remove them as the php block have that defines allready.

From my first post... ;)

QuoteI found one tidbit during my search where a poster was successful by removing certain portions of the php coding - the <php? and ?> bits - everything between them stayed at it apparently worked for them - I tried it, didn't work.
Title: Re: phpbox error - searched here, scant info found. :(
Post by: pvcblue on May 17, 2007, 06:45:46 PM
Sportsguy, it may be helpful to the codemonkeys out here if you posted the code here so they could see if there may be a error.
Title: Re: phpbox error - searched here, scant info found. :(
Post by: sportsguy on May 17, 2007, 06:46:32 PM
Figured it out!

Thinking that maybe G6 knows what they're saying, and I'm still a noob at all this, i reviewed my situation.

I never thought this would be an issue, but I had <center> tags in there hoping to center the ad in the space - they were causing the error.

Ad shows fine without them - though I hate that it's not centered, but there's got to be a way to fix that elsewhere.

Yet again, thanks G!

Excellent idea for next time pvc. ;)  Thanks. :)
Title: Re: phpbox error - searched here, scant info found. :(
Post by: Lesmond on May 17, 2007, 10:03:07 PM
try this echo '<center>'; code here echo '</center>';
Title: Re: phpbox error - searched here, scant info found. :(
Post by: sportsguy on May 17, 2007, 11:56:26 PM
Perfect!  Thanks a bunch Lesmond!  Worked like a charm. :D