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.To view this discussion on the web visit https://groups.google.com/d/msgid/open-source-cad/914e8698-db7d-4680-b1b8-41b0855d75bcn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/open-source-cad/6f4f2595-b877-4cd4-b5df-5a0fcbcf00edn%40googlegroups.com.
Quick Question is my SQL 5.7 stable or stable with the latest version or the recommendation would be 7.0
✅ 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.
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
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+)
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";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!
To view this discussion visit https://groups.google.com/d/msgid/open-source-cad/603531e9-5d4b-41b1-b3bf-2bbbd5772924n%40googlegroups.com.