This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Fatal error: Uncaught mysqli_sql_exception:
#1

I hate for my first post to be with a problem but,  Smile

I installed this on local machine under xampp and was quite impressed.  Deciding to take it to my vps for further testing I encountered the following error message during the install:


Quote:Fatal error: Uncaught mysqli_sql_exception: Access denied; you need (at least one of) the SUPER privilege(s) for this operation in
/home/admin/domains/my_domain.com/public_html/comments/system/library/database/mysqli.php:53 Stack trace: #0
/home/admin/domains/my_domain.com/public_html/comments/system/library/database/mysqli.php(53): mysqli_query() #1
/home/admin/domains/my_domain.com/public_html/comments/system/library/database.php(42): Commentics\MySqli->query() #2
/home/admin/domains/my_domain.com/public_html/comments/install/controller/main/menu.php(24): Commentics\Db->query() #3
/home/admin/domains/my_domain.com/public_html/comments/install/index.php(63): Commentics\MainMenuController->index() #4 {main} thrown in /home/admin/domains/my_domain.com/public_html/comments/system/library/database/mysqli.php on line 53


In the process of reviewing the script I realized that the script not the system generated the message.

I need to provide a bit more info just in case. 
I am using the DirectAdmin control panel on this vps.  DirectAdmin does not allow anyone to create a DB from within phpmyadmin.  Haven't yet tested it but I think that applies to dropping one also. As my DB version number is 10.6.10 I presume I am using MariaDB.

I could export the local machine version and import it on the server but the hash for UN & pass usually does not work when you do that.

I am open to suggestions.
Reply
#2

I guess you're using PHP 8.1. Any issue throws an exception so I'll have to catch these in the next version of Commentics.

It looks like your MySQL user doesn't have the "super" privilege to modify the SQL Mode of the current session.

Commentics tries to modify the SQL Mode because some environments are too strict.

Try opening /install/controller/main/menu.php and on line 24 remove this:
PHP Code:
<?php 
$this
->db->query("SET @@global.sql_mode = ''");

Have you completed the interview?
Reply
#3

Actually can you try this instead? It's likely to be the fix that I'll apply.

In the file /system/library/database/mysqli.php

After this:
PHP Code:
<?php 
mysqli_set_charset
($this->link, 'utf8mb4');

Add this:
PHP Code:
<?php 
mysqli_report
(MYSQLI_REPORT_OFF);

Have you completed the interview?
Reply
#4

Thanks for the replies. I did not expect you to be working this weekend.

I'm going to look those over at apply one of them, probably the first one.

FYI, I am running 8.1.10 on localhost and 8.1.12 on the VPS.

I have all privileges on localhost and was using the root login. DirectAdmin does limit some.
Reply
#5

Very happy to report that the script is now installed.

This did not work.  It threw a fata error and I forgot to copy it for you.
PHP Code:
<?php 
mysqli_report
(MYSQLI_REPORT_OFF); 

The first one worked fine and that was the structure I choose for the DB when I created it based on looking at the localhost model
Reply
#6

Would you mind posting the error?

You can re-visit the 'install/index.php?route=menu' page without having to uninstall anything.

Have you completed the interview?
Reply
#7

Already followed your advice and deleted the install folder. Smile

I will look at the site error logs and get back to this thread.
Reply
#8

Steven,

I could not find a php error log on the vps but i did duplicate the problem on local host.  Using what you posted as the second option under PHP 8.1.10 it reslted in this error code:  Parse error: syntax error, unexpected variable "$this" in C:\xampp\htdocs\temp\comments\system\library\database\mysqli.php on line 31.

And here is a screen shot so you can verify I did what you said and did it correctly.

   

I removed it and the install script loaded just.
Reply
#9

Okay thanks, I appreciate the info.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by FaradaysPC
02-Aug-2022, 08:49 PM
Last Post by Steven
12-Nov-2018, 12:48 PM
Last Post by HGsunday
04-Jul-2018, 09:42 AM
Last Post by Steven
14-Apr-2017, 11:56 AM
Last Post by hentes
06-Nov-2016, 01:36 PM
Last Post by Steven
24-Jan-2016, 08:24 PM
Last Post by adb34
22-Sep-2015, 03:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)