TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 777
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 91
  • Total: 91

Can't use PHP or HTML

Started by mattb, April 07, 2010, 04:24:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mattb

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?

IchBin

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.

mattb

im using smf 2.0 RC3 and tp beta 5 so when its fixed will i have to update? meaning re-installing it.

IchBin

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.