Hello, I am coming toward the end of setting up my second gibbon install but I have come across a problem.
I initially set up Gibbon with a local IP address on the school network and have been using it through this IP address.
I have now got the school’s network admin people to point a URL at this address and now I get the Apache2 default page.
I can still access the server via ssh but not through a web browser, even via the old IP address.
What config files do I need to change to get it working again?
Thank you so much…
I think all you need to change is “absoluteURL” in table “gibbonSetting”.
I got into a bit of a mess trying to do this and I am not good with MySQL. Could you recommend a how-to for this? Or give me some basic advice. I can get as far as the ubuntu command line via SSH but I couldn’t get the database or any table to connect with my rudimentary SQL attempts.
Thank you for your quick reply by the way. Is there a way to do this with just a couple of commands?
Hi sbaldwin, rather than using SQL directly, I’d use a client, such as Sequel Pro or the web-based phpMyAdmin. You could use a command to do it, but you are more likely to make a mistake that impacts other parts of the system. A client will produce and execute the commands for you, via your input into a GUI. The command, if you are interested, would be:
UPDATE gibbonSetting SET value=‘http://portal.oischool.co.uk’ WHERE scope=‘System’ AND name='absoluteURL ';
Note that I’ve removed the trailing slash from the URL, as this is not needed.
However, I think there will be additional steps to take on the server side. In short, Apache uses config files to point URLs to folders within the Apache file system. These config files are located in different places in different OSes: in Ubuntu, for example, they are located in /etc/apache2/sites-available (from memory). Once your config is ready, you can use the a2ensite (Apache2 enable site) to place a link to the file in /etc/apache2/sites-enabled. Restart your web server (sudo server apache2 restart), and the new site comes online.
I hope this helps. If you’d like us to log into your server via SSH and get it set up, we can do this at an hourly rate. Just email firstname.lastname@example.org.
I think I was lucky last time I did this, I managed to log into the web portal before the change completed and changed the settings via system admin. It all went a lot more smoothly!
If I do try to do this via mySQL, how do I connect to the database in the first place to run the command? I think I am ok to change the config files, I have more experience with Ubuntu command line stuff than I do with SQL! Thanks for the quick response!
Sounds like you are almost set. Once you connect via SSH, run the mysql command, which invokes the CLI client for connecting to, and manipulating databases. Once you are connected to the database server, you can specify using a command which database to work on, and the enter the command. Good luck, and let us know how it goes. We’d love to hear more about how you are using Gibbon : )
You are probably much better off using phpMyAdmin. It’s popular, well documented and simple to use. Mysql on the other hand has a steep learning curve, is very error prone and simply a pain to use.
I have used phpMyAdmin with my other (working) Gibbon install but I thought you needed to be able to log in via a web browser to use it. At the moment, due to the change from static ip address to URL, I can only access the Ubuntu Server 18.04 on which Gibbon is running via SSH. I can get to a login page using the old ip address although without graphics etc but when I try to log in it tries to go to the new URL which currently causes a 404 error.
Hi sbaldwin, you are right that you need a working web server to use phpMyAdmin. As such, a desktop client can often get you in faster. I used to use phpMyAdmin, but have gradually switched to a desktop client over the past few years.
What OS are you using on your desktop? I’ll be able to recommend a good client based on this.
I am accessing my webserver remotely via SSH so not sure how to use anything other than command line.
This is what I just tried, I am clearly missing something obvious…
`administrator@ois-lms:~$ mysql -u gibbonuser -p
Welcome to the MariaDB monitor. Commands end with ; or \\g.
Your MariaDB connection id is 72
Server version: 10.1.44-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.
MariaDB [(none)]> gibbonSetting SET value='http://portal.oischool.co.uk' WHERE scope='System' AND name='absoluteURL ';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'gibbonSetting SET value='http://portal.oischool.co.uk' WHERE scope='System' AND ' at line 1
MariaDB [(none)]> UPDATE gibbonSetting SET value='http://portal.oischool.co.uk' WHERE scope='System' AND name='absoluteURL ';
ERROR 1046 (3D000): No database selected`
I know the first time I missed out the UPDATE command but I am not sure why the second attempt also failed. Do I have to connect first? It looked like my first command connected me to gibbonuser.
MariaDB [(none)]> CONNECT gibbonuser
ERROR 1044 (42000): Access denied for user ‘gibbonuser’@‘localhost’ to database ‘gibbonuser’`
The first thing you’ll need to do after entering the password is to select a database:
Just replace the [databaseName] place holder with the name of your own Gibbon database (which you set during the installer).
Is there a way of listing what the databases are?
I keep getting:
MariaDB [(none)]> USE gibbonuser;
ERROR 1049 (42000): Unknown database ‘gibbonuser’`
I followed a how-to to set this up and documented my database as “gibbonuser”
Thank you, I found it! Google is my friend!
Love that Google (other than it hoovering up all my personal data)!
As Ross was mentioning above there are a number of db clients to interact with MariaDB or Mysql.
Based on his comment I started doing a little research and the number of available clients is rather overwhelming.
Sequel Pro is probably a no go for most of us because it’s MacOS only. As a Linux user I started using DBeaver and it works very well so far. It’s rather simple to use comparable to phpMyAdmin and certainly more convenient than using mysql console.
Thanks for diving in. I’ve heard great things about DBeaver, and so nice to have your recommendation too : )