New to SourceForge

2004-12-31
2013-04-29
  • Carl Peterson

    Carl Peterson - 2004-12-31

    This is my first project on SourceForge so I apoligize in advance for anything that I mess up.  I will try to answer any questions posted to the discussion forum.  I can also be contacted at the address listed on the page for this project at jabali.net/~carl if it seems that I am not answering questions in the thread.  Thanks for everyones help and questions so far. 

    CP

     
    • spears tears

      spears tears - 2005-01-08

      where can i get documentation or help on how to install this???

      thanks

       
    • Carl Peterson

      Carl Peterson - 2005-01-08

      Documentation is not yet done, but you can get semi-sober help right here.  More stuff is at http://jabali.net/~carl under the phpMyPrepaid link.

      For today I will do a quick rundown.
      0.1.2 should be untared somewhere in your web root.
      # tar -xzf phpMyPrepaid-0.1.2
      If you untar it in the web root, it will create a directories phpMyPrepaid, fpdf and label.
      The dbconnect.php script is not included in the tar and needs to be downloaded as well.  put the dbconnect script outside of your document root and rename it dbconnect.php.  Change the username, password and DB to match your setup.
      Next you need to change a couple of configurations in config.inc.php which is located in the phpMyPrepaid directory.  I added a couple of fields to my radius DB to keep track of creation date so unless you add the field, change $addcr to 0.  While your editing this file, set the  include('../../dbconnect.php'); line to reference the location of the dbconnect.php script.

      Assuming that you already have created the raduis database in mysql (use db_mysql.sql included with radius), you now need to edit design.sql and change the first line to reflect the name of your database (it currently defaults to radius2)  Yours is most likley called radius.  Note that this file is one of the things that I have not changed since I forked dehalbe admin.  By 0.1.5 I will include one sql file to create the entire DB.  Dump this into your MySQL DB and everything should work.

      Note that I am using sql counters to keep track of time used.  To use these modules, I think you need to compile FreeRadius --with-experimental-modules
      rlm-sql counters are faster but they cause my radius server to segfault.  This realy isn't phpMyAdmin stuff but I get more questions about this then anything else so my radiusd.conf file is at http://jabali.net/~carl/?link=2 as are notes files etc.
      If you have specific questions or comments, feel free to email me.  I will work on a cleaner install and documentation for the next release.  Hopefully Thursday.

      CP 

       
    • spears tears

      spears tears - 2005-01-22

      Thanks for the help

      I did all that but when i try to open it in my browser i get a

      No Database Selected
      Couldn't execute query:

      Please can u tell me what im doing wrong??

       
      • Carl Peterson

        Carl Peterson - 2005-01-23

        Verify that:
        You have created the database radius
        You have added the design table to the database.
        dbconnect.php has your username, password and database.

        The error you are getting comes from the last line of dbconnect.php.

        /* Changed to english by Carl Peterson */
        mysql_connect($my_host, $my_user, $my_pass) or die ("Couldn't connect to mysql server");
        mysql_select_db($my_dbase) or die ("Couldn't select database");

        Which tells me that you have defined my_host, my_user, and my_pass and the mysql connection is working.  The next line selects the database $my_dbase which needs to be defined above.  $my_dbase = "radius";  // your database name
        Is your database called radius?  If this is defined coerrectly, and you have already created the database, make sure that the user you are connecting as has permissions to yse that database.

        CP

         
    • spears tears

      spears tears - 2005-01-24

      i did everything, but still the same error

       
      • Carl Peterson

        Carl Peterson - 2005-01-24

        Try this code.  save it as whatever.php and then run it.  If it still gives the error, then your database does not exist or the user does not have permission to access the database.  You can use phpMyAdmin to check your database permissions.

        CP
        Copy bellow this line.
        /////////////////////////////////////////////////////////////////////////
        <?php
        $my_host = "localhost"; // your database host
        $my_user = "youruser";              // your database user account
        $my_pass = "yourpass";// your database pass
        $my_dbase = "radius";  // your database name

        mysql_connect($my_host, $my_user, $my_pass) or die ("Couldn't connect to mysql server");
        mysql_select_db($my_dbase) or die ("Database selection failed");
        echo("If it got here the database connection works");

        ?>

         
    • spears tears

      spears tears - 2005-01-27

      thanks, i got it to run only after allowing access to the anonymous user.

      a few questions ...

      (1). where does this program store the cards it creates?

      (2). are these cards used to login to radius or used to recharge an existing radius account??

      thanks very much, its a very interesting project

       
      • Carl Peterson

        Carl Peterson - 2005-01-27

        Created accounts are stored in the radcheck table.  Each account has three entries with the same username.  The first is the password, the second is Simultaneous-Use, and the third is Max-All-Session.  Sim use being set to one means that only one user can log in at a time using the account.  Max-All-Session is the number of seconds that they are allowed to be logged in for.  Of course this needs to be tracked somehow which is why you need to write a sql counter to add up the time used in each session.  My radiusd.conf file is available at jabali.net/~carl.  Accounting details are kept in radacct.

        Each card you create is a new account.  As of now there is no feature to add time to existing accounts.  This is designed for a coffie shop or small hotell that wants to be able to print and sell cards.

        I wrote this to work with Chillispot.  There isn't any reason why you couldn't use it with a different system.

        I haven't been releasing any new releases as I shipped my box to Costa Rica to be set up.  It should get there today.  Once it is online I will start development work again.  I really need to set up another box here so I have a non-production box to play with.

         
    • &#24819;&#24471;&#22826;&#32654

      thanks ,let me try!

       
    • &#24819;&#24471;&#22826;&#32654

      i have a question,can you help me?
      http://www.chillispot.org/forum/viewtopic.php?t=257

       
    • bryantrueno

      bryantrueno - 2005-06-15

      i dont know how to write php program. but is it easy to authenticate phpMyPrepaid through http just like phpMyAdmin? cos wouldnt that make sense, i dont want anybody to make prepaid card. they need some kind of username and password to log into the /phpMyPrepaid site.

       
      • Carl Peterson

        Carl Peterson - 2005-06-15

        You can use htaccess/htpasswd for now.  By the way. there is a newer version out on my site.  www.jabali.net/~carl/  The new version which I am in the process of writing can handle multiple locations and multiple users each with permissions to do diferent tasks.  Should be out in a month or so.

        Carl

         

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks