opensourcepos / opensourcepos

Open Source Point of Sale is a web based point of sale application written in PHP using CodeIgniter framework. It uses MySQL as the data back end and has a Bootstrap 3 based user interface.

Home Page:http://www.opensourcepos.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Missing /var/www/html/.htaccess file contents within installation documentation

Inkblotr opened this issue · comments

OpensourcePOS Version

opensourcepos 3.3.9

Php version

Php 7.4

What browsers are you seeing the problem on?

Firefox

Server Operating System and version

Linuxmint 21.3

Database Management System and version

Mariadb 10.6.16

Web Server and version

Apache 2.4

Expected Behavior?

I expected to find the appropriate or recommended contents of a .htaccess file in the documentation or a file included in the installation zip file that would reside in the /var/www/html directory.

This is assuming not having a '.htacess' file in that folder is what is causing the "404 Not Found" error I'm seeing.

Bug Description?

At login screen, after entering 'admin' & 'pointofsale' I expect to see the first application screen. Instead I see a 404 error.

Steps to Reproduce?

Install Linuxmint 21.3
Install Apache2 following instructions in this link: https://www.ubuntumint.com/install-lamp-apache-mariadb-php-on-debian-12/
Install MariaDB following instructions in the same link above.
Install PHP 7.4 following instructions in this link: https://tecadmin.net/how-to-install-php-on-ubuntu-22-04/
Install OSPOS following instructions in this link: https://www.opensourceposguide.com/guide/gettingstarted/installation
Reboot system
Login to Linux
Open browser
type 'localhost' on URL line
type 'admin' on Username line
type 'pointofsale' on Password line
click "Go"

System Information Report (optional)

Cannot get the application past the login screen successfully to provide this information.

Unmodified copy of OpensourcePOS

  • I agree this copy has not been modified

Did you follow the instructions in the Install.md or did you download from the main page?

The instructions in the install.md file were woefully inadequate in comparison.

Let me clarify a bit. The instructions to wget the ospos zip file failed. I downloaded the .zip file separately. The file name is 'opensourcepos.3.3.9.c00ff2.zip'. When I unzipped the file in the /var/www/html folder there was no .htaccess file. I'm assuming without a .htaccess file in the /var/www/html folder (since the web page references the file is supplied by DigitalOcean if I were to use a droplet) the application needs one because the app needs one or more directives that are relevant to getting the application to work correctly. I need to run OSPOS locally on a laptop at my popup retail store.

I was there when I downloaded it.
2024-03-19 12_32_17-Window

And did you create the ospos database in Maria DB.

Yes, I followed the instructions creating the ospos database and creating user and granting privileges. Can you post the contents of the .htaccess file please?

Some other company set that up. So unfortunately you will have to use the Install.md for Installation

Then someone needs to update the install.md file to be easier to follow. The Docker instructions were terrible!

Thank you. I'll try that now.

Have you used the online Demo to see if it is something you can use?

No, I've not tried the online demo. I cannot see the benefits of a demo to try. The description of the app is very motivating (therefore justifying my spending 2 weeks trying to get it working).

The .htaccess file did not fix the issue. Maybe it is because I'm NOT using MySQL. I'll start over AGAIN and this time use MySQL and see if it works. I sincerely appreciate your effort to help me fix the problem. I'll close this bug since it wasn't valid in the first place.

That's the good thing about using Opensource software. 1 it is free and 2 you will lean how to modify or fix issues.

It doesn't have to be this hard. If installation instructions were written more completely, I wouldn't be having this much trouble. For example, in the INSTALL.md file you pointed me to, under ## Local install, step #3 says: "Execute the file 'database/database.sql' to create the tables needed." I am not a database administrator, never have been, though I dedicated my whole life to Information Technology. A user doesn't "execute" a file ending in ".sql". If you instead mean 'mysql -u admin -p ospos < database.sql' as the URL: https://www.opensourceposguide.com/guide/gettingstarted/installation instructs, that is understandable. Do I make my point?

If you are using something like Phpmyadmin then you would Import the .sql file

I used the command line from the URL and it appeared to work - there was no error message... Reading the Install.md file I discovered a couple more php-[extensions] I had not previously loaded. They didn't help. This is quite frustrating. I do not use phpmyadmin. I need a POS system for our business and we cannot afford what companies charge. FOSS is my only option.

right click on the browser login page then select inspect then go to network to see if there are any visible errors after you try logging in again.

You can also go to application/config/config and set error logging to 1 maybe line 261. Then in application logs hopefully you can get more info from there. My bedtime now so good luck and show any errors you are receiving.

After attempting a login to the application, with the 404 page showing, I cannot find anything amiss in the network tab of inspect. I found and changed the logging to 1. Tried to login again. Then went to /var/log folder. The mysql folder was empty, no files at all. The apache2 folder had 3 files (access.log, error.log and other_vhosts_access.log). The last file in the list is zero bytes. Neither the access.log nor error.log files have anything that I can find that looks suspicious. I appreciate your continued assistance. Do you have more suggestions? I hope!

My effort to build/configure another instance using MySQL instead of MariaDB was no more successful than the last one. I wish the developer would offer a flatpack/Snap for Linux. That would be SOOOO much easier and probably make the application much more popular. Just my 2¢.