I'm unsure if this is the best forum for this topic but I can't find a better one :)
I am attempting to migrate a Drupal 8 site from shared hosting to a VPS.
I have setup the directory and propagated the Database.
I have setup the mobile only sub domain m.domain.com.
At first I was not able to go to any page(on the primary domain) apart from the front of the website because I would get a 404 error.
I solved this by changing the owner of the files (initially they were set to root) to the correct owner.
I was then able to go to any page of the site (with the primary domain) but I would still get the 404 error when trying to navigate with the sub domain(front page would still show).
Now for some reason the domains have swapped, I can only navigate the whole website using the sub domain and the normal domain only shows the from page with links giving a 404 error again.
What am I missing? I'm guessing it has something to do with WHM and I'm missing an Apache extension?
I've googled and can only find information about older Drupal versions.
Thanks for anyone's input :)
Here's the complete error log that I get after browsing the mobile domain as well as the main domain and getting a 404 error.
[17-Jun-2017 10:44:22 UTC] Error: Class 'Swift_Message' not found in /home/account_name/public_html/modules/swiftmailer/src/Plugin/Mail/SwiftMailer.php on line 172 #0 /home/account_name/public_html/modules/mailsystem/src/Adapter.php(50): Drupal\swiftmailer\Plugin\Mail\SwiftMailer->mail(Array)
#1 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(291): Drupal\mailsystem\Adapter->mail(Array)
#2 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(173): Drupal\Core\Mail\MailManager->doMail('update', 'status_notify', 'admin@name...', 'en', Array, NULL, true)
#3 /home/account_name/public_html/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\Mail\MailManager->Drupal\Core\Mail\{closure}()
#4 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(174): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#5 /home/account_name/public_html/modules/mailsystem/src/MailsystemManager.php(73): Drupal\Core\Mail\MailManager->mail('update', 'status_notify', 'admin@name...', 'en', Array, NULL, true)
#6 /home/account_name/public_html/core/modules/update/update.fetch.inc(41): Drupal\mailsystem\MailsystemManager->mail('update', 'status_notify', 'admin@name...', 'en', Array)
#7 /home/account_name/public_html/core/modules/update/update.module(261): _update_cron_notify()
#8 [internal function]: update_cron()
#9 /home/account_name/public_html/core/lib/Drupal/Core/Extension/ModuleHandler.php(391): call_user_func_array('update_cron', Array)
#10 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(223): Drupal\Core\Extension\ModuleHandler->invoke('update', 'cron')
#11 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(122): Drupal\Core\Cron->invokeCronHandlers()
#12 /home/account_name/public_html/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run()
#13 /home/account_name/public_html/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(65): Drupal\Core\ProxyClass\Cron->run()
#14 /home/account_name/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\automated_cron\EventSubscriber\AutomatedCron->onTerminate(Object(Symfony\Component\HttpKernel\Event\PostResponseEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#15 /home/account_name/public_html/vendor/symfony/http-kernel/HttpKernel.php(84): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.terminat...', Object(Symfony\Component\HttpKernel\Event\PostResponseEvent))
#16 /home/account_name/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#17 /home/account_name/public_html/core/lib/Drupal/Core/DrupalKernel.php(634): Stack\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#18 /home/account_name/public_html/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#19 {main}
[17-Jun-2017 10:44:31 UTC] Error: Class 'Swift_Message' not found in /home/account_name/public_html/modules/swiftmailer/src/Plugin/Mail/SwiftMailer.php on line 172 #0 /home/account_name/public_html/modules/mailsystem/src/Adapter.php(50): Drupal\swiftmailer\Plugin\Mail\SwiftMailer->mail(Array)
#1 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(291): Drupal\mailsystem\Adapter->mail(Array)
#2 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(173): Drupal\Core\Mail\MailManager->doMail('update', 'status_notify', 'admin@name...', 'en', Array, NULL, true)
#3 /home/account_name/public_html/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\Mail\MailManager->Drupal\Core\Mail\{closure}()
#4 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(174): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#5 /home/account_name/public_html/modules/mailsystem/src/MailsystemManager.php(73): Drupal\Core\Mail\MailManager->mail('update', 'status_notify', 'admin@name...', 'en', Array, NULL, true)
#6 /home/account_name/public_html/core/modules/update/update.fetch.inc(41): Drupal\mailsystem\MailsystemManager->mail('update', 'status_notify', 'admin@name...', 'en', Array)
#7 /home/account_name/public_html/core/modules/update/update.module(261): _update_cron_notify()
#8 [internal function]: update_cron()
#9 /home/account_name/public_html/core/lib/Drupal/Core/Extension/ModuleHandler.php(391): call_user_func_array('update_cron', Array)
#10 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(223): Drupal\Core\Extension\ModuleHandler->invoke('update', 'cron')
#11 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(122): Drupal\Core\Cron->invokeCronHandlers()
#12 /home/account_name/public_html/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run()
#13 /home/account_name/public_html/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(65): Drupal\Core\ProxyClass\Cron->run()
#14 /home/account_name/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\automated_cron\EventSubscriber\AutomatedCron->onTerminate(Object(Symfony\Component\HttpKernel\Event\PostResponseEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#15 /home/account_name/public_html/vendor/symfony/http-kernel/HttpKernel.php(84): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.terminat...', Object(Symfony\Component\HttpKernel\Event\PostResponseEvent))
#16 /home/account_name/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#17 /home/account_name/public_html/core/lib/Drupal/Core/DrupalKernel.php(634): Stack\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#18 /home/account_name/public_html/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#19 {main}
[17-Jun-2017 10:44:46 UTC] Error: Class 'Swift_Message' not found in /home/account_name/public_html/modules/swiftmailer/src/Plugin/Mail/SwiftMailer.php on line 172 #0 /home/account_name/public_html/modules/mailsystem/src/Adapter.php(50): Drupal\swiftmailer\Plugin\Mail\SwiftMailer->mail(Array)
#1 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(291): Drupal\mailsystem\Adapter->mail(Array)
#2 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(173): Drupal\Core\Mail\MailManager->doMail('update', 'status_notify', 'admin@name...', 'en', Array, NULL, true)
#3 /home/account_name/public_html/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\Mail\MailManager->Drupal\Core\Mail\{closure}()
#4 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(174): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#5 /home/account_name/public_html/modules/mailsystem/src/MailsystemManager.php(73): Drupal\Core\Mail\MailManager->mail('update', 'status_notify', 'admin@name...', 'en', Array, NULL, true)
#6 /home/account_name/public_html/core/modules/update/update.fetch.inc(41): Drupal\mailsystem\MailsystemManager->mail('update', 'status_notify', 'admin@name...', 'en', Array)
#7 /home/account_name/public_html/core/modules/update/update.module(261): _update_cron_notify()
#8 [internal function]: update_cron()
#9 /home/account_name/public_html/core/lib/Drupal/Core/Extension/ModuleHandler.php(391): call_user_func_array('update_cron', Array)
#10 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(223): Drupal\Core\Extension\ModuleHandler->invoke('update', 'cron')
#11 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(122): Drupal\Core\Cron->invokeCronHandlers()
#12 /home/account_name/public_html/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run()
#13 /home/account_name/public_html/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(65): Drupal\Core\ProxyClass\Cron->run()
#14 /home/account_name/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\automated_cron\EventSubscriber\AutomatedCron->onTerminate(Object(Symfony\Component\HttpKernel\Event\PostResponseEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#15 /home/account_name/public_html/vendor/symfony/http-kernel/HttpKernel.php(84): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.terminat...', Object(Symfony\Component\HttpKernel\Event\PostResponseEvent))
#16 /home/account_name/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#17 /home/account_name/public_html/core/lib/Drupal/Core/DrupalKernel.php(634): Stack\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#18 /home/account_name/public_html/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#19 {main}
[17-Jun-2017 10:44:54 UTC] Error: Class 'Swift_Message' not found in /home/account_name/public_html/modules/swiftmailer/src/Plugin/Mail/SwiftMailer.php on line 172 #0 /home/account_name/public_html/modules/mailsystem/src/Adapter.php(50): Drupal\swiftmailer\Plugin\Mail\SwiftMailer->mail(Array)
#1 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(291): Drupal\mailsystem\Adapter->mail(Array)
#2 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(173): Drupal\Core\Mail\MailManager->doMail('update', 'status_notify', 'admin@name...', 'en', Array, NULL, true)
#3 /home/account_name/public_html/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\Mail\MailManager->Drupal\Core\Mail\{closure}()
#4 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(174): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#5 /home/account_name/public_html/modules/mailsystem/src/MailsystemManager.php(73): Drupal\Core\Mail\MailManager->mail('update', 'status_notify', 'admin@name...', 'en', Array, NULL, true)
#6 /home/account_name/public_html/core/modules/update/update.fetch.inc(41): Drupal\mailsystem\MailsystemManager->mail('update', 'status_notify', 'admin@name...', 'en', Array)
#7 /home/account_name/public_html/core/modules/update/update.module(261): _update_cron_notify()
#8 [internal function]: update_cron()
#9 /home/account_name/public_html/core/lib/Drupal/Core/Extension/ModuleHandler.php(391): call_user_func_array('update_cron', Array)
#10 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(223): Drupal\Core\Extension\ModuleHandler->invoke('update', 'cron')
#11 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(122): Drupal\Core\Cron->invokeCronHandlers()
#12 /home/account_name/public_html/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run()
#13 /home/account_name/public_html/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(65): Drupal\Core\ProxyClass\Cron->run()
#14 /home/account_name/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\automated_cron\EventSubscriber\AutomatedCron->onTerminate(Object(Symfony\Component\HttpKernel\Event\PostResponseEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#15 /home/account_name/public_html/vendor/symfony/http-kernel/HttpKernel.php(84): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.terminat...', Object(Symfony\Component\HttpKernel\Event\PostResponseEvent))
#16 /home/account_name/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#17 /home/account_name/public_html/core/lib/Drupal/Core/DrupalKernel.php(634): Stack\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#18 /home/account_name/public_html/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Render\HtmlResponse))
#19 {main}
Comments
Well, this is your error:
Well, this is your error:
Error: Class 'Swift_Message' not found in /home/account_name/public_html/modules/swiftmailer/src/Plugin/Mail/SwiftMailer.phpLook in that file for the
usedeclaration for the class Swift_Message. See if the file exists in the correct file, and has the correct namespace definition. Ensure the class name matches the file name.Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
Hi Jaypan,
Hi Jaypan,
I've looked in that location and that module does exist with all of its files. Inside the SwiftMailer.php file there is a
use Swift_Message;. Howevere I'm not sure what you mean byInside the Swiftmailer.php I can see many
useThanks for your help. I'm going to try and re-install swift mailer and see what happens.
Just tried to re-add
Just tried to re-add swiftmailer via composer and it give me this error:
Well you're definitely
Well you're definitely missing the library. I can't help you with that though, sorry.
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
No worries mate. I've
No worries mate. Strange that you point out something that wouldn't be causing the problem and then say you can't help but, meh. I've uninstalled that module from the one working sub domain for now and added it to the to-do list :)
Strange that you point out
Well, the missing library was definitely causing the problem - that was the error that was being thrown. But I couldn't help with how to install the library.
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
Well, it definitely isn't
Well, it definitely isn't causing the problem because the website was running fine on shared hosting with the same error being thrown. If it was causing the problem disabling the module would have fixed it, yes? It didn't.
Well, that was a fatal error,
Well, that was a fatal error, not a notice, so it was one of your problems. You should be finding something different in the logs now.
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
Well, the only difference
Well, the only difference with the logs is that error is no longer showing up. There is nothing new. I give up, I'm starting from scratch and going to restore from a backup.
You should look at the server
You should look at the server logs then, not the Drupal logs.
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
I gave up dude, restoring
I gave up dude, restoring from a cPanel backup into WHM looks like a better way to go anyway ;)
After completing a restore
After completing a restore from a backup I now have a rather strange Error:
Error: Call to undefined function Drupal\Component\Uuid\uuid_create() in /home/user/public_html/core/lib/Drupal/Component/Uuid/Pecl.php on line 14Should this not work since it's in core? Any ideas as to what needs to be added to the server for it to work?How are you transferring the
How are you transferring the files? Sounds like your upload may have not completed properly or that you have a permissions problem.
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
I used cPanels backup Secure
I used cPanels backup Secure Copy (SCP) to push the backup directly to the VPS server(it was roughly 20GB). The restore went alright as far as I could tell, everything looks like it's there. What sort of permissions problem could it be? Shouldn't it be identical to the working shared hosting copy?
Hmm, here's a strange thought
Hmm, here's a strange thought and it's quite possibly the reason why this is happening. My VPS only has 25 GB of storage and the backup was 19-ish GB. With the backup on the VPS there wouldn't have been enough space to do a restore. Is my thinking right? Why didn't this occur to me before, Ahh!!! I've sent a message to my host asking if they can perform the backup while temporarily raising my storage space. Thanks for the the infos, you're a life saver :)
That's a very good
That's a very good possibility.
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
restore it locally to check ..
Restore the backup locally, on your local personal machine to check its size.
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...
D8 conflict resolution
With this kind of conflict on D8 and using composer the fix turns out to be easy and only takes a few minutes.
The following solution relies on the concept that you can always refresh your Drupal 8 code using composer, completely, without a problem.
1. Delete the /core and /vendor directories completely.
2. Delete the composer.lock file.
3. run composer install
4. run composer update
The foregoing process will completely rebuild the D8 installation by downloading all of it again from the necessary servers. With this process, the idiot composer utility will resolve the versioning conflicts, because the conflicts it created in its composer.lock file, and elsewhere in the installation, will no longer exist. It is essential to always keep in mind that the composer utility is actually "dumb" software, not smart software, it is crude and archaic, without any heuristic ability to actually resolve the software conflicts it actually ought to.
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...
Thank you for the information
Thank you for the information, Sprite :). It's funny that Composer is as you say "dumb" I always assumed it was a bit "smarter" than that, lol! I'll be sure to follow the steps you've provided to fix the library issue I have.
So an update: My webhost has now restored a fresh backup to my system. Apparently they changed the WHM root password and I'm waiting to here back from them for the new one.
But in the mean time in the Drupal error logs I can see two errors that need to be fixed:
Obviously I need to get into WHM and change the allowed memory for PHP but the Uuid error is STILL there? Any idea why this is happening? Note that the backup was taken from a working Drupal installation on shared hosting.
Making progress this is the
Making progress this is the only error in the log now:
[19-Jun-2017 08:08:19 UTC] PHP Fatal error: Call to undefined function Drupal\Component\Uuid\uuid_create() in /home/user/public_html/core/lib/Drupal/Component/Uuid/Pecl.php on line 14I'm trying to use the method
I'm trying to use the method sprite suggested to re-download all of cores files but I'm getting this error:
I created a backup of the core and vendor folders just in case it didn't work but now after restoring those folders I'm getting this error:
[19-Jun-2017 08:43:10 UTC] PHP Fatal error: Class 'Drupal\Core\DrupalKernel' not found in /home/user/public_html/index.php on line 16What a headache this has turned out to be!
What version of PHP is your
What version of PHP is your server running?
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
Lol, my host left it set to
Lol, my host left it set to 55 I jut upped it to 70 :) I'm now getting the uuid error again however this time it's longer.
Anyone know what PHP profile will work with Drupal 8? Or what Modules and extensions are required? I think the issues there!
Edit: I have now fix the uuid error by switching the PHP handler to suphp.
This error now shows in the logs:
More Headaches :/ I found
php70-phpin the PHP extensions and it's disabled, should I enable it? Enabling it will disableand will also enable
php70-libc-client-staticis also a disabled extension.Fixed ;)
Restored Drupal, Oh, 3-5 times.
But here be the solution for the uuid error and all the other errors!
It's finally working :)
I fixed the first error by editing this file
/core/lib/Drupal/Component/Uuid/Pecl.phpThe Error is on line 14 so I change that function from this:
To this:
There were four of these errors. They were for these files:
I found all the functions that threw errors and wrapped it with:
{ if (isset($module)) {FUNCTION} }.No idea why it works, but
$modulemust stop all these functions from running if it's not a set variable .