Web Template PHP Error's - Scripts listed inside

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • priestyuk
    New Member
    • Aug 2007
    • 7

    #1

    Web Template PHP Error's - Scripts listed inside

    Hi everyone: D,
    I recently purchased a very smart and ‘expensive’ template from [REMOVED --pbmods].

    You have to install it on your site etc putting in your mysql details, e-mail address, license key etc. So far everything went to plan. Installed perfect. But now it’s running I am getting a list of these messages on my site (www.illuminati-gaming.co.uk):

    Brace yourself:

    Notice: Use of undefined constant host - assumed 'host' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 7

    Notice: Use of undefined constant user - assumed 'user' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 8

    Notice: Use of undefined constant pass - assumed 'pass' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 9

    Notice: Use of undefined constant db - assumed 'db' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 10

    Notice: Use of undefined constant host - assumed 'host' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 7

    Notice: Use of undefined constant user - assumed 'user' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 8

    Notice: Use of undefined constant pass - assumed 'pass' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 9

    Notice: Use of undefined constant db - assumed 'db' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 10

    Notice: Use of undefined constant login - assumed 'login' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant index - assumed 'index' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant news - assumed 'news' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant roster - assumed 'roster' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant links - assumed 'links' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant leagues - assumed 'leagues' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant matches - assumed 'matches' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant faq - assumed 'faq' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant sponsors - assumed 'sponsors' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant downloads - assumed 'downloads' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant settings - assumed 'settings' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant changepass - assumed 'changepass' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant admins - assumed 'admins' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Use of undefined constant config - assumed 'config' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

    Notice: Undefined index: uniqueid in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php on line 0

    Warning: Cannot modify header information - headers already sent by (output started at /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php:0) in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php on line 0
    This is a major pain in the back side as its plastered everywhere. Could someone please aid me and point me in the way of fixing this problem. Helping me get my template running the way it should be: D

    PHP info can be found on my site under this link: www.illuminati-gaming.co.uk/phpinfo.php
    Hosting company: [REMOVED-ajaxrand]


    Copy of php code taken from db.inc.php (I have masked passwords etc with ****)

    [PHP]<?php
    // Setup Database Connection Variables.
    // Make Sure Database Exists.
    // And User Information is Correct.

    $dbinfo = array();
    $dbinfo[host] = "mysql11.stream line.net";
    $dbinfo[user] = "********";
    $dbinfo[pass] = "********";
    $dbinfo[db] = "********";
    if ($dbinfo) {
    $connection = @mysql_connect ($dbinfo[host], $dbinfo[user], $dbinfo[pass]);
    if ($connection) {
    @mysql_select_d b ($dbinfo[db]);
    } else {
    echo "Unable to connect to database";
    exit;
    }
    } else {
    echo "You need to setup your mysql information";
    }

    $license="***** ********";

    ?>[/PHP]

    Copy of adminsm/config.inc.php

    [PHP]<?php //00393
    // Copyright Surreal-Media - www.Surreal-Media.com -
    if(!extension_l oaded('ionCube Loader'))
    {
    $__oc=strtolowe r(substr(php_un ame(),0,3));
    $__ln='/ioncube/ioncube_loader_ '.
    $__oc.'_'.subst r(phpversion(), 0,3).(($__oc==' win')?'.dll':'. so');
    $__oid=$__id=re alpath(ini_get( 'extension_dir' ));
    $__here=dirname (__FILE__);
    if(strlen($__id )>1&&$__id[1]==':')
    {
    $__id=str_repla ce('\\','/',substr($__id, 2));
    $__here=str_rep lace('\\','/',substr($__her e,2));
    }
    $__rd=str_repea t('/..',substr_coun t($__id,'/')).$__here.'/';$__i=strlen($ __rd);
    while($__i--)
    {
    if($__rd[$__i]=='/')
    {
    $__lp=substr($_ _rd,0,$__i).$__ ln;
    if(file_exists( $__oid.$__lp))
    {
    $__ln=$__lp;
    break;
    }
    }
    }
    @dl($__ln);
    }
    else{
    die('The file '.__FILE__." is corrupted.\n");
    }
    if(function_exi sts('_il_exec') )
    {
    return _il_exec();
    }
    echo('Site error: the file <b>'.__FILE__.' </b> requires the ionCube PHP Loader '.basename($__l n).' to be installed by the site administrator.' );exit(199);
    ?>
    4+oV5CZ1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Ji mLWgub3Uvp/nNWUYgx/n0e+8H7DVWGKwx5 fdenQTlB
    iK2WUff1ClpyAqA +/45rsZfLPfhNiwCH v7eaWzpW/ViOn0+VOeLfa5HR 9A18MVBE9oe0agA 5JFsa
    soKRxkjoWA8XBBO EHqLkq0m/wP3n4zlvS4FVDzC W8qIJ5QRwmD2YWq 4kjRpEyLennszoJ TyraWvI
    ifZuM+s2tCMnKrc nx6Kjq3J49ocTDW V+W2pH3GswDwBws NOLaSbYVmxvPH33 QQSPTSpG8EL9U48 x
    qasGaLWJsM1V3M/6IfQ5Lsuutq58ys 3qZrzsDCaQIhMwn otraZFUiBMV+lzv ggLyXJ/MLCKJBFtP
    AqzllOcFzvkSCnk SGWUnsAIDUH9AoZ 5+AV6bgQ7ayGvV9 2f8BZysyKdwAuDK qa2tEs92tipae+1 Y
    K7Z4IYIDUJHTM2D J/n2Sy0Mz8/jV01ZhFnK9cNRdD JrepMJKTgdaysRn O8Fe8289xUzXdQr k0n5e
    m57UjVV8SLqG7Nw nSENwAQgVJYv2CW 8LWM6SG8ucTn8Hb uMdomInI+0vYljG ISMajX3yTszScmx C
    J+fZ8ztFcMLoTLJ ERBnujlnkwUg08U Kv6o3t/oRgwUgFIdOfGrZM xwPhafz59OCoGzR 5YZFH2N6I
    M0IBrfSxNqcOkIs ZFOYfeDMlSVdJdo DfEFD7XMz6qy7Yw XBeLsw7ekrN4yzW//CzTUnnaN/OwRUx
    wW8Yd47o/gz7JqcSdY6Mi98F Ri+oGqseY5Yiftr R5I3eaFXtK99okk MDepfWcuuvH5+3b pR4nCpk
    e891NOe9N7cVc27 gUB8THwW/qggag6Br+Ce5ZVZ bPBAXtdhHrmreUc cZrUrKrL9D8HLwe HVopqQt
    26ABknvWw3a=[/PHP]

    If you require any more information to help find the problem I am willing to do so, please either e-mail me or reply on here.

    Many thanks for taking your time out to read this topic and post, I look forward to hearing from you.
    Last edited by ak1dnar; Aug 22 '07, 05:04 AM. Reason: Hosting Company URL Not Require for Question - Its like a Advertisement
  • jx2
    New Member
    • Feb 2007
    • 228

    #2
    well, i have to ask - is everything working properly?
    are you an administrator of the server or is it hosted server?

    if every thing works properly and you can change php.ini
    you can find this line in php.ini(php configuration file):

    error_reporting = E_ALL

    and change to :
    error_reporting = E_ALL & ~E_NOTICE

    that will get rid of the text you see on the screen but it wont get rid of potencial error in your code

    unfortunatly we cant help you with the code as it seems to be protected ( pbmods will tell you more about it :-)

    this notice is rised when variable is not defined (it used before its given any value) sometimes programmer are to lazy to define it and let it be as it is(that means zero)
    well you can also try to define them if you know what they are for

    of course its might be something wrong with your configuration

    well i didnt help much ...i know

    regards
    jx2

    Comment

    • jx2
      New Member
      • Feb 2007
      • 228

      #3
      i overlooked one thing do you see those @
      [php]<?php
      // Setup Database Connection Variables.
      // Make Sure Database Exists.
      // And User Information is Correct.

      $dbinfo = array();
      $dbinfo[host] = "mysql11.stream line.net";
      $dbinfo[user] = "********";
      $dbinfo[pass] = "********";
      $dbinfo[db] = "********";
      if ($dbinfo) {


      //=============== =====here =============== =============== =
      $connection = @mysql_connect ($dbinfo[host], $dbinfo[user], $dbinfo[pass]);
      if ($connection) {

      //=============== ====== and here =============== ============
      @mysql_select_d b ($dbinfo[db]);
      } else {
      echo "Unable to connect to database";
      exit;
      }
      } else {
      echo "You need to setup your mysql information";
      }

      $license="***** ********";

      ?>[/php]
      you can try to remove them and youll see what happen
      (more errors might show - that might let you know whats wrong)

      @ - adding it in front of the function hides errors (adding it its bad - we wanna know if there is any error)

      regards #jx2

      Comment

      • pbmods
        Recognized Expert Expert
        • Apr 2007
        • 5821

        #4
        Heya, priestyuk. Welcome to TSDN!

        You're getting these warnings because none of the array indexes are quoted.

        For example:
        [code=php]
        $dbinfo[host] = "mysql11.stream line.net";
        [/code]

        What's happening here is that PHP is looking for a constant named 'host' before it decides that you really meant to use the literal 'host'.

        To get rid of these warnings, you'll need to quote all your array indexes.

        For example:
        [code=php]
        $dbinfo['host'] = "mysql11.stream line.net";
        [/code]

        Comment

        • jx2
          New Member
          • Feb 2007
          • 228

          #5
          Originally posted by pbmods
          You're getting these warnings because none of the array indexes are quoted.

          For example:
          [code=php]
          $dbinfo[host] = "mysql11.stream line.net";
          [/code]
          pbmods - you rock man :-)
          how could i overlooked that? ;-)

          Comment

          • priestyuk
            New Member
            • Aug 2007
            • 7

            #6
            JX2 & PB Mod's thanks for your help so far. I done what you said to do and edited the fields on db.inc.php and that worked great. Can you advise on the next error's given. If you need me to post php scripts that are giving the errors I can.

            I await your answer's knowble one :D

            PS I dont have access to php.ini as it is locked by hosts :S

            I have posted /adminsm/config.inc.php already but I can post others if needs be.

            Comment

            • pbmods
              Recognized Expert Expert
              • Apr 2007
              • 5821

              #7
              Heya, Priestyuk.

              Originally posted by priestyuk
              Notice: Undefined index: uniqueid in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php on line 0

              Warning: Cannot modify header information - headers already sent by (output started at /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php:0) in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php on line 0
              You're talking about these ones, right?

              The second one will go away as soon as you fix the first one.

              We'll have to look at func.inc.php, but I'd rather not look at the whole thing; that would just flood the page. Instead, I'd like to see where this 'uniqueid' index is in that file.

              Comment

              • priestyuk
                New Member
                • Aug 2007
                • 7

                #8
                'uniqueid' index is in that file.

                --------------------------------------------------------------------------------

                Please can you elabrate :)

                Comment

                • priestyuk
                  New Member
                  • Aug 2007
                  • 7

                  #9
                  I have attached func.inc.php (compressed) for you to look at :)
                  Attached Files

                  Comment

                  • pbmods
                    Recognized Expert Expert
                    • Apr 2007
                    • 5821

                    #10
                    Heya, Priestyuk.

                    Originally posted by priestyuk
                    'uniqueid' index is in that file.

                    --------------------------------------------------------------------------------

                    Please can you elabrate :)
                    I'm guessing that func.inc.php is at least a few hundred lines long, which is TMI in its purest form. Search for 'uniqueid' in that file and post back where it occurs so that we can look at it in context.

                    What's going on is somewhere in func.inc.php, a function is trying to access the 'uniqueid' index of an array, but in that array, there is no element with that index.

                    E.g.,[code=php]if($array['uniqueid']) {[/code]

                    Once we find it, there should be a simple fix for it.

                    Comment

                    • priestyuk
                      New Member
                      • Aug 2007
                      • 7

                      #11
                      Originally posted by pbmods
                      Heya, Priestyuk.



                      I'm guessing that func.inc.php is at least a few hundred lines long, which is TMI in its purest form. Search for 'uniqueid' in that file and post back where it occurs so that we can look at it in context.

                      What's going on is somewhere in func.inc.php, a function is trying to access the 'uniqueid' index of an array, but in that array, there is no element with that index.

                      E.g.,[code=php]if($array['uniqueid']) {[/code]

                      Once we find it, there should be a simple fix for it.
                      I dont understand im really sorry see above your post I have attached func.inc.php

                      Thanks for your speedy help your are jesus of php :D

                      Comment

                      • jx2
                        New Member
                        • Feb 2007
                        • 228

                        #12
                        Originally posted by priestyuk
                        I dont understand im really sorry see above your post I have attached func.inc.php

                        Thanks for your speedy help your are jesus of php :D
                        well im afraid we cant help you (at least not me) the Code is protected

                        pbmods? can we see code somehow?
                        however i dont see errors on your page there are only notices
                        try to use (at the beginning of your script(s) )
                        [code=php]
                        error_reporting (E_ALL ^ E_NOTICE);
                        [/code]

                        it shoud get rid of the bad staff from your page test everything afterwards
                        you might be lucky ..
                        if you are not ...well ...

                        jx2
                        Last edited by pbmods; Aug 21 '07, 09:37 PM. Reason: Added CODE tags. JX2, I'm shocked!

                        Comment

                        • pbmods
                          Recognized Expert Expert
                          • Apr 2007
                          • 5821

                          #13
                          Yeah. That's been encoded. There's no getting at it.

                          Ah well. As JX2 noted, you can simply tell PHP to ignore those notices.

                          Comment

                          • priestyuk
                            New Member
                            • Aug 2007
                            • 7

                            #14
                            What can I ask my host provider and what shall I ask the template maker to make this template run as smooth as possible?

                            Thanks again

                            Comment

                            • jx2
                              New Member
                              • Feb 2007
                              • 228

                              #15
                              ...You have to install it on your site etc putting in your mysql details, e-mail address, license key etc.
                              well this make me think that you didnt setup everything what is needed in mysql setup ... try to setup those values you get noticed about...

                              Originally posted by priestyuk
                              What can I ask my host provider and what shall I ask the template maker to make this template run as smooth as possible?

                              Thanks again
                              host provider can change the error reporting level or you can do it yourself as i mentioned above by using error_reporting () fuction(but that not necesserly solve your problem

                              template maker will know (i hope) whats that about (they also might have some FAQ on their website)

                              regards
                              jx2

                              Comment

                              Working...