TinyPortal

Development => Support => Topic started by: mattb on April 07, 2010, 04:24:48 PM

Title: Can't use PHP or HTML
Post by: mattb on April 07, 2010, 04:24:48 PM
hello,

i cant use php in my article or in a block

keep getting this error

Parse error: syntax error, unexpected '<' in /home/user/public_html/Sources/TPSubs.php(1731) : eval()'d code on line 1

trying to add this code

__int64 GetFriendID( const char *pszAuthID )
{
    if(!pszAuthID)
        return 0;

    int iServer = 0;
    int iAuthID = 0;

    char szAuthID[64];
    strcpy_s(szAuthID, 63, pszAuthID);

    char *szTmp = strtok(szAuthID, ":");
    while(szTmp = strtok(NULL, ":"))
    {
        char *szTmp2 = strtok(NULL, ":");
        if(szTmp2)
        {
            iServer = atoi(szTmp);
            iAuthID = atoi(szTmp2);
        }
    }

    if(iAuthID == 0)
        return 0;

    __int64 i64friendID = (__int64)iAuthID * 2;

    //Friend ID's with even numbers are the 0 auth server.
    //Friend ID's with odd numbers are the 1 auth server.
    i64friendID += 76561197960265728 + iServer;

    return i64friendID;
} 

tried adding 2 other php codes samething

why isnt it working, is it disabled?
Title: Re: Can't use PHP or HTML
Post by: IchBin on April 07, 2010, 04:34:47 PM
Could you provide us with at least some info about your setup? Can't really say what the problem is, unless you're using beta 5. There are some problems with the saving of PHP and stuff that are getting fixed.

Also, if you wouldn't mind using the bbc code tags when posting code it would be appreciated. Thanks.
Title: Re: Can't use PHP or HTML
Post by: mattb on April 07, 2010, 05:12:59 PM
im using smf 2.0 RC3 and tp beta 5 so when its fixed will i have to update? meaning re-installing it.
Title: Re: Can't use PHP or HTML
Post by: IchBin on April 07, 2010, 05:32:40 PM
I don't think so. The update should only require you to upload the files if you want to do it that way. A reinstall would do the same thing.