Hie.
I have installed Gibbon on ubuntu 15.10,after some hours ,it gave me
an error ,when i logged out and tried to logg in again ,it gave me
this error ‘Your request failed due to a database error’.
Am using LAMP server and i have tried installed the whole OS for 5
times but after trying to loging in ,still gives me the same error.
Please help.
Vicmarobe,
This error suggests that one of the database settings in file config.php is incorrect. Please can you check that you can connect to the database specified in this file, using the username and password in the file.
Thanks,
Ross
Hi,
I’ve just got this issue too. I’ve checked the config.php file and the db settings are correct. Is there anything else I could try?
Cal,
OK the next step is to work out which of the possible database calls in /login.php might be causing the error. Can you send me the URL you get in your browser when you see ‘Your request failed due to a database error’? You could also check the table gibbonLog in your database to see if there are any related entries there.
Thanks,
Ross
Hi Ross,
It is this URL straight after any user clicks login. The login page works fine.
http://so.wildforums.org/login.php?
There is also nothing in the db from the 5th April which was when I last successfully logged in. Does this mean it isn’t connecting to the db?
Cal
Cal,
If you have logged in before, then has connected to the database at least that time, so that would seem not to be the issue.
The page login.php is a processing page, and shows no content to the user, so you should never see http://so.wildforums.org/login.php? in your address bar. The only reason for this would be something going wrong on the PHP side. When you are on that page, do you see any errors on screen? Most likely not, as they are probably disabled on your server, but they should still be in your PHP error log. Are you able to see if you can get access to your PHP error log, and look for mentions of login.php? How you access the logs depends on whether you have your own server, a hosted server, your OS, etc.
Thanks,
Ross
From the Raw logs this is the first mention of login.php from when it stopped working:
[05/Apr/2017:17:25:57 +0100] “POST /login.php HTTP/1.0” 200 44 “http://so.wildforums.org/” “Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36”
... (ip address removed)-
Do you think it would work to take a backup of the database and reinstall gibbon on a separate subdomain and then load the backup db?
Sorry-me again:
Here is the most recent entry to the error log from today:
[15-Apr-2017 04:02:27 CST6CDT] PHP Fatal error: Uncaught Error: Call to a member function prepare() on null in /home/wildforu/public_html/so/functions.php:3993
Stack trace:
#0 /home/wildforu/public_html/so/index.php(41): getSettingByScope(NULL, ‘System’, ‘cuttingEdgeCode’)
#1 {main}
thrown in /home/wildforu/public_html/so/functions.php on line 3993
Cal, OK, can you set up a PHP info page and check for any references to the PDO library for MySQL. You need the PDO extension installed into PHP in order to connect to the database. My guess is, it is not installed, hence the error. Not sure why it would have worked…and then stopped working, though…Ross.
Cal, actually, on reflection, my assertion makes little sense, as database access is taking place to simply set up the login screen, and you are not getting an error when the instance of the PDO class is set up. Hmmm. At this point, if you don’t have too much in your system, it might be worth a reinstall. If this does not sound feasible, let me know.
Ok, I think I’ve managed to fix it for now. Not sure if it will work for ever but we will see.
I took a backup of the database, then wiped gibbon of the server. I then reinstalled gibbon using the old db settings, restored the old db, changed the config settings to match the old database and so far it seems to work. I’m guessing this works because something was wrong with one of the directory files rather than the database which would explain why the login screen was always working. As I say though-not sure how long this will last…
Good work coming up with another solution. Refreshing all files sometimes fixes such issues in any web-based system…perhaps I should have suggested that first. I’ll add that to the mental check list for future such cases. Glad it is up and running. Hopefully it stays that way.
Hello Team,
I am having this same issue Your request failed due to a database error. . I was filling the Manage department form. Upon hitting the submit button, it brought the error.
Then I closed the browser and re-opened. It took me to the login page and now i can’t login to the system. I have been reading different posts but nothing.
please help on this. This is the second installation i would have in 2 weeks. the first one was saying Too many login attempts and when i clicked on reset password, it comes up with an error.
please help.
Thanks
Hello Once again.
While i was waiting for response, i made a fresh install, now v14.0 . i was updating the data for production purpose. Then the error arose again . Your request failed due to a database error.
I had entered the data manually. Now i am stocked. I can’t login.
please i need a resolution urgently. Really need to get things done.
Thanks
Hello, this is an unusual issue, possible related to the issue above. Are you sure that your MySQL database is up and running, and accessible from your web server? If you can send us the full URL to the page showing the error message, that would also help us dig in to look for a cause and solution. Thanks, Ross.
Thanks.
it was after i added data to the Manage Departments that the error started. I was logged out because i was idle for a long while. then i decided to re-login.from
http://smartcliqueintegratedservices.com/portals` then it took me to
http://smartcliqueintegratedservices.com/portals/login.php?`
and this error was shown Your request failed due to a database error.
this is the third installation and i am seriously looking for a way out.
thanks
If the behaviour switched when preforming a specific action (such as adding a department), and even reinstalling does not resolve the issue, I would guess that this is then a server issue of some kind.
Have you tried restarting the web and database server processes on your server? Have you tried installing the latest software patches on your server? Have you tried restarting the entire server?
Are you running the server yourself, or is it run by a host? Can you tell me more about your server, including PHP and MySQL versions?
Thanks,
Ross
Thanks.
The server is hosted by Qservers.net .
I do my web hosting on this site. So the URL I sent is one of the domains I hosted on Qservers.
These are the details of the php and database.
Database server
Server: Localhost via UNIX socket
Server type: MariaDB
Server version: 5.5.43-MariaDB-log - MariaDB Server
Protocol version: 10
User: cpses_smkuWStBDv@localhost
Server charset: UTF-8 Unicode (utf8)
Web server
cpsrvd 11.60.0.31
Database client version: libmysql - 5.1.73
PHP extension: mysqli
phpMyAdmin
Version information: 4.0.10.14
I hope these details would be useful.
Still need solutions.
Thanks
Hello, whilst Gibbon is not designed with MariaDB in mind, I do have reports from @UrkoM that it works well. He might be able to shed some light on this. I wonder if there is something in your MariaDB setup that is preventing it from working?
In addition I see you have mysqli listed, but Gibbon does not use this, using, instead PDO. Do you have PDO up and running?
Perhaps you can do a test install using MySQL instead of MariaDB and see if that works. Might at least help us narrow in on the issue?