Re: [Open-Source-CAD] TicketsCAD login issue

108 views
Skip to first unread message
Message has been deleted

Shawn Stoddard

unread,
Jul 14, 2024, 8:58:06 AM7/14/24
to open-source-cad
Try using MySQL version 7. I seem to recall some issues with MD5. It’s not considered secure for passwords any longer. MySQL may have depreciated it, but I’m having a tough time finding that clearly documented. 

On Sun, Jul 14, 2024, at 08:40, Khalaf Almazrouei wrote:

Absolutely! Here's a revised message to the community that's more informative and likely to get helpful responses:

Revised Message

Hello everyone,

I hope you're all doing well. I've successfully installed TicketsCAD, but I'm running into a problem when trying to log in.

The Issue:

When I try to log in as either the "admin" user or the "guest" user, I get this SQL error:

An error occurred in function '': 'mysql query failed' Error occurred in 'login.inc.php' at line '263' Additional info: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('ADMIN') OR `passwd`=MD5('admin') OR `passwd`=MD5('ADMIN')) LIMIT 1' at line 3' Check your MySQL connection and if the problem persists, contact the author. Execution stopped.

My Setup:

  • Hosting: cPanel cloud-based Linux server
  • PHP version: 7.0 (set via Multiple PHP)
  • MySQL Server version: 8.0.36-cll-lve (MySQL Community Server - GPL)
  • phpMyAdmin version: 5.2.1


--
You received this message because you are subscribed to the Google Groups "Open Source CAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-source-c...@googlegroups.com.

Message has been deleted

Khalaf Almazrouei

unread,
Jul 16, 2024, 5:44:00 AM7/16/24
to Open Source CAD
Hi Shawn thanks for your support, I will try to change it and see if it works. Along with that in the meantime I will try to install XAMPP and host temproarey to see 

Do you have any recomnded shared webhosting or VPS to host the CAD system, if so can you please let me know what are the compney names 

Shawn Stoddard

unread,
Jul 16, 2024, 8:11:06 AM7/16/24
to open-source-cad
Sadly I don’t. I have always self-hosted on Windows behind IIS or on Linux behind NGINX.
Message has been deleted
Message has been deleted

Khalaf Almazrouei

unread,
Jul 19, 2024, 6:03:17 AM7/19/24
to Open Source CAD

Quick Question is my SQL 5.7 stable or stable with the latest version or the recommendation would be 7.0

Khalaf Almazrouei

unread,
Jul 19, 2024, 6:03:17 AM7/19/24
to Open Source CAD
Thanks Shawn for the update I will try to see if I can host it with my synology system and I hope that in the fuetaer they can update the core to support mysql verison 8.0+

Khalaf Almazrouei

unread,
Jun 20, 2025, 12:03:58 PMJun 20
to Open Source CAD

✅ Fixed: SQL Syntax Error in login.inc.php on MySQL 8.0 (Shared Hosting)

Hi everyone,
I hope you're all doing well. If you're facing the same error I encountered when running Tickets CAD on a shared hosting environment, here's how I resolved it.


❌ Error Message: An error occurred in function '': 'mysql query failed' Error occurred in 'login.inc.php' at line '263' Additional info: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('ADMIN') OR `passwd`=MD5('admin') OR `passwd`=MD5('ADMIN')) LIMIT 1' at line 3' Check your MySQL connection and if the problem persists, contact the author. Execution stopped.
✅ Hosting Environment:
  • Hosting: cPanel-based Linux shared hosting

  • PHP Version: 7.4 (configured via MultiPHP Manager)

  • MySQL Server Version: 8.0.36-cll-lve (MySQL Community Server - GPL)

  • phpMyAdmin Version: 5.2.1


🔧 Root Cause:

The original SQL query in login.inc.php was using:

  • Improper syntax and unmatched parentheses

  • A reserved MySQL keyword user without backticks

  • Deprecated functions like PASSWORD() (which is removed in MySQL 8.0+)


✅ Fix:

I resolved the issue by replacing the broken query at line 263 in login.inc.php with the following:

$query = "SELECT * FROM `" . $GLOBALS['mysql_prefix'] . "user` WHERE `user` = " . quote_smart($_POST['frm_user']) . " AND ( `passwd` = MD5('" . strtolower($_POST['frm_passwd']) . "') OR `passwd` = MD5('" . $_POST['frm_passwd']) . "') ) LIMIT 1";
🟢 Result:

This corrected the SQL syntax and allowed the login process to work correctly with MySQL 8.0 and PHP 7.4 without needing to downgrade or change hosting.

Hope this helps others facing the same issue!


Screenshot 2025-06-20 200205.png

Jeff Carrier

unread,
Jun 20, 2025, 12:07:56 PMJun 20
to open-so...@googlegroups.com
Appreciate you sharing this!!!  Many times folks get help/support (on many various forums) and likely correct their issue but rarely reply that the issue was resolved and how it was resolved.

Reply all
Reply to author
Forward
0 new messages