Migration to new VPS

Having a problem getting Nova installed? Can't figure out why something isn't working right? This is the place to get help and report any bugs you find with Nova!

RaWolfe Sun Oct 02, 2016 6:19 am

Migration to new VPS

Hi all,

I'm migrating from shared webhost to a VPS (Digital Ocean) and I'm running into some difficulties :)
You can see the current state of the website here: http://sttornado.nl/

But, since I might change the DNS (so I can have a working fallback for now), the actual server is at 95.85.46.247

What I've done to get this far:

1. I've downloaded a copy of nova to the /var/www/html webroot (version 2.4.4) and unzipped it there. I've amended the permissions to the correct user (www-data).

2. I've exported the MySQL database and imported it into a new database called "tornado" via the command:
Code: Select all
mysql -u root -p tornado < Tornado.sql


2a. When going into mysql and run show tables, I've noticed that all content is however inside pjacobs88_tor (tornado is empty). I've configured the settings as such and, just to be sure, I have given all privileges a new mysql user called pjacobs88_tor to both databases.

3. My database.php is as follows:

Code: Select all
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$active_group = 'default';
$active_record = true;

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'pjacobs88_tor';
$db['default']['password'] = '[color=#FF0000]redacted[/color]';
$db['default']['database'] = 'tornado';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = 'nova_';
$db['default']['pconnect'] = true;
$db['default']['db_debug'] = NOVA_DB_DEBUG;
$db['default']['cache_on'] = false;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = true;
$db['default']['stricton'] = false;


So, I feel I'm 95% there, but I'm still missing "something". What am I overlooking? After looking around for the last few hours, I've been giving up hope :(

Posts: 26


RaWolfe Sun Oct 02, 2016 9:02 am

Re: Migration to new VPS

Fatal error: Uncaught Error: Call to undefined function mysql_pconnect() in /var/www/vhosts/64/264917/webspace/httpdocs/sttornado.nl/nova/ci/database/drivers/mysql/mysql_driver.php:92 Stack trace: #0 /var/www/vhosts/64/264917/webspace/httpdocs/sttornado.nl/nova/ci/database/DB_driver.php(116): CI_DB_mysql_driver->db_pconnect() #1 /var/www/vhosts/64/264917/webspace/httpdocs/sttornado.nl/nova/ci/database/DB.php(149): CI_DB_driver->initialize() #2 /var/www/vhosts/64/264917/webspace/httpdocs/sttornado.nl/nova/ci/core/Loader.php(347): DB(Array, NULL) #3 /var/www/vhosts/64/264917/webspace/httpdocs/sttornado.nl/nova/modules/core/libraries/Nova_controller_main.php(55): CI_Loader->database() #4 /var/www/vhosts/64/264917/webspace/httpdocs/sttornado.nl/nova/modules/core/controllers/nova_main.php(17): Nova_controller_main->__construct() #5 /var/www/vhosts/64/264917/webspace/httpdocs/sttornado.nl/application/controllers/main.php(9): Nova_main->__construct() #6 /var/www/vhosts/64/264917/webspace/httpdocs/sttornado.nl/nova/ci/core/CodeIg in /var/www/vhosts/64/264917/webspace/httpdocs/sttornado.nl/nova/ci/database/drivers/mysql/mysql_driver.php on line 92

Posts: 26


AgentPhoenix Sun Oct 02, 2016 11:44 am

Re: Migration to new VPS

From the error, I'm guessing the VPS is running a version of PHP that doesn't support the MySQL extension (PHP 7 removed those functions altogether). You can switch the DB driver to either mysqli or pdo (I've never tested with PDO in Nova 2 though, so there could be some unforeseen issues with that).
User avatar

Posts: 7566


Q-collective Sun Oct 02, 2016 12:18 pm

Re: Migration to new VPS

AgentPhoenix wrote:From the error, I'm guessing the VPS is running a version of PHP that doesn't support the MySQL extension (PHP 7 removed those functions altogether). You can switch the DB driver to either mysqli or pdo (I've never tested with PDO in Nova 2 though, so there could be some unforeseen issues with that).

Hi there,

I'm RaWolfe's brother, helping out on setting this thing up and actually the author of the OP when I sat at his machine :)

Anyway, the remark about PHP 7 might be the thing we're looking for. The server is running on Ubuntu 16.04 which is certainly running PHP 7 (can't confirm right now though). Is there a recommended way to migrate the database to MySQLi in the case of Nova software? Otherwise I'll just switch to standard RTFM mode and teach myself about the subject :)
User avatar

Posts: 2


AgentPhoenix Sun Oct 02, 2016 12:22 pm

Re: Migration to new VPS

Just change the dbdriver item in the database config file from mysql to mysqli and you should be all set.
User avatar

Posts: 7566


Q-collective Sun Oct 02, 2016 1:39 pm

Re: Migration to new VPS

AgentPhoenix wrote:Just change the dbdriver item in the database config file from mysql to mysqli and you should be all set.

Thank you! That was indeed all that was needed :lol:
User avatar

Posts: 2


RaWolfe Sun Oct 02, 2016 4:26 pm

Re: Migration to new VPS

When I accepted a player I received the following error:

Code: Select all
A Database Error Occurred
Error Number: 1048

Column 'leave_date' cannot be null

UPDATE `nova_users` SET `status` = 'active', `leave_date` = NULL, `access_role` = '4' WHERE `userid` = '41'

Filename: /var/www/html/nova/modules/core/models/nova_users_model.php

Line Number: 635


Any idea?

I also experience in new posting (mission posting or sending pms) that it really takes long to push through?

Posts: 26


AgentPhoenix Mon Oct 03, 2016 8:35 am

Re: Migration to new VPS

Given that you're running a newer version of MySQL (or possibly MariaDB) you may have to modify that specific field in the database to have a default value that isn't null. A lot of things have changed since Nova 2 was built, so on newer versions of software, those sorts of issues can creep in.
User avatar

Posts: 7566


RaWolfe Mon Oct 03, 2016 10:26 am

Re: Migration to new VPS

Fixed that problem indeed, but now I am still having issues with the loading problem of sending messages.

Image

It takes about 2 to 5 minutes before it jumps forward and states that it got sent. How can I fix this?

Posts: 26


AgentPhoenix Mon Oct 03, 2016 3:31 pm

Re: Migration to new VPS

I've never seen anything like that, so I'm not really sure what would be causing that. My only educated guesses would be that the email process is slowing it down or that inserting into the database is slowing it down. Do you have general slowness when doing other things that add or update the database?
User avatar

Posts: 7566


Williams Tue Oct 04, 2016 1:52 pm

Re: Migration to new VPS

I have to say, I recently found Digital Ocean, and I love it. The ability to spin up new instances relatively cheaply, then snapshot them, destroy and rebuild is so easy, and I've started using it for my own non-simming projects.

The one thing I have noticed though is that the default LAMP single-click image tends to be quite basic when it comes to what additional programmes are installed and what apache / php modules are enabled. For example, I don't think the default LAMP stack has mod_rewrite enabled. The firewall also tends to be quite conservative (for example, I had to enable FTP connections on the stack I created).

David: are there any modules that should be enabled or programs installed to the server for Nova to run properly?
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


Williams Tue Oct 04, 2016 1:57 pm

Re: Migration to new VPS

This page might be useful. There some mentions in there about some of the mail functions and the hosts file needing configuring for mail to work properly, as well as a mention about sendmail working really slow on Ubuntu, with a link to another page for that specific issue.
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


AgentPhoenix Wed Oct 05, 2016 9:11 am

Re: Migration to new VPS

Digital Ocean is amazing. All of Anodyne's stuff is running on a DO instance actually. Between that and SMTP email through Mailgun, I've been really happy with it.

As for modules, I'm not really sure because I do all of my server provisioning on DO through Laravel Forge, so they have an instance set up that's really hands off, so I haven't had to deal with provisioning a server through DO's droplets or anything.

No matter what you're doing though, I always highly recommend using an SMTP service to send email instead of using sendmail or PHP's mail function. (It's not an option with CodeIgniter, but if you're using a system built on a more modern framework, letting queues handle email is also another great way to speed up an application. Nova 3 will do that by default... if you have queues set up, it'll use them, otherwise it'll send them like normal.)
User avatar

Posts: 7566


RaWolfe Fri Oct 07, 2016 10:27 am

Re: Migration to new VPS

Thanks for the feedback, I am pleased to announced that with help of Q (my brother) we were able to get it working. What we did is start over from scratch and work our way up, what we did is the following. We changed the engine from LAMP to LEMP setting and the older version 14.04 that supports PHP 5 and MySQL 5 (I believe) that solved the database problem within an eye blink as we had trouble with mysqli.

Now the mail is something I manage to fix, but I am facing the following problem that it accepts almost all mails (gmail, hotmail, yahoo) but not network or providers mail address. I got one member that states that he is not receiving any mail in either inbox or spam box. So I am trying to figure out where to edit this in the server...can someone help me?

I am using btw now sendmail on the server...

~Patrick

Posts: 26


RaWolfe Thu Oct 13, 2016 10:18 am

Re: Migration to new VPS

So I figured state what the problem might have caused the not sending in mail. We looked at everything what plausible cause was of the mail problems with this user. When I reset the account permissions from Standard to Power, the problem was resolved. Thought the problem then escalated towards another user that had the same permissions. So now I changed everyone to Power User and I just got to wait if it works or not.

~Patrick

Posts: 26



Return to Help

Who is online

Users browsing this forum: No registered users and 8 guests

cron