Server 500 error after 2.16.0 update attempt

Trying to update an active, working Mautic installation to 2.16.0 following the notification suggestion in the admin area resulted in HTTP ERROR 500. Deleting the contents of /app/cache, as suggested somewhere, did not fix it. What else can I try?

I have no idea how to fix it, no time for this, I had actual work to do. :cry: :sob: :tired_face:

Your software
My Mautic version is: Latest before 2.16.0, canā€™t check what it was, Mautic is dead
My PHP version is: 7.2

Your problem
My problem is: HTTP ERROR 500

These errors are showing in the log: Which log? Where?

Steps I have tried to fix the problem: Deleting cache

Edit:

I guess I should have known this before clicking ā€œthat buttonā€. Why put ā€œthat buttonā€ there if it is not a rock solid solution?!

Edit 2, this fatal error shows up in my root log:

[15-Feb-2020 11:30:02 UTC] PHP Fatal error: require(): Failed opening required ā€˜/home/username/public_html/mautic/vendor/composer/ā€¦/ircmaxell/password-compat/lib/password.phpā€™ (include_path=ā€˜.:/opt/cpanel/ea-php72/root/usr/share/pearā€™) in /home/username/public_html/mautic/vendor/composer/autoload_real.php on line 66

Hi there,

Sorry to hear youā€™ve had a problem with your update.

Did it work when you updated in a test environment, or did you jump right in with updating your production Mautic instance without a test update?

Did the update complete, or did it fail at some point?

Have you followed the steps in the Update Failed documentation here: https://www.mautic.org/docs/en/tips/update-failed.html

If so, please share the output of the steps so we can help you to troubleshoot.

Thank you for your quick response. After some hesitation, I just jumped in with no backups or preparation, assuming that a button in admin area would be reliable.

The installation process apparently stalled on clearing the cache. To be honest, I hadnā€™t even paid attention enough; I assumed it would just complete in the background while I was doing other things.

I will follow the steps now and report backā€¦

Clearing the cache did not fix the problem, as tried before.

I get nothing with this command:

php app/console mautic:update:find

So there is no update available?

Unfortunately we are finding that hosting providers, particularly those on shared hosting, really limit the browser timeout for script execution. During an update some of the tasks can take a while to complete, which can result in the update failing to complete. This can also be the case where there are a lot of leads in the instance.

Best practice is always to have at least a small VPS rather than shared hosting, where you can have full control over your resources and not be limited in this way.

The Product Team are looking at ways we might be able to address this but in the meantime command line update is recommended, especially in shared hosting or where you have a large number of leads.

Appreciate thatā€™s probably not the best news to hear right now, we have made this very clear in all the release announcements and posts about the release to date.

I have a VPS, CentOS 7, SSH access, etc. I am not on a shared server.

Go through the next steps to check you donā€™t have any partial updates please :slight_smile:

I just started following the steps. Give me a minuteā€¦ :wink: Appreciate the quick response.

How can I check for partial updates? I donā€™t see that in the steps.

I also get nothing on this:

php app/console doctrine:migration:status

Iā€™ll skip this one for nowā€¦:

php app/console doctrine:migration:migrate

I get nothing on this:

php app/console doctrine:schema:update --dump-sql

Skipping the next one againā€¦

Iā€™ll move on to step 5, manually uploading files, but will have to do that later in the afternoon (UK time). I have to get out of this cafeā€¦

@rcheesley, any idea what that fatal error in my log could indicate?

[15-Feb-2020 11:30:02 UTC] PHP Fatal error: require(): Failed opening required ā€˜/home/username/public_html/mautic/vendor/composer/ā€¦/ircmaxell/password-compat/lib/password.phpā€™ (include_path=ā€™.:/opt/cpanel/ea-php72/root/usr/share/pearā€™) in /home/username/public_html/mautic/vendor/composer/autoload_real.php on line 66

1 Like

I am now moving on to step 5 of Mautic update failed. Clearing cache or finishing/restarting the update process via SSH did not produce any results.

I have checked if my database still even exists. It is there and has all my data in it. I have exported it now so I have at least something to work with if I have to reconstruct from scratch.

The instructions at point 5, ā€˜Try to update the files manuallyā€™, are very ambiguous. The link for the latest download package looks like you have to register again - I just entered my same email address etc. and itā€™s probably OK, but a bit weird.

I had almost downloaded a zip from Github, but that is a different package?

The 2.16.0 folder does not have all the files and folders I have on my server. Folders I have on the server that are missing from the download:

bin
build
node_modules
tests
upgrade

And a whole bunch of files on my server, not in the download:

codeception.yml
composer.json
composer.lock
etc.

There is also an upgrade_errors.txt file! Here are the full contents of that file - sorryā€¦:

The file containing the list of deleted files was not found, could not process the deleted file list.
Failed to remove the upgrade directory /vendor/symfony/form folder
The file containing the list of deleted files was not found, could not process the deleted file list.
Could not move files from /vendor/lightsaml to production since the folder could not be created.
Could not move file /vendor/ip2location/ip2location-php/databases/IP2LOCATION-LITE-DB1.BIN to production.
Failed to remove the upgrade directory /vendor/mustangostang folder
Failed to remove the upgrade directory /vendor/paragonie folder
Could not move file /vendor/lightsaml/lightsaml/contrib/setup.sh to production.
Could not move file /vendor/lightsaml/lightsaml/src/LightSaml/Resolver/Endpoint/CompositeEndpointResolver.php to production.
Could not move file /vendor/lightsaml/lightsaml/src/LightSaml/Action/Profile/AbstractProfileAction.php to production.
Could not move file /vendor/lightsaml/lightsaml/src/LightSaml/Model/Metadata/EntityDescriptor.php to production.
Failed to remove the upgrade directory /vendor/lightsaml folder
Failed to remove the upgrade directory /vendor/ip2location folder
Could not move files from /vendor/mustangostang to production since the folder could not be created.
Could not move files from /vendor/paragonie to production since the folder could not be created.
Could not move file /vendor/guzzle/guzzle/src/Guzzle/Parser/UriTemplate/UriTemplate.php to production.
Could not move file /vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequestInterface.php to production.
Could not move file /vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php to production.
Failed to remove the upgrade directory /vendor/guzzle folder
Failed to remove the upgrade directory /vendor/phpoption folder
Failed to remove the upgrade directory /vendor/noxlogic folder
Could not move files from /vendor/guzzle to production since the folder could not be created.
Failed to remove the upgrade directory /vendor/cweagans folder
Could not move files from /vendor/phpoption to production since the folder could not be created.
Could not move files from /vendor/noxlogic to production since the folder could not be created.
Could not move files from /vendor/giggsey to production since the folder could not be created.
Could not move file /vendor/giggsey/libphonenumber-for-php/LICENSE to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/PhoneNumberMatch.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/MatchType.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/PhoneNumberType.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/ShortNumberMetadata_PY.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/PhoneNumberMetadata_GM.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/ShortNumberMetadata_AO.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/PhoneNumberMetadata_ZM.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/PhoneNumberMetadata_AD.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/PhoneNumberMetadata_CF.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/ShortNumberMetadata_AG.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/PhoneNumberMetadata_RE.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/ShortNumberMetadata_TD.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/PhoneNumberMetadata_PW.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/ShortNumberMetadata_FJ.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/PhoneNumberMetadata_NZ.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/ShortNumberMetadata_CR.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/PhoneNumberMetadata_KW.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/PhoneNumberMetadata_GI.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/ShortNumberMetadata_OM.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/ShortNumberMetadata_CU.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/PhoneNumberMetadata_GD.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/ShortNumberMetadata_AX.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/ShortNumberMetadata_LV.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/data/PhoneNumberMetadata_CD.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/carrier/data/en/380.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/carrier/data/en/20.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/carrier/data/en/212.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/carrier/data/en/213.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/carrier/data/en/679.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/carrier/data/en/420.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/carrier/data/en/373.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/carrier/data/en/45.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/carrier/data/en/58.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/carrier/data/en/356.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/carrier/data/en/39.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/ShortNumberCost.php to production.
Could not move file /vendor/giggsey/libphonenumber-for-php/src/PhoneNumberToTimeZonesMapper.php to production.
Could not move file /vendor/giggsey/locale/data/sq.php to production.
Could not move file /vendor/giggsey/locale/data/ne.php to production.
Could not move file /vendor/giggsey/locale/data/shi.php to production.
Could not move file /vendor/giggsey/locale/data/dyo.php to production.
Could not move file /vendor/giggsey/locale/data/fa.php to production.
Could not move file /vendor/giggsey/locale/data/ti.php to production.
Could not move file /vendor/giggsey/locale/data/es-co.php to production.
Could not move file /vendor/giggsey/locale/data/fr.php to production.
Could not move file /vendor/giggsey/locale/data/os.php to production.
Could not move file /vendor/giggsey/locale/data/uz.php to production.
Could not move file /vendor/giggsey/locale/data/sk.php to production.
Could not move file /vendor/giggsey/locale/data/cs.php to production.
Could not move file /vendor/giggsey/locale/data/hr.php to production.
Could not move file /vendor/giggsey/locale/data/es-pe.php to production.
Could not move file /vendor/giggsey/locale/data/es-cr.php to production.
Could not move file /vendor/giggsey/locale/data/ks.php to production.
Could not move file /vendor/giggsey/locale/data/dsb.php to production.
Could not move file /vendor/giggsey/locale/data/de-at.php to production.
Could not move file /vendor/giggsey/locale/data/ksf.php to production.
Failed to remove the upgrade directory /vendor/giggsey folder
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/Common/Service/Catalog.php to production.
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/Common/Service/CatalogService.php to production.
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/Common/Service/CatalogItem.php to production.
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/Common/Service/ServiceInterface.php to production.
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/Common/Service/ServiceBuilder.php to production.
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/Common/Service/Endpoint.php to production.
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/Common/Service/NovaService.php to production.
Could not move files from /vendor/rackspace/php-opencloud/lib/OpenCloud/Common/Constants to production since the folder could not be created.
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/CloudMonitoring/Exception/TestException.php to production.
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/CloudMonitoring/Exception/MetricException.php to production.
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/CloudMonitoring/Exception/EntityException.php to production.
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/Version.php to production.
Could not move files from /vendor/rackspace/php-opencloud/lib/OpenCloud/Database to production since the folder could not be created.
Could not move files from /vendor/rackspace/php-opencloud/lib/OpenCloud/Identity to production since the folder could not be created.
Could not move files from /vendor/aws to production since the folder could not be created.
Failed to remove the upgrade directory /vendor/aws folder
Could not move files from /vendor/rackspace/php-opencloud/lib/OpenCloud/Common/Collection to production since the folder could not be created.
Could not move file /vendor/rackspace/php-opencloud/lib/OpenCloud/CloudMonitoring/Resource/NotificationPlan.php to production.
Could not move files from /vendor/rackspace/php-opencloud/lib/OpenCloud/Queues to production since the folder could not be created.
Failed to remove the upgrade directory /vendor/rackspace folder
Could not read directory /vendor/sensiolabs to move files.
Could not read directory /vendor/jbroadway to move files.
Could not move file /vendor/aws/aws-sdk-php/.changes/3.26.2 to production.
Could not move file /vendor/aws/aws-sdk-php/.changes/3.36.6 to production.
Could not move file /vendor/aws/aws-sdk-php/.changes/3.67.0 to production.
Could not move file /vendor/aws/aws-sdk-php/.changes/3.36.16 to production.
Could not move file /vendor/aws/aws-sdk-php/.changes/3.31.5 to production.
Could not move file /vendor/php-http/message-factory/LICENSE to production.
Could not move file /vendor/php-http/message/src/Exception.php to production.
Could not read directory /vendor/php-http/message/src/MessageFactory to move files.
Failed to remove the upgrade directory /vendor/php-http folder
Could not move files from /vendor/jms to production since the folder could not be created.
Failed to remove the upgrade directory /vendor/robrichards folder
Could not move files from /vendor/php-http to production since the folder could not be created.
Could not move file /vendor/jms/serializer/src/JMS/Serializer/Metadata/Driver/AbstractDoctrineTypeDriver.php to production.
Could not move file /vendor/jms/serializer/src/JMS/Serializer/EventDispatcher/EventDispatcher.php to production.
Could not move file /vendor/jms/serializer/src/JMS/Serializer/Annotation/Since.php to production.
Could not move file /vendor/jms/serializer/src/JMS/Serializer/Annotation/XmlAttributeMap.php to production.
Could not move file /vendor/jms/serializer/src/JMS/Serializer/Annotation/SkipWhenEmpty.php to production.
Could not move file /vendor/jms/serializer/src/JMS/Serializer/Annotation/XmlMap.php to production.
Could not move file /vendor/jms/serializer/src/JMS/Serializer/Annotation/Until.php to production.
Could not move file /vendor/jms/serializer/src/JMS/Serializer/Annotation/Expose.php to production.
Failed to remove the upgrade directory /vendor/jms folder
Could not move files from /vendor/robrichards to production since the folder could not be created.
Could not move file /vendor/willdurand/jsonp-callback-validator/LICENSE to production.
Could not move file /vendor/willdurand/oauth-server-bundle/Propel/RequestTokenQuery.php to production.
Could not read directory /vendor/willdurand/oauth-server-bundle/Propel/Provider to move files.
Could not move file /vendor/willdurand/oauth-server-bundle/Propel/AccessToken.php to production.
Failed to remove the upgrade directory /vendor/willdurand folder
Failed to remove the upgrade directory /vendor/phpcollection folder
Could not move files from /vendor/psr to production since the folder could not be created.
Failed to remove the upgrade directory /vendor/stack folder
Could not move files from /vendor/willdurand to production since the folder could not be created.
Failed to remove the upgrade directory /vendor/psr folder
Could not move files from /vendor/stack to production since the folder could not be created.
Could not move files from /vendor/sendgrid to production since the folder could not be created.
Could not move files from /vendor/clue to production since the folder could not be created.
Failed to remove the upgrade directory /vendor/clue folder
Failed to remove the upgrade directory /vendor/leezy folder
Could not move files from /vendor/sensio to production since the folder could not be created.
Could not move file /vendor/sendgrid/php-http-client/LICENSE.txt to production.
Failed to remove the upgrade directory /vendor/sendgrid folder
Could not move file /vendor/oneup/uploader-bundle/Oneup/UploaderBundle/Uploader/Storage/StorageInterface.php to production.
Failed to remove the upgrade directory /vendor/oneup folder
Could not move files from /vendor/leezy to production since the folder could not be created.
Failed to remove the upgrade directory /vendor/sensio folder
Could not move file /vendor/maxmind-db/reader/LICENSE to production.
Failed to remove the upgrade directory /vendor/maxmind-db folder
Could not move files from /vendor/sparkpost to production since the folder could not be created.
Could not move file /vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php to production.
Could not move file /vendor/twig/twig/lib/Twig/Test.php to production.
Could not move file /vendor/twig/twig/lib/Twig/TokenStream.php to production.
Could not move file /vendor/twig/twig/lib/Twig/FunctionCallableInterface.php to production.
Could not move file /vendor/twig/twig/lib/Twig/TestCallableInterface.php to production.
Could not move files from /vendor/twig/twig/lib/Twig/Util to production since the folder could not be created.
Could not move file /vendor/twig/twig/lib/Twig/TokenParser/Block.php to production.
Could not move file /vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php to production.
Could not move file /vendor/twig/twig/lib/Twig/TokenParser/Do.php to production.
Could not move file /vendor/twig/twig/lib/Twig/TokenParser/With.php to production.
Could not move file /vendor/twig/twig/lib/Twig/TokenParser/From.php to production.
Could not move file /vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php to production.
Could not move file /vendor/twig/twig/lib/Twig/TokenParser/Macro.php to production.
Could not move file /vendor/twig/twig/lib/Twig/TokenParser/Use.php to production.
Could not move file /vendor/twig/twig/lib/Twig/TokenParser/Include.php to production.
Could not move file /vendor/twig/twig/lib/Twig/Compiler.php to production.
Could not move file /vendor/twig/twig/lib/Twig/ParserInterface.php to production.
Could not move file /vendor/twig/twig/lib/Twig/LexerInterface.php to production.
Could not move file /vendor/twig/twig/lib/Twig/FunctionInterface.php to production.
Could not move file /vendor/twig/twig/lib/Twig/CacheInterface.php to production.
Could not move file /vendor/twig/twig/lib/Twig/SimpleFunction.php to production.
Could not move file /vendor/twig/twig/lib/Twig/TokenParserInterface.php to production.
Could not move files from /vendor/twig/twig/lib/Twig/Function to production since the folder could not be created.
Could not move files from /vendor/twig/twig/lib/Twig/Test to production since the folder could not be created.

I am now uploading the 2.16.0 files via FTP, which takes forever. When I unzip zips via SSH, my files usually end up in the wrong places. The folders and files that are on my server, but not in the 2.16.0 download, I will leave untouched. Iā€™ll report back once the files are uploaded.

After reupload of the files, I get the installer:

Mautic Installation - Environment Check
Ready to Install!
Great! Your environment is ready for Mautic.

If I go through this, will I get the option to keep my existing database contents? Or will I have to completely start from scratch?

Let me know or Iā€™ll just have to try after dinnerā€¦

Following the installer, I get this error:

An error occurred while attempting to install the data: An exception occurred while executing ā€˜CREATE INDEX bak_page_hit_url ON bak_page_hits (url)ā€™: SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column ā€˜urlā€™ used in key specification without a key length

When I turn off ā€˜Backup existing tables?ā€™ - my installation is f***ed anywayā€¦ - I get the following error:

An error occurred while attempting to install the data: The stream or file ā€œ/path/to/mautic/public_html/mrktng/app/logs/mautic_prod-2020-02-17.phpā€ could not be opened: failed to open stream: Permission denied

So this looks like I have permission/ownership errors somewhere? The file mautic_prod-2020-02-17.php is indeed owned by root for some reason. How did that happen?!

After fixing that ownership and finishing the process, I now have the reinstalled Mautic with all my data gone. Iā€™ll have to try to restore that from old backups, which will probably not work with version 2.16.0, so Iā€™ll have to roll back to the version I had or find some other way.

Very annoyed. Why do you put that upgrade button in a nagging notification in the admin area if it is not a rock solid, reliable process?

Hi there,

It looks like from your file/folder directory that you have at some point installed via Github, perhaps using a git clone command or by downloading from Github directly (downloading the entire repo) rather than via a release package?

The folders you are mentioning in your comment here: Server 500 error after 2.16.0 update attempt are only supposed to be there in a development environment, as far as Iā€™m aware @dennisameling?

That might be indicative of where the problem lies, because when building in a dev area, you have to run composer to bring in all the relevant libraries etc. otherwise Mautic wonā€™t work correctly.

Passing this over to those with more in-depth experience with the development side of things to see if they can help you with this cc. @escopecz @dennisameling

@modifiedcontent
Very sorry to hear youā€™re having such a hard time with the Mautic upgrade.

Based on the information youā€™ve sent in this thread, Iā€™d like to mention the following:

There are currently three ways to ā€œdownloadā€ Mautic:

  1. From the official website (Download - Mautic Community)
  2. From the ā€œReleasesā€ section on GitHub: Releases Ā· mautic/mautic Ā· GitHub ā†’ at the bottom of every release, thereā€™s a section called ā€œassetsā€ that contains the exact same ZIP files as youā€™d get from the official website.
  3. Clone from GitHub (GitHub - mautic/mautic: Mautic: Open Source Marketing Automation Software.) ā†’ NOTE: this is only for development purposes (e.g. if you want to contribute to Mautic), not for usage in production scenarios!!!

Option 1 and 2 have the following folder structure (the screenshot below is from the Mautic 2.16.0 release, the folder structure will very slightly change with 3.0.0):

image

Option 3 (again, only for developers) also contains build, tests, etc. like you already mentioned above.

So, you have probably cloned from GitHub in the past and used that to install Mautic. This is not a supported scenario and thus may lead to issues in usage and upgrading.

Before we move on to troubleshooting further, Iā€™d like to admit that thereā€™s some things the Mautic team could improve regarding the upgrade process to make it rock-solid. Iā€™m trying to track these things in the following GitHub issue: Make installation/upgrade scripts more robust for different environments Ā· Issue #8452 Ā· mautic/mautic Ā· GitHub. One of the things I just added based on your topic, is

Check if the user uses the official Mautic package or if they cloned from GitHub prior to upgrading and/or installing. The official package contains the right Composer dependencies out of the box, while with the GitHub source code there might be some issues when upgrading

We could e.g. show a clear warning that the user is in a non-supported upgrade scenario which might cause issues during the upgrade or even already at the installation phase.

The database error you reported above, I could indeed reproduce. Created a bug ticket for that: Function "Backup existing tables" in installation process throws error Ā· Issue #8457 Ā· mautic/mautic Ā· GitHub

Letā€™s move on with troubleshooting now. Would you mind trying the following:

  • Download the release version of Mautic 2.16.0 from Download - Mautic Community
  • Extract the folder where you want to install Mautic and ensure your webserver has write permissions to all subfolders in your Mautic folder. Do NOT open the installer.
  • Restore the backup of your 2.16.0 database that you made earlier
  • Create the following file app/config/local.php and add the following contents to it. Try to fill in as many values as you can (you can edit the mailer settings later through Mautic > Configuration):
<?php
$parameters = array(
	'db_driver' => 'pdo_mysql',
	'db_host' => 'db', // Your DB host (often this is localhost)
	'db_table_prefix' => null, // Your DB prefix here (if any)
	'db_port' => '3306', // Your DB port
	'db_name' => 'db', // Your DB name
	'db_user' => 'db', // Your DB user
	'db_password' => 'db', // Your DB password
	'db_backup_tables' => 0,
	'db_backup_prefix' => 'bak_',
	'mailer_from_name' => 'YOUR NAME',
	'mailer_from_email' => 'YOUR EMAIL',
	'mailer_transport' => 'mail',
	'mailer_host' => null,
	'mailer_port' => null,
	'mailer_user' => null,
	'mailer_password' => null,
	'mailer_encryption' => null,
	'mailer_auth_mode' => null,
	'mailer_spool_type' => 'memory',
	'mailer_spool_path' => '%kernel.root_dir%/spool',
	'secret_key' => '038565447ad0e9c743a6e67d29c2212f39b4f73161b717f869c8de78ce61e1e4', // PLEASE REPLACE THIS WITH SOME RANDOM KEY
	'site_url' => 'https://YOUR_MAUTIC_URL', // YOUR MAUTIC URL
);

This uses a fresh copy of the Mautic installation, but with your existing database. Hope this will get you up and running again!

2 Likes

Thanks for all the useful in-dept info. :+1:

I donā€™t have a recent 2.16.0 database backup, only a 2.15.3 database backup from December. I am now trying to restore a 2.15.3 installation.

I had installed with this last time:

wget https://github.com/mautic/mautic/archive/2.15.3.tar.gz

And will use the same this time, to replicate a process that I know to work with the database backup that I have.

I canā€™t find the relevant download in that ā€œReleasesā€ section, at least not with 100% certainty that I am using the right files. Thereā€™s too much confusing stuff there. And then Iā€™d have to just FTP upload? That takes ages.

Will there be any way later to upgrade from a development version of 2.15.3 to a proper production version (?) of 2.16.0?

BTW, is there a way to edit out my server path in my last post? Or delete that post?

I replaced you server path by /path/to/mautic so that should be OK now, could you please confirm?

If you check the release page for 2.15.3, youā€™ll see the following downloads:

You should take the 2.15.3.zip as thatā€™s the production build. The ā€œsource codeā€ downloads (the tar.gz you downloaded) are for development purposes only. Iā€™m pretty sure your database should also work with the production build, as the only differences are on the file level, not in the database.

After installing the production build, you should be able to upgrade to 2.16.0 without issues. Please let us know the results :slight_smile:

1 Like

Apologies for the late response. Thanks for the server path edit.

I have reinstalled 2.15.3 the same way I had originally installed it, with wget https://github.com/mautic/mautic/archive/2.15.3.tar.gz etc. in SSH.

I have followed @Yosu_Cadillaā€™s instructions here to upgrade to 2.16.0. Everything now seems to work.

Does the official upgrade process include these three checks?

php app/console doctrine:migration:migrate

php app/console doctrine:schema:update --force

php app/console cache:clear

1 Like

Thatā€™s great to hear, thanks for reporting back!! :tada:

Normally the php /var/www/html/app/console mautic:update:apply command should cover everything (it also clears the cache for you), but Iā€™ve heard quite some cases where this command is not bullet-proof. The upgrade process in general needs some improvements I think, which weā€™re tracking in https://github.com/mautic/mautic/issues/8452. So stay tuned for improvements in this field!

1 Like