How to install PHP Point of Sale

In this article, I’m going to show you how to install PHP Point of Sale, a free Point of Sale system made using PHP, the server-side scripting language. Which I mainly use to manipulate and retrieve data from database like MySql.

In the time of writing of this article, I’m working on a point of sale system for our school project. This free point of sale system is really a help in making the project. You can learn from the system itself. You can gain insight on what a point of sale system really does.

This point sale system is made using the MVC framework. MVC stands for Model, View , Controller. 

 

Requirements:

  1. Wampserver
  2. PHP Point of Sale
  3. Text Editor

After downloading and installing all those requirements. You’re now ready to get started. First thing that you would want to do is to extract the contents of PHP Point of Sale to your www directory.

Name the extracted folder to whatever you want. As long as it is comprehensive and easy to remember. Something like ‘phppos’ will do.

Open up the folder and make sure that you see something like this inside of it:

image

The most important thing that you must have in the first level of that folder is the ‘index.php’ file.

Here’s the complete folder path of mine, use it as a basis for your installation:

C:wampwwwphpos

Next thing that you need to do is to create a new mysql database, this would be use by php pos to create tables that will be used by the system. Its necessary to create the database first, because it is where the tables will reside.

image

Just click on ‘create’ after typing the desired name of the database.

You will now be redirected to the database. It doesn’t have tables for now. To put tables, just click on the ‘import’ tab. Then click on ‘choose file’ to choose the sql file that contains the information to rebuild the database.

image

Now, you need to navigate to the folder where the database for php pos is stored. Mine is stored on:

C:wampwwwphposdatabase

Highlight the ‘database.sql’ file and click on ‘Open’:

image

Now, you need to make sure that the ‘database.sql’ file is actually the one which is opened. Then click on ‘go’ at the bottom right corner of the phpmyadmin interface:

image

Here’s the green highlight. Telling you that the query was completed successfully.

image

You will notice that the database is now populated with tables.

image

 

But were not done yet, next thing that you need to do is to edit the configuration file of php pos to match your database configuration.

Again, use the path below as a basis on where you will find the configuration file:

C:wampwwwphposapplicationconfig

c -is the name of the drive where you have installed wamp. By default it is c.

phpos -is what you have named the folder which has the php pos files.

The others which I haven’t mentioned are constants unless you have messed up with the folder names inside the php pos folder. Inside the config folder you will see a file named ‘datebase.php.tpl’. Rename that one to ‘database.php’. And open it up using a text editor.

Most of the codes which are on that file are just comments. So scroll down until you find the codes which are not commented out. We will only be needing to modify these specific lines of code:

   1: $db['default']['hostname'] = "localhost"; //name of the server. default: localhost

   2: $db['default']['username'] = "root"; //name of user. default:root

   3: $db['default']['password'] = "1234"; //password of the user. default:none

   4: $db['default']['database'] = "phpointofsale"; //name of the database which you created earlier

   5: $db['default']['dbdriver'] = "mysql"; //database server. default:mysql

I’ve already put some comments to guide you. Don’t copy and paste the code above. You might get some errors. Just edit the file which is already available to you and put the corresponding data that matches your configuration.

 
Now, you open up your browser and navigate to:
 
You’ll see something like this:
image

Default username would be admin. And default password is pointofsale. You won’t see the actual password in the user table, since all that is stored is the encrypted version of the password.

 

Conclusion

That’s how you install php point of sale. I hope this guide helped you. And please share it using the buttons below if ever this guide helped you. Thanks!

19 thoughts on “How to install PHP Point of Sale

  1. Hi there, awesome tutorial, everything goes easily, although, I’m having this issue, maybe you can give me an advice. When in my web browser I navigate to the desire folder, I’m supposed to sign in as ‘admin’ an password ‘pointofsale’, but that is not working, it says invalid user name/password.

    Things I’ve tried (since I’m on a mac) is made sure that mysql service is running, and in fact it is, I’ve restarted MAMP but no results until now.

    I really will appreciate all your help.

    • Have you properly edited these lines to match the configuration of your database?

      1: $db[‘default’][‘hostname’] = “localhost”; //name of the server. default: localhost
      2: $db[‘default’][‘username’] = “root”; //name of user. default:root
      3: $db[‘default’][‘password’] = “1234”; //password of the user. default:none
      4: $db[‘default’][‘database’] = “phpointofsale”; //name of the database which you created earlier
      5: $db[‘default’][‘dbdriver’] = “mysql”; //database server. default:mysql

      You can also try to create another user on mysql using phpmyadmin. And use it as default user for php point of sale.

      I believe that there’s also a separate version of php point of sale specifically intended for Mac: http://download.cnet.com/PHP-Point-Of-Sale/3000-2065_4-42661.html
      Though I haven’t tried it yet because I’m using Windows.

      Lastly, make sure that you only have one version of mysql installed because they might be conflicting. I hope that helps.

      • Thanks a lot for your reply!

        I’ve tried even what you have just said, anyway, I will give it a try on windows side, since this is for school project, I will try to understand what is happening with mac and then I’ll come back to post a comment so further mac users will know. Once again, thanks for this tutorial! cheers.

  2. Hi this is Kashif

    i have followed all your steps but finally after locating all the things i found the following error..
    ————————————————————–
    Object not found!

    The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

    If you think this is a server error, please contact the webmaster.
    Error 404
    localhost
    9/12/2011 2:42:31 PM
    Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1

    kindly can you help me out in this matter..

  3. Thanks for your reply Wern

    Actually i am not using skype,,
    let me tell you my steps if i am wrong you please highlight because i am little bit confused in extracting the point of sale where should i save…

    1.. i am using Xampp
    2. Notepad++ Editor
    3. PHP POS free version which i have downloaded from sourge network

    steps :-

    1. First extract the files of POS and put in D:/ drive
    2. Second using xampp Control Panel i click on “Apache” Admin
    3. Third i click on PHP My Adminn
    4. Forth create a database by the name of “PHPPOS”
    5. Fifth import database file from POS folder Database.SQL
    6. Sixth it imports 17 files
    7. i replace database.php.tmpl file with database.php
    8. i go to my browser and type http://localhost/phppos

    and than the error come up

    so please tell me what should i do..

    what are my mistakes frankly speaking i dont have any PHP back ground …

    • I visited the php point of sale site today and it seems like they don’t offer free downloads anymore. I also checked out its sourcforge page but only a fork exist, since its not anymore license under GPL.
      I’m wondering where did you get the installation files.

    • The files are not there anymore and I’m sorry to say that I don’t have a backup of the files back when it was still free. I guess you’ll just have to build your own point of sale system. Or search for an alternative.

    • Maybe you can try using Wamp, its much more easier. I don’t really use XAMPP and I don’t know what kind of configurations you might need to perform in order to get it working on XAMPP

  4. when i open it in my browser, nothing is displayed, just a blank page and no error messages either. what could i be doing wrong?

    tia

    diego

  5. hey im having a problem i downloaded and installed it, i had no problems setting up the database, how ever when ever i try to log in i get and invalid user name and password error,
    any advice?????
    is there a way to create a new account directly from the data base? i created a new user with every single permission admin had but still it doesnt work, please advice

  6. I found this solution:

    $db[‘default’][‘hostname’] = “localhost”;
    $db[‘default’][‘username’] = “***”;
    $db[‘default’][‘password’] = “***”;
    $db[‘default’][‘database’] = “***_***”;
    $db[‘default’][‘dbdriver’] = “mysql”;
    $db[‘default’][‘dbprefix’] = “phppos_”; <– Make sure you add this. Maybe it could be added as default since it is in the database.sql schema 😀
    $db['default']['pconnect'] = TRUE;
    $db['default']['db_debug'] = TRUE; <– When I set this to TRUE it shed more light on the problem since I was connecting to the database, just not the with the prefix – gave error 1146
    $db['default']['cache_on'] = FALSE;
    $db['default']['cachedir'] = "";
    $db['default']['char_set'] = "utf8";
    $db['default']['dbcollat'] = "utf8_general_ci";

  7. thanks for the great tutorial, it works really well for me but
    I have a question about the password and the username bit where in the database.php username is ‘root’ and the password is ‘1234’ but during login those two aren’t working, but use the encrypted default username ‘admin’ and password ‘pointofsale’ instead
    How can I then able to change the password and the username for myself
    thank you very much
    Vik

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s