PatONeil/POS-Terminal

unexpected token at < JSON

Opened this issue · 15 comments

Hi,

I downloaded and populated with sampleDB data. When I tried to connect to the page, I get this error (as attached). Can you advise what could be the cause?

Thank.

error

It shouldn't be error with connect to MySQL. Because i used createDBs.php script to create the MySQL database tables. If the username and password is wrong, I shouldn't be able to create the tables.

Any idea?

Was this issue solved?

Hi,

I downloaded and populated with sampleDB data. When I tried to connect to the page, I get this error (as attached). Can you advise what could be the cause?

Thank.

error

This issue, i am also getting it but by disabling die() inside connectPOS, myErrorHandler function it works ok

Not sure, was problem reported. When/where does it happen.

On Dec 6, 2018 at 2:34 AM, wrote: Was this issue solved? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

when u access the url to display the menu
image

The probàble cause is thefailure to connect to MySQL database. Check the DB name you used, username and password.in connect script..

THIS IS INTENTIONALLY BADLY MADE SO THAT YOU ASK QUESTIONS !LAME!!

This thread is a bit old but I hope someone can find this helpful. First, excuse my English, I'll try my best.
I've got the same error when, once installed and populated the database with sampleDB data, I loaded the site in the browser. I've been checking the source code and in the configuration file, "connectPOS.php", I've found these lines:
$hDir = "../log";
error_reporting(E_ALL);
ini_set('error_log',$hDir."/PHP_Errors.txt");
Basically, when you first load it, the system tries to create a log file in a "log" folder located in the root directory, but I've checked the directory and it didn't contain a "log" folder. So, I created the folder, reloaded the page and, voila, everything worked as expected.

My recommendation, edit "connectPOS.php" adding these lines:

$hDir = "../log";
if (!file_exists($hDir)) {
mkdir($hDir, 0777, true);
}
error_reporting(E_ALL);
ini_set('error_log',$hDir."/PHP_Errors.txt");

You can edit permissions as you want, 0777 is by default

By the way.... I almost forgot... Happy Saint Patrick's Day!!!!! ;-)

Upon updating everything, ive ran into one last issue, when i go to complete the order it throws back:

posTerminal.posMenuOrderMgr:parserror SyntaxError: JSON Parse error: Unrecognized token'<'

I am aware of the previous pages needing to be updated and the folder created for your log but i am confused, ive searched through the code and i cant seem to even see the direction of the issue.

Upon checking with the print ability, the system comes back with:
Print Order Mgr: error
as well as editing the order information is throwing back nothing or empty orders after clicking edit on specific orders.

Ive searched through the print order mgr js file and cant really see the issue, thanks for any help in advance.

This thread is a bit old but I hope someone can find this helpful. First, excuse my English, I'll try my best.
I've got the same error when, once installed and populated the database with sampleDB data, I loaded the site in the browser. I've been checking the source code and in the configuration file, "connectPOS.php", I've found these lines:
$hDir = "../log";
error_reporting(E_ALL);
ini_set('error_log',$hDir."/PHP_Errors.txt");
Basically, when you first load it, the system tries to create a log file in a "log" folder located in the root directory, but I've checked the directory and it didn't contain a "log" folder. So, I created the folder, reloaded the page and, voila, everything worked as expected.

Def helped me allot, thanks! :)