PBSViewer on google code

Google code: hoster for open source projects

Finally I have found some time to start up a project on google code for PBSViewer. More information of PBSViewer can be found on this page.

Google code is a place where open source projects are being hosted for free, it is mainly used by developers. There are other sites that provide this kind of hosting as well,  like sourceforge, however I chose google code because it is simple, fast and reliable. Another reason why I chose for google code is that my project PBSViewer is quite small, it does not contain a lot of files and currently only one person (me) is contributing to this project. With google code it is very easy to manage the development of PBSViewer.

For my project I am looking for members who can contribute to this project. Several things can be done:

  • Testing PBSViewer for different games and environments
  • Work as developer and improve/add features
  • Add new awesome graphics as artist
  • Create documentation
  • Help with translation

If you want to help you can contact me or leave a comment. Remember you are not only helping me but the whole gaming community!

59 thoughts on “PBSViewer on google code

  1. Error: Not all .png files were downloaded… & Field ‘filesize’ doesn’t have a default value

    — Web Server —
    Web Server: Zeus Web Server
    PHP Version: 5.2.9
    .htaccess use: Yes

    — PHP Settings —

    Max Execute Time: 3600 (s)
    PHP GD: 2.1.9 (2.0.34 compatible)

    — Game Server —
    Game Server Provider: GameServers.com
    Game Server Type: Call of Duty 4

  2. To fix: Field ‘filesize’ doesn’t have a default value
    Change the filesize Default value to `As Defined` and set the value to 0

    • Thank you Connor for the detailed information. I have a couple of questions, I hope you can answer them for me. By answering those question I hopefully know more about what is going wrong.

      1) Which version of the PBSViewer script are you using?
      2) When do you get this error? I know it’s during some update, but are there any special steps you do? For instance do you get this message on the main page or when you are clicking on update?
      3) Did you apply CHMOD correctly?
      4) Can you check if there are any files in download folder after update?
      5) Can you check the database tables `dl_screens` and `screens` if they have some content or not?
      6) About the filesize error: my guess is that you mean the database tables `screens` and `dl_screens` right? I don’t get your fix, sorry, could you explain it a bit more what I should do? For instance what do you mean with `As Defined`, is that a setting or something?

      I hope we can solve this problem :) oh btw could you tell me how did you find this PBSViewer program on the internet?

      • Hello

        1) I am using 2.0.0.0 the only that I could find

        2) I get the “Not all .png files were downloaded…” on the main page and on the update.php page

        3) I did follow the CHMOD directions and I got the error, to make sure it was not a permission error I set CHMOD to “777” on all the files and folders, and I still got the error.

        4) Yes, The only things in the download folder are 2 .log files and the pbsvss.htm file.

        5) Yes all the screen shots have been put into the `screens` database and when I run the reset all the screen shots in `screens` are put into `screens_old`

        6) The fix it worked but it didn’t work, although it fixed the error, the file size is not being it putted into the column and it puts the default value I set, I think this could be the root of the problem.
        Fix:
        Go to screens structure and edit screens.
        set default to none and set it to as_defined and set the value to 0
        MySQL Code:
        ALTER TABLE `screens` CHANGE `filesize` `filesize` VARCHAR( 8 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT ‘0’

        I actually found this by complete chance, I was checking GUID’s of players on PBBans.com and I clicked one of the links under the GUID and I started browsing there forum and I came across it.

        Sorry if you still don’t understand the temp fix I did, I have problems trying to word things when I type them.

        I did notice that one of the png files was downloaded, then when I run update it gets deleted.

  3. K thanks for your answer :) Version 2.0.0.0 is latest version, so that’s good. I understand the fix I think, though I do not understand where you apply the as_defined thingy. I mean I can not see it back in your MySQL code for instance… I have some more questions.

    8) For the CHMOD thing, question 3, what kind of error do you get?
    9) Can you give me some values (I only need a few of them, so not all values) of the `fid` field of `screens` table. Maybe those values are not correct, because you don’t have any screens in your download folder.

    You could try to apply the fix I have released for windows gameservers, it might work. See link below for the fix:
    http://code.google.com/p/pbsviewer/downloads/list

  4. Ha, as I said. I am not very good at working things.

    8) I don’t get an error with it, I set the CHMOD to 777 just to make sure that it wasn’t a permission problem causing the “not all the .png files where downloaded…”.

    9) All the values are the correct ones, I check the all the values with the screen shots and they are the same.

    I applied that patch and now the script just times out. or I get Error 500 like here for example.
    http://www.a2k-clan.websetup.org.uk/PBSViewer_2.0.0.0/

    I would go into the code and see if I could find the problem but I am unable to download Dreamweaver and notepad++ is not the best.

    • O also on your next release can you make sure all your PHP tag’s are and not because I know some Web Servers such as my local testing server have the short tag’s disabled and they will treat it as HTML.

      Connor

      • hmm k, weird that you get an error or time out now. Though it’s trying to do at least something… About how many screens are you trying to download?

        In addition to question 9:
        10) There are no prefixes stored in database table? Like a path or something? Can you check whether the values are exactly the same as the file name?

        Oh btw did you try to enable debug mode? You can set this in your ACP. Or if you can’t access ACP in database, see table `settings` and then look for debug. It might give you more information about what is going wrong.

        You can try Aptana studio 3 (it’s free), I use it for javascript but it appears to support php as well :) Here is the link:
        http://www.aptana.com/products/studio3

        About the PHP tag, yeah thanks for the tip. I was already working on that, though never continued with it. I will fix it in next release.

  5. Yo, sorry its been so long, I been busy with some things.

    Turns out the problem was to do with the latency with from the php server to the mysql server. also now I am having problems deleting some screenshots because they where saved by the script with / in the name.

  6. Hi, can you add support for gameservers.com ? We have a Ranked bfbc2 server and access to the PB files over http (not ftp). Its on all Servers the same structure. Hashes: http://13.13.13.13/13.13.13.13/pbsvss.htm
    Pichtml: http://13.13.13.13/13.13.13.13/pb000001.htm
    picfile: http://13.13.13.13/13.13.13.13/pb000001.png
    http://serverip/serverip/

    i hope its possible ;)
    currently we use this little JS http://brainee.kicks-ass.net/files0815/pbss.htm

    kind regards

      • Hi Brett that sounds good :)
        gameserves.com have a option for logging and i think its only readable if you login… we use the internal logging of our rcon-tool (bc2cc) and write the files to the disc. for me its directly accessable on the local server where the pbsviewer can run.
        regards BrAiNee

  7. Hi, i able to get to step 9 and i get this message.

    Warning: ftp_close() expects parameter 1 to be resource, boolean given in /home/conflic2/public_html/pbssv/install/install.php on line 1861

    • Hi Paul,

      thank you for informing me about the warning. Do you get this warning message each time when you try to install it? Could you also check if your ftp settings of your web server are correct?

      I have to mention that the logging feature is not working properly yet. The logging feature is nice to have but it is not mandatory, the PBSViewer just works fine without it. You could try to install it without the logging feature, I am sure it will work :)

  8. On the install where it prompts for username and password for account is it possible to add a field for ACCT as my host (Clanforge) will not accept connections otherwise

  9. sry bout te delay
    when you connect via ftp is sends a request for username by sending USER – and then for requesting password it sends pass

    But some ftp servers (not common)also want account information for an account on that ftp server – this is requested using ACCT and usually after the password :-

    USER (USER NAME)

    USER

    The argument field is a Telnet string identifying the user. The user identification is that which is required by the server for access to its
    file system

    PASS (PASSWORD)

    PASS

    The argument field is a Telnet string specifying the user’s password. This command must be immediately preceded by the user name command, and, for some sites, completes the user’s identification for access control

    ACCT (ACCOUNT)

    ACCT

    The argument field is a Telnet string identifying the user’s account. The command is not necessarily related to the USER command, as some sites may require an account for login and others only for specific access, such as storing files.

    Hope this helps

    • Interesting, I think I understand your problem, but I am not sure if I can fix it. It requires me to change the way how PHP connects to a ftp server, as far as I know there is no additional argument that can be used to login with an account.

      Could you try to save the code below to a file (for example save it as test.php) and upload the file to your server:
      <?php

      // your login credentials
      $host = "ftp.example.com";
      $user = "user";
      $pass = "password";
      $acct = "acct";

      $fp = ftp_connect($host);

      $result = ftp_raw($fp, "USER ".$user);
      print_r($result);
      echo "”;

      ftp_raw($fp, “PASS “.$pass);
      print_r($result);
      echo “”;

      ftp_raw($fp, “ACCT “.$acct);
      print_r($result);

      ?>

      Don’t forget to change the login credentials, please let me know the results you get when you open this file in your web browser. Can you see/confirm if it is connected to your ftp server?

          • i get this –

            Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /homepages/11/xxxxxxxxxx/htdocs/test.php on line 9

            Warning: ftp_raw() expects parameter 1 to be resource, boolean given in /homepages/11/xxxxxxxxxx/htdocs/test.php on line 11

            Warning: ftp_raw() expects parameter 1 to be resource, boolean given in /homepages/11/xxxxxxxxxx/htdocs/test.php on line 15

            Warning: ftp_raw() expects parameter 1 to be resource, boolean given in /homepages/11/xxxxxxxxxx/htdocs/test.php on line 19

  10. Its possible to use it when you use game server and web in same machine??
    Because when i try install it keep asking for ftp details and its not necessary, because the game server and webserver are in same machine.
    Can you please tell me how i can install it in this way? Thanks.

    • Yes it possible to use PBSViewer when you are using the same machine for your website and gameserver, though you need to use FTP for this. At the moment there is no other method than ftp to move files (screenshots and logs) from one location to another. For testing purpose I am using the same setup as yours. You can just use the ftp details of your machine.

      I haven’t implemented a feature in which you can copy/move files locally on the same server without FTP, since this requires that PBSViewer has full access (owner permission) on your server.

  11. That is my problem i set my ftp details for this but not work, the install process says it has something wrong and i cant pass by the second step of installation. I use my root and user details for ftp and still not working.

  12. th3hood :

    i get this –

    Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /homepages/11/xxxxxxxxxx/htdocs/test.php on line 9

    Warning: ftp_raw() expects parameter 1 to be resource, boolean given in /homepages/11/xxxxxxxxxx/htdocs/test.php on line 11

    Warning: ftp_raw() expects parameter 1 to be resource, boolean given in /homepages/11/xxxxxxxxxx/htdocs/test.php on line 15

    Warning: ftp_raw() expects parameter 1 to be resource, boolean given in /homepages/11/xxxxxxxxxx/htdocs/test.php on line 19

    Are you sure that the login credentials are correct? Because I have tested the script without ACCT and it worked… Could you please check if the host is correct, because that’s where the error starts. If you are using a host name like http://ftp.host.com instead of an IP address I would suggest to use an IP address instead, you can find the IP address of your host here:
    http://www.hcidata.info/host2ip.cgi

      • your code works fine have the thing running without it now but i get this error when i try to update screenshots –
        Warning: ftp_chdir() [function.ftp-chdir]: Directory not found. in /htdocs/pbsviewer/inc/functions.inc.php on line 319
        directory change failed

        • think it has something to do with my path to pb as my gameserver host has my path as /servers/by_serverid/98862

          which contains three folders –

          Punkbuster Bans
          Punkbuster Logs
          Punkbuster Screenshots

          pbsvss.htm and all screenshots are in Punkbuster Screenshots.

          • am also getting this showing at pbsviewer login screen –

            Warning: file() [function.file]: URL file-access is disabled in the server configuration in /homepages/11/d341283743/htdocs/pbsviewer/inc/templates.inc.php on line 1022

            Warning: file(http://beesar.com/download/PBSViewer/nfo) [function.file]: failed to open stream: no suitable wrapper could be found in /homepages/11/d341283743/htdocs/pbsviewer/inc/templates.inc.php on line 1022

  13. tells me im connected to the server then throws this error
    Warning: ftp_chdir() [function.ftp-chdir]: Directory not found. in /homepages/11/d341283743/htdocs/pbsviewer/inc/functions.inc.php on line 319
    directory change failed

    my pbsviewer installation went fine – path=/pbsviewer
    my path to pbsvss.htm = /servers/by_serverid/98862/Punkbuster Screenshots
    my path to png files is same
    my path to logs = /servers/by_serverid/98862/Punkbuster Logs

    hope this helps

  14. im having different probs now – was working fine until today –

    Warning: ftp_login() expects parameter 1 to be resource, boolean given in /homepages/11/d341283743/htdocs/pbsviewer/inc/functions.inc.php on line 82

    Warning: ftp_close() expects parameter 1 to be resource, boolean given in /homepages/11/d341283743/htdocs/pbsviewer/inc/functions.inc.php on line 211

    Warning: Invalid argument supplied for foreach() in /homepages/11/d341283743/htdocs/pbsviewer/inc/functions.inc.php on line 427
    03:52:00]
    All PNG files (0) were downloaded succesfully!

    • Do you still got those problems? It seems like a connection error. You often get those errors when
      a) FTP server is temporarily down
      b) Using wrong login credentials
      c) Made too many update requests

      For those who are using multiplay gameservers I will release a fix as soon as possible. In this fix you can easily change the pb screenshot and the log directory. If you can’t wait please download the latest files from this location:
      http://code.google.com/p/pbsviewer/source/browse/#svn%2Ftrunk%2FPBSViewer

      You need to update the files:
      – functions.inc.php
      – index.php
      – update.php
      – init.inc.php

      In init.inc.php change the directories to the directories your gameserver hosting company is using:
      $svss_dir = ‘svss’;
      $svlogs_dir = ‘svlogs’;

      In case of multiplay this becomes:
      $svss_dir = ‘Punkbuster Screenshots’;
      $svlogs_dir = ‘Punkbuster Logs’;

    • Ok strange, it looks good. Maybe the error will disappear when you use the new version. In this version the ftp connection is implemented slightly different than previous versions. I hope to release this new version as soon as possible.

  15. Would be nice, if you could support other than static remote directories. We are using a server from german biggest provider 4netplayers and they are using another directory structure to store the files:

    /staticdir/YYYYMMDDHHMM/punkbuster/screenshots
    /staticdir/YYYYMMDDHHMM/punkbuster/logs

    So they are splitting the files for every reboot and once a day (because of a scheduled auto reboot). There might at least be two possibilities:

    1. Make your ftp connections work recursivly (see http://www.php.net/manual/en/function.ftp-nlist.php#102969)
    2. Make local directories possible (will than use rsync to get the files)

    Any help would be really nice.

    Rgds,

    Rouven

    • Hi Rouven,

      Thanks for informing me. I am not sure if the recursive ftp method is going to work, how do you know which directory you need? There are probably multiple directories with screenshots and log files? Could you tell me how many ‘pbsvss.htm’ files are being created? Probably each directory has at least one ‘pbsvss.htm’ file, right? Probably the whole update process should be recursively as well, since PBSViewer needs to parse multiple ‘pbsvss.htm’ files…

      Could you please explain option two in more detail? Do you want to use multiple local directories? For example ‘/staticdir/20120226/punkbuster/screenshots’ and ‘/staticdir/20120227/punkbuster/screenshots’ etc…

      Kind regards,

      Brett

  16. Hi Brett,
    our provider creates a new directory for every server restart containing the current datetime. So if you manually restart the server, a new directory will be created and all pb files for the currently active server are stored in this new directory.

    The pity is, the server is always starting with a fresh pbsvss.htm containing only the entries since the last restart. The screenshot folder will be created once the first screenshot was taken.

    The ftp logic needs to enter each subdirectory below ‘/staticdir/’, check for pb screens and get them.

    For the meanwhile I will write some small php script to work as a proxy service. There is just the tricky one with the always recurring pb screenshot names and the pbsvss.htm. I will download and rename the files and also create a fresh htm file to work this out.

    Rgds,
    Rouven

  17. To explain option 2:

    We are currently working with the outdated jdetector in local mode, but we really need a better solution. So what we are doing for the moment is transferring the latest screenshot via curl to the jdetector folder, analysing the files, archiving the files with another filename…

    Currently I have no idea for other solutions than amending the htm file and renaming the screenshots after analysis.

  18. every ling looks great but win I update ss I get this error “Connected to: nl.game.nfoservers.com:21

    directory change failed”

    my pb directory is set to svss/

    ???

    • Hi Flat,

      your pb directory should be “svss” instead of “svss/”. I have sent you a mail with a file attached to it that could fix this problem, please let me know if you have received it. I haven’t released a new version yet…

      Cheers,

      Brett

Leave a Reply

Your email address will not be published. Required fields are marked *