I have started working on a torrent tracker as a small project for myself, I am not well versed in PHP, but hopefully thing will be a good learning experience for me. I am getting some errors, I'm sure its due to my lack of knowledge about the config but hopefully i can get some help here 🙂

The errors are as follows:

Notice: Undefined variable: HTTP_SERVER_VARS in C:\xampp\htdocs\include\bittorrent.php on line 32

Notice: Undefined variable: HTTP_SERVER_VARS in C:\xampp\htdocs\include\bittorrent.php on line 33

Notice: Use of undefined constant UC_USER - assumed 'UC_USER' in C:\xampp\htdocs\include\global.php on line 453

Notice: Use of undefined constant UC_POWER_USER - assumed 'UC_POWER_USER' in C:\xampp\htdocs\include\global.php on line 454

Notice: Use of undefined constant UC_VIP - assumed 'UC_VIP' in C:\xampp\htdocs\include\global.php on line 455

Notice: Use of undefined constant UC_UPLOADER - assumed 'UC_UPLOADER' in C:\xampp\htdocs\include\global.php on line 456

Notice: Use of undefined constant UC_MODERATOR - assumed 'UC_MODERATOR' in C:\xampp\htdocs\include\global.php on line 457

Notice: Use of undefined constant UC_ADMINISTRATOR - assumed 'UC_ADMINISTRATOR' in C:\xampp\htdocs\include\global.php on line 458

Notice: Use of undefined constant UC_SYSOP - assumed 'UC_SYSOP' in C:\xampp\htdocs\include\global.php on line 459

The problematic files have been zipped and attached.

Thank-you in advance!

    I should probably mention that I uploaded the unmodified copies of the files, because I probably messed them up beyond recognition.

      You probably aren't going to find a lot of support on the forum here because your questions are easy to find answers for.

      A Notice isn't a fatal error. You can google the errors to find out why you are getting them. It looks like mostly you are trying to access things that are depreciated (still work but wont in the future) or things that haven't been assigned a value yet.

      For these easy guys just google what is out there, you should be able to find most your answers. Then you can come back with more specific questions, those seem to get more support.

      To help you along with the first one :
      https://www.google.com/#sclient=psy-ab&hl=en&source=hp&q=Notice%3A+Undefined+variable%3A+HTTP_SERVER_VARS&pbx=1&oq=Notice:+Undefined+variable%3A+HTTP_SERVER_VARS&aq=f&aqi=g1&aql=&gs_sm=e&gs_upl=886874l886874l1l887184l1l1l0l0l0l0l58l58l1l1l0&bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&fp=f5879a5df2306e0e&biw=1680&bih=901

      The first link has your answer and how to fix it. Rinse, wash and repeat for the rest of them.

        All of the errors stem from two problems, which can be compactly explained as:

        1. $HTTP_SERVER_VARS (deprecated) -> $_SERVER

        2. [man]define/man expects a string as the first parameter (e.g. the name of the constant to be defined)

          bradgrafelman;10994098 wrote:

          All of the errors stem from two problems, which can be compactly explained as:

          1. $HTTP_SERVER_VARS (deprecated) -> $_SERVER

          2. [man]define/man expects a string as the first parameter (e.g. the name of the constant to be defined)

          Thank-you for your help, the error messages are gone, i replaced all "$HTTP_SERVER_VARS" with "$_SERVER" and changed:

          define (UC_USER, 0);
          define (UC_POWER_USER, 1);
          define (UC_VIP, 2);
          define (UC_UPLOADER, 3);
          define (UC_MODERATOR, 4);
          define (UC_ADMINISTRATOR, 5);
          define (UC_SYSOP, 6);

          to:

          define ("UC_USER", 0);
          define ("UC_POWER_USER", 1);
          define ("UC_VIP", 2);
          define ("UC_UPLOADER", 3);
          define ("UC_MODERATOR", 4);
          define ("UC_ADMINISTRATOR", 5);
          define ("UC_SYSOP", 6);

          All error messages are gone, however, I get a blank index.php with no content and a source that is empty :queasy:

            What does your index.php script look like? Also, is error_reporting set to E_ALL (check [man]phpinfo/man if you're not sure)?

              Write a Reply...