Skip to content

Instantly share code, notes, and snippets.

@escopecz
Forked from alanhartless/cron.php
Last active April 18, 2023 22:43
Show Gist options
  • Save escopecz/9a1a0b10861941a457f4 to your computer and use it in GitHub Desktop.
Save escopecz/9a1a0b10861941a457f4 to your computer and use it in GitHub Desktop.
Script to run Mautic (https://mautic.org) commands from a URL.
<?php
if (!isset($_GET['ILoveMauticReallyIDo'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
'mautic:leadlists:update',
'mautic:campaigns:update',
'mautic:campaigns:trigger',
'mautic:email:process',
'mautic:fetch:email',
'doctrine:migrations:migrate',
'doctrine:schema:update --dump-sql',
'doctrine:schema:update --force'
);
if (!isset($_GET['task'])) {
echo 'Specify what task to run. You can run these:';
foreach ($allowedTasks as $task) {
$href = $link . '&task=' . urlencode($task);
echo '<br><a href="' . $href . '">' . $href . '</a>';
}
echo '<br><a href="https://www.mautic.org/docs/setup/index.html">Read more</a>';
echo '<br><b style="color:red">Please, backup your database before executing the doctrine commands!</b>';
die;
}
$task = urldecode($_GET['task']);
if (!in_array($task, $allowedTasks)) {
echo 'Task ' . $task . ' is not allowed.';
die;
}
$fullCommand = explode(' ', $task);
$command = $fullCommand[0];
$argsCount = count($fullCommand) - 1;
$args = array('console', $command);
if ($argsCount) {
for ($i = 1; $i <= $argsCount; $i++) {
$args[] = $fullCommand[$i];
}
}
echo '<h3>Executing ' . implode(' ', $args) . '</h3>';
require_once __DIR__.'/app/bootstrap.php.cache';
require_once __DIR__.'/app/AppKernel.php';
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\BufferedOutput;
defined('IN_MAUTIC_CONSOLE') or define('IN_MAUTIC_CONSOLE', 1);
try {
$input = new ArgvInput($args);
$output = new BufferedOutput();
$kernel = new AppKernel('prod', false);
$app = new Application($kernel);
$app->setAutoExit(false);
$result = $app->run($input, $output);
echo "<pre>\n".$output->fetch().'</pre>';
} catch (\Exception $exception) {
echo $exception->getMessage();
}
@khaoua
Copy link

khaoua commented Feb 21, 2017

Hi Guys

I'm pretty new to Mautic, and have no coding skills (yet lol) I'm an SAP expert, but starting with those digital tools like this marketing automation tool that looks pretty efficient, so let me get time to get use with it :-)
Can you guys let me know how I can use this latest update concretely? I follow the steps with url as I have put the php file in our servers in mautic root directory, but when I insert in chrome navigator xxx.com/commands.php?secretphrase, nothing happens at all, I must have missed something as nothing occurs and only website is poping up
I've downloaded the latest zip file to proceed, but I'm a bit lost, so if you guys can show me the exact steps of what I should exactly do that would help
I could download the plugin available in this procedure here below
https://cronfig.io/

But we have only a max of 3 Crons runing in batch job, so if I could make a run of more to get more efficient, this script seems to work from the latest comments so if you can let me know how to proceed as pure beginner that would be great, many thanks in advance for your help

@khaoua
Copy link

khaoua commented Feb 22, 2017

I tested it on my shared host, I put it in the root file of my website, called the script in URL and nothing happens, can you guys let me know what's the issue or if I missed something?

I've put it this way in the url: http://xxx.com/cronjobfile.php

it displays the wordpress initial website page, nothing else

any thought?

@khaoua
Copy link

khaoua commented Feb 22, 2017

ok, sorry, forgot the secret phrase, and renamed correctly the file, so I did get the web page with all the links, when I click in one link, for example, leads update I get: "Executing console mautic:leadlists:update"
any info of where should we see the evolution or logs of those script to know that they went well?

@khaoua
Copy link

khaoua commented Feb 22, 2017

ok, I've just opened a free account to test them on easycron, segment, campaign are failing, those are the only ones I've tested, but there is an issue, so, if you guys have some tips, feel free to share

@khaoua
Copy link

khaoua commented Feb 22, 2017

Hello
I found the mistake, it works now on easycron, jobs succeed

when in a post above it said: "When you execute the URL form 4., you should get the list of available commands with URL addresses. You can try to click on those to run the command manually or insert those URL addresses to a cron UI provided by your web hosting company"

Actually, there is a clarification to be done: The links for crons shown after they are generated from initial link with secret phrase, they can be copied, but we should remove the secret phrase that is still in the url link, then, it works, at least it worked this way for me

@khaoua
Copy link

khaoua commented Feb 22, 2017

Hello
I found the mistake, it works now on easycron, jobs succeed

when in a post above it said: "When you execute the URL form 4., you should get the list of available commands with URL addresses. You can try to click on those to run the command manually or insert those URL addresses to a cron UI provided by your web hosting company"

Actually, there is a clarification to be done: The links for crons shown after they are generated from initial link with secret phrase, they can be copied, but we should remove the secret phrase that is still in the url link, then, it works, at least it worked this way for me

@4evermaat
Copy link

4evermaat commented May 2, 2018

@escopecz, @alanhartless, any particular reason why you have not merged the fork that updated your commands.php which seems to be outdated for more recent mautic installs:
https://gist.github.com/ChgoChad/fe9950c628ad8169cd27a58ee64106e8

@drew-san
Copy link

I get the same error regardless of what I do.

Fatal error: Class 'Symfony\Component\HttpKernel\Kernel' not found in /home/listed7/mautic/app/AppKernel.php on line 23

I'm trying to upgrade to version 2.15 and when I check the status of the schema it says: An error occurred while updating the database. Check log for more details.

Here's the log:

[2019-02-21 07:08:59] mautic.NOTICE: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command doctrine:migrations:migrate [] []
[2019-02-21 07:08:59] mautic.ERROR: [UPGRADE ERROR] Exit code 1; Mautic Migrations \ Migrating up to 20181011150000 from 20160225000000 \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ ++ migrating 20160615000000 \ -> DROP INDEX mauia_email_date_read ON mauia_email_stats -> CREATE INDEX mauia_email_date_read ON mauia_email_stats (date_read) \ ++ migrated (0.46s) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ ++ migrating 20160712000000 \ -> UPDATE mauia_lead_fields SET properties = 'a:2:{s:9:"roundmode";s:1:"4";s:9:"precision";s:1:"2";}' WHERE alias = 'attribution' \ ++ migrated (0.63s) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ ++ migrating 20160720000000 \ -> DELETE FROM mauia_lead_utmtags WHERE utm_campaign is null and utm_content is null and utm_medium is null and utm_source is null and utm_term is null \ ++ migrated (0.51s) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ ++ migrating 20160726000001 \ -> ALTER TABLE mauia_emails ADD CONSTRAINT FK_884DEBD89091A2FB FOREIGN KEY (translation_parent_id) REFERENCES mauia_emails (id) ON DELETE CASCADE -> ALTER TABLE mauia_emails ADD CONSTRAINT FK_884DEBD891861123 FOREIGN KEY (variant_parent_id) REFERENCES mauia_emails (id) ON DELETE CASCADE -> ALTER TABLE mauia_pages DROP FOREIGN KEY FK_8D3DD78C9091A2FB -> ALTER TABLE mauia_pages ADD CONSTRAINT FK_8D3DD78C9091A2FB FOREIGN KEY (translation_parent_id) REFERENCES mauia_pages (id) ON DELETE CASCADE -> ALTER TABLE mauia_pages DROP FOREIGN KEY FK_8D3DD78C91861123 -> ALTER TABLE mauia_pages ADD CONSTRAINT FK_8D3DD78C91861123 FOREIGN KEY (variant_parent_id) REFERENCES mauia_pages (id) ON DELETE CASCADE -> ALTER TABLE mauia_dynamic_content ADD CONSTRAINT FK_DC89FADD9091A2FB FOREIGN KEY (translation_parent_id) REFERENCES mauia_dynamic_content (id) ON DELETE CASCADE -> ALTER TABLE mauia_dynamic_content ADD CONSTRAINT FK_DC89FADD91861123 FOREIGN KEY (variant_parent_id) REFERENCES mauia_dynamic_content (id) ON DELETE CASCADE \ ++ migrated (0.62s) \ SS skipped (Reason: Schema includes this migration) \ ++ migrating 20160731000000 \ -> update mauia_campaign_lead_event_log log inner join mauia_campaign_events events on log.event_id = events.id set log.metadata = 'a:0:{}' where events.type = 'email.send' and log.metadata = 'a:2:{s:6:"failed";i:1;s:6:"reason";s:50:"mautic.notification.campaign.failed.not_subscribed";}' -> ALTER TABLE mauia_dynamic_content DROP FOREIGN KEY FK_DC89FADD9091A2FB -> ALTER TABLE mauia_dynamic_content DROP FOREIGN KEY FK_DC89FADD91861123 -> ALTER TABLE mauia_emails DROP FOREIGN KEY FK_884DEBD89091A2FB -> ALTER TABLE mauia_emails DROP FOREIGN KEY FK_884DEBD891861123 \ ++ migrated (0.39s) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ ++ migrating 20160926182807 \ -> insert into mauia_companies (companyname, is_published) (SELECT DISTINCT TRIM(company), 1 from mauia_leads l left join mauia_companies c ON l.company = c.companyname where company IS NOT NULL and company <> '' and c.companyname is null) -> insert into mauia_companies_leads (company_id, lead_id, date_added, manually_added, manually_removed) SELECT c.id, l.id, '2019-02-21 15:08:33', 0, 0 from mauia_leads l join mauia_companies c on c.companyname = l.company ON DUPLICATE KEY UPDATE company_id = c.id; \ ++ migrated (0.49s) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ ++ migrating 20161123225456 \ Migration 20161123225456 was executed but did not result in any SQL statements. \ ++ migrated (0.5s) \ ++ migrating 20161124145649 \ -> ALTER TABLE mauia_lead_frequencyrules CHANGE frequency_number frequency_number SMALLINT DEFAULT NULL; -> ALTER TABLE mauia_lead_frequencyrules CHANGE frequency_time frequency_time VARCHAR(25) DEFAULT NULL; \ ++ migrated (0.47s) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ ++ migrating 20170108012944 \ -> ALTER TABLE mauia_push_notifications CHANGE button button LONGTEXT NULL -> ALTER TABLE mauia_dynamic_content_lead_data DROP FOREIGN KEY FK_88B9AD9955458D -> ALTER TABLE mauia_dynamic_content_lead_data CHANGE lead_id lead_id INT NOT NULL -> ALTER TABLE mauia_dynamic_content_lead_data ADD CONSTRAINT FK_88B9AD9955458D FOREIGN KEY (lead_id) REFERENCES mauia_leads (id) ON DELETE CASCADE \ ++ migrated (0.41s) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ SS skipped (Reason: Schema includes this migration) \ ++ migrating 20171024153459 \ -> ALTER TABLE mauia_reports ADD is_scheduled TINYINT(1) NOT NULL, ADD schedule_unit VARCHAR(255) DEFAULT NULL, ADD schedule_day VARCHAR(255) DEFAULT NULL, ADD schedule_month_frequency VARCHAR(255) DEFAULT NULL \ ++ migrated (0.48s) \ ++ migrating 20171027134920 \ -> CREATE TABLE IF NOT EXISTS mauia_reports_schedulers (id INT AUTO_INCREMENT NOT NULL, report_id INT NOT NULL, schedule_date DATETIME NOT NULL COMMENT '(DC2Type:datetime)', INDEX IDX_C50028034BD2A4C0 (report_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB -> ALTER TABLE mauia_reports_schedulers ADD CONSTRAINT FK_C50028034BD2A4C0 FOREIGN KEY (report_id) REFERENCES mauia_reports (id) ON DELETE CASCADE \ ++ migrated (0.5s) \ ++ migrating 20171031164327 \ -> ALTER TABLE mauia_reports ADD to_address VARCHAR(255) DEFAULT NULL \ ++ migrated (0.59s) \ ++ migrating 20171208130606 \ -> ALTER TABLE mauia_lead_devices ADD tracking_id VARCHAR(255) DEFAULT NULL \ ++ migrated (0.89s) \ ++ migrating 20180105090000 \ -> ALTER TABLE mauia_pages CHANGE redirect_url redirect_url VARCHAR(2048) DEFAULT NULL; \ ++ migrated (0.54s) \ ++ migrating 20180117141613 \ -> ALTER TABLE mauia_tweets CHANGE text text VARCHAR(280) NOT NULL \ ++ migrated (0.56s) \ ++ migrating 20180201184933 \ -> ALTER TABLE mauia_assets ADD disallow TINYINT(1) NOT NULL; \ ++ migrated (0.65s) \ ++ migrating 20180220212444 \ -> ALTER TABLE mauia_pages ADD no_index tinyint(1) DEFAULT NULL \ ++ migrated (0.63s) \ ++ migrating 20180329185634 \ -> ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D Migration 20180329185634 failed during Execution. Error An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Exception\DriverException] An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Driver\Mysqli\MysqliException] Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ doctrine:migrations:migrate [--write-sql] [--dry-run] [--query-time] [--allow-no-migration] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] [] \ [] []
[2019-02-21 07:08:59] mautic.WARNING: PHP Warning - Error while sending STMT_PREPARE packet. PID=589514 - in file /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php - at line 99 [] []
[2019-02-21 07:08:59] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing 'SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.username AS username_11, m0_.password AS password_12, m0_.first_name AS first_name_13, m0_.last_name AS last_name_14, m0_.email AS email_15, m0_.position AS position_16, m0_.timezone AS timezone_17, m0_.locale AS locale_18, m0_.last_login AS last_login_19, m0_.last_active AS last_active_20, m0_.online_status AS online_status_21, m0_.preferences AS preferences_22, m0_.signature AS signature_23, m1_.is_published AS is_published_24, m1_.date_added AS date_added_25, m1_.created_by AS created_by_26, m1_.created_by_user AS created_by_user_27, m1_.date_modified AS date_modified_28, m1_.modified_by AS modified_by_29, m1_.modified_by_user AS modified_by_user_30, m1_.checked_out AS checked_out_31, m1_.checked_out_by AS checked_out_by_32, m1_.checked_out_by_user AS checked_out_by_user_33, m1_.id AS id_34, m1_.name AS name_35, m1_.description AS description_36, m1_.is_admin AS is_admin_37, m1_.readable_permissions AS readable_permissions_38, m0_.role_id AS role_id_39 FROM mauia_users m0_ LEFT JOIN mauia_roles m1_ ON m0_.role_id = m1_.id WHERE (m0_.username = ? OR m0_.email = ?) AND m0_.is_published = ?' with params ["drewsan44", "drewsan44", 1]: MySQL server has gone away" at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 {"exception":"[object] (Doctrine\DBAL\Exception\DriverException(code: 0): An exception occurred while executing 'SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.username AS username_11, m0_.password AS password_12, m0_.first_name AS first_name_13, m0_.last_name AS last_name_14, m0_.email AS email_15, m0_.position AS position_16, m0_.timezone AS timezone_17, m0_.locale AS locale_18, m0_.last_login AS last_login_19, m0_.last_active AS last_active_20, m0_.online_status AS online_status_21, m0_.preferences AS preferences_22, m0_.signature AS signature_23, m1_.is_published AS is_published_24, m1_.date_added AS date_added_25, m1_.created_by AS created_by_26, m1_.created_by_user AS created_by_user_27, m1_.date_modified AS date_modified_28, m1_.modified_by AS modified_by_29, m1_.modified_by_user AS modified_by_user_30, m1_.checked_out AS checked_out_31, m1_.checked_out_by AS checked_out_by_32, m1_.checked_out_by_user AS checked_out_by_user_33, m1_.id AS id_34, m1_.name AS name_35, m1_.description AS description_36, m1_.is_admin AS is_admin_37, m1_.readable_permissions AS readable_permissions_38, m0_.role_id AS role_id_39 FROM mauia_users m0_ LEFT JOIN mauia_roles m1_ ON m0_.role_id = m1_.id WHERE (m0_.username = ? OR m0_.email = ?) AND m0_.is_published = ?' with params ["drewsan44", "drewsan44", 1]:\n\nMySQL server has gone away at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): MySQL server has gone away at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:101)"} []
[2019-02-21 15:10:08] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.name AS name_11, m0_.description AS description_12, m0_.publish_up AS publish_up_13, m0_.publish_down AS publish_down_14, m0_.canvas_settings AS canvas_settings_15, m0_.allow_restart AS allow_restart_16, m1_.is_published AS is_published_17, m1_.date_added AS date_added_18, m1_.created_by AS created_by_19, m1_.created_by_user AS created_by_user_20, m1_.date_modified AS date_modified_21, m1_.modified_by AS modified_by_22, m1_.modified_by_user AS modified_by_user_23, m1_.checked_out AS checked_out_24, m1_.checked_out_by AS checked_out_by_25, m1_.checked_out_by_user AS checked_out_by_user_26, m1_.id AS id_27, m1_.title AS title_28, m1_.description AS description_29, m1_.alias AS alias_30, m1_.color AS color_31, m1_.bundle AS bundle_32, m0_.category_id AS category_id_33 FROM mauia_campaigns m0_ LEFT JOIN mauia_categories m1_ ON m0_.category_id = m1_.id': Unknown column 'm0_.allow_restart' in 'field list' (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 while running console command mautic:campaigns:rebuild [] []
[2019-02-21 15:10:09] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.name AS name_11, m0_.description AS description_12, m0_.publish_up AS publish_up_13, m0_.publish_down AS publish_down_14, m0_.canvas_settings AS canvas_settings_15, m0_.allow_restart AS allow_restart_16, m1_.is_published AS is_published_17, m1_.date_added AS date_added_18, m1_.created_by AS created_by_19, m1_.created_by_user AS created_by_user_20, m1_.date_modified AS date_modified_21, m1_.modified_by AS modified_by_22, m1_.modified_by_user AS modified_by_user_23, m1_.checked_out AS checked_out_24, m1_.checked_out_by AS checked_out_by_25, m1_.checked_out_by_user AS checked_out_by_user_26, m1_.id AS id_27, m1_.title AS title_28, m1_.description AS description_29, m1_.alias AS alias_30, m1_.color AS color_31, m1_.bundle AS bundle_32, m0_.category_id AS category_id_33 FROM mauia_campaigns m0_ LEFT JOIN mauia_categories m1_ ON m0_.category_id = m1_.id': Unknown column 'm0_.allow_restart' in 'field list' (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 while running console command mautic:campaigns:trigger [] []
[2019-02-21 15:20:08] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.name AS name_11, m0_.description AS description_12, m0_.publish_up AS publish_up_13, m0_.publish_down AS publish_down_14, m0_.canvas_settings AS canvas_settings_15, m0_.allow_restart AS allow_restart_16, m1_.is_published AS is_published_17, m1_.date_added AS date_added_18, m1_.created_by AS created_by_19, m1_.created_by_user AS created_by_user_20, m1_.date_modified AS date_modified_21, m1_.modified_by AS modified_by_22, m1_.modified_by_user AS modified_by_user_23, m1_.checked_out AS checked_out_24, m1_.checked_out_by AS checked_out_by_25, m1_.checked_out_by_user AS checked_out_by_user_26, m1_.id AS id_27, m1_.title AS title_28, m1_.description AS description_29, m1_.alias AS alias_30, m1_.color AS color_31, m1_.bundle AS bundle_32, m0_.category_id AS category_id_33 FROM mauia_campaigns m0_ LEFT JOIN mauia_categories m1_ ON m0_.category_id = m1_.id': Unknown column 'm0_.allow_restart' in 'field list' (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 while running console command mautic:campaigns:rebuild [] []
[2019-02-21 15:20:08] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.name AS name_11, m0_.description AS description_12, m0_.publish_up AS publish_up_13, m0_.publish_down AS publish_down_14, m0_.canvas_settings AS canvas_settings_15, m0_.allow_restart AS allow_restart_16, m1_.is_published AS is_published_17, m1_.date_added AS date_added_18, m1_.created_by AS created_by_19, m1_.created_by_user AS created_by_user_20, m1_.date_modified AS date_modified_21, m1_.modified_by AS modified_by_22, m1_.modified_by_user AS modified_by_user_23, m1_.checked_out AS checked_out_24, m1_.checked_out_by AS checked_out_by_25, m1_.checked_out_by_user AS checked_out_by_user_26, m1_.id AS id_27, m1_.title AS title_28, m1_.description AS description_29, m1_.alias AS alias_30, m1_.color AS color_31, m1_.bundle AS bundle_32, m0_.category_id AS category_id_33 FROM mauia_campaigns m0_ LEFT JOIN mauia_categories m1_ ON m0_.category_id = m1_.id': Unknown column 'm0_.allow_restart' in 'field list' (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 while running console command mautic:campaigns:trigger [] []
[2019-02-21 15:30:11] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.name AS name_11, m0_.description AS description_12, m0_.publish_up AS publish_up_13, m0_.publish_down AS publish_down_14, m0_.canvas_settings AS canvas_settings_15, m0_.allow_restart AS allow_restart_16, m1_.is_published AS is_published_17, m1_.date_added AS date_added_18, m1_.created_by AS created_by_19, m1_.created_by_user AS created_by_user_20, m1_.date_modified AS date_modified_21, m1_.modified_by AS modified_by_22, m1_.modified_by_user AS modified_by_user_23, m1_.checked_out AS checked_out_24, m1_.checked_out_by AS checked_out_by_25, m1_.checked_out_by_user AS checked_out_by_user_26, m1_.id AS id_27, m1_.title AS title_28, m1_.description AS description_29, m1_.alias AS alias_30, m1_.color AS color_31, m1_.bundle AS bundle_32, m0_.category_id AS category_id_33 FROM mauia_campaigns m0_ LEFT JOIN mauia_categories m1_ ON m0_.category_id = m1_.id': Unknown column 'm0_.allow_restart' in 'field list' (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 while running console command mautic:campaigns:trigger [] []
[2019-02-21 15:30:11] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.name AS name_11, m0_.description AS description_12, m0_.publish_up AS publish_up_13, m0_.publish_down AS publish_down_14, m0_.canvas_settings AS canvas_settings_15, m0_.allow_restart AS allow_restart_16, m1_.is_published AS is_published_17, m1_.date_added AS date_added_18, m1_.created_by AS created_by_19, m1_.created_by_user AS created_by_user_20, m1_.date_modified AS date_modified_21, m1_.modified_by AS modified_by_22, m1_.modified_by_user AS modified_by_user_23, m1_.checked_out AS checked_out_24, m1_.checked_out_by AS checked_out_by_25, m1_.checked_out_by_user AS checked_out_by_user_26, m1_.id AS id_27, m1_.title AS title_28, m1_.description AS description_29, m1_.alias AS alias_30, m1_.color AS color_31, m1_.bundle AS bundle_32, m0_.category_id AS category_id_33 FROM mauia_campaigns m0_ LEFT JOIN mauia_categories m1_ ON m0_.category_id = m1_.id': Unknown column 'm0_.allow_restart' in 'field list' (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 while running console command mautic:campaigns:rebuild [] []
[2019-02-21 07:37:38] mautic.NOTICE: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command doctrine:migrations:migrate [] []
[2019-02-21 07:37:38] mautic.ERROR: [UPGRADE ERROR] Exit code 1; Mautic Migrations \ Migrating up to 20181011150000 from 20180220212444 \ ++ migrating 20180329185634 \ -> ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D Migration 20180329185634 failed during Execution. Error An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Exception\DriverException] An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Driver\Mysqli\MysqliException] Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ doctrine:migrations:migrate [--write-sql] [--dry-run] [--query-time] [--allow-no-migration] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] [] \ [] []
[2019-02-21 15:40:08] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.name AS name_11, m0_.description AS description_12, m0_.publish_up AS publish_up_13, m0_.publish_down AS publish_down_14, m0_.canvas_settings AS canvas_settings_15, m0_.allow_restart AS allow_restart_16, m1_.is_published AS is_published_17, m1_.date_added AS date_added_18, m1_.created_by AS created_by_19, m1_.created_by_user AS created_by_user_20, m1_.date_modified AS date_modified_21, m1_.modified_by AS modified_by_22, m1_.modified_by_user AS modified_by_user_23, m1_.checked_out AS checked_out_24, m1_.checked_out_by AS checked_out_by_25, m1_.checked_out_by_user AS checked_out_by_user_26, m1_.id AS id_27, m1_.title AS title_28, m1_.description AS description_29, m1_.alias AS alias_30, m1_.color AS color_31, m1_.bundle AS bundle_32, m0_.category_id AS category_id_33 FROM mauia_campaigns m0_ LEFT JOIN mauia_categories m1_ ON m0_.category_id = m1_.id': Unknown column 'm0_.allow_restart' in 'field list' (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 while running console command mautic:campaigns:trigger [] []
[2019-02-21 15:40:09] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.name AS name_11, m0_.description AS description_12, m0_.publish_up AS publish_up_13, m0_.publish_down AS publish_down_14, m0_.canvas_settings AS canvas_settings_15, m0_.allow_restart AS allow_restart_16, m1_.is_published AS is_published_17, m1_.date_added AS date_added_18, m1_.created_by AS created_by_19, m1_.created_by_user AS created_by_user_20, m1_.date_modified AS date_modified_21, m1_.modified_by AS modified_by_22, m1_.modified_by_user AS modified_by_user_23, m1_.checked_out AS checked_out_24, m1_.checked_out_by AS checked_out_by_25, m1_.checked_out_by_user AS checked_out_by_user_26, m1_.id AS id_27, m1_.title AS title_28, m1_.description AS description_29, m1_.alias AS alias_30, m1_.color AS color_31, m1_.bundle AS bundle_32, m0_.category_id AS category_id_33 FROM mauia_campaigns m0_ LEFT JOIN mauia_categories m1_ ON m0_.category_id = m1_.id': Unknown column 'm0_.allow_restart' in 'field list' (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 71 while running console command mautic:campaigns:rebuild [] []
[2019-02-21 07:41:56] mautic.NOTICE: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command doctrine:migrations:migrate [] []
[2019-02-21 07:41:56] mautic.ERROR: [UPGRADE ERROR] Exit code 1; Mautic Migrations \ Migrating up to 20181011150000 from 20180220212444 \ ++ migrating 20180329185634 \ -> ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D Migration 20180329185634 failed during Execution. Error An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Exception\DriverException] An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Driver\Mysqli\MysqliException] Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ doctrine:migrations:migrate [--write-sql] [--dry-run] [--query-time] [--allow-no-migration] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] [] \ [] []
[2019-02-21 07:42:41] mautic.NOTICE: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command doctrine:migrations:migrate [] []
[2019-02-21 07:42:41] mautic.ERROR: [UPGRADE ERROR] Exit code 1; Mautic Migrations \ Migrating up to 20181011150000 from 20180220212444 \ ++ migrating 20180329185634 \ -> ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D Migration 20180329185634 failed during Execution. Error An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Exception\DriverException] An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Driver\Mysqli\MysqliException] Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ doctrine:migrations:migrate [--write-sql] [--dry-run] [--query-time] [--allow-no-migration] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] [] \ [] []
[2019-02-21 07:42:42] mautic.NOTICE: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command doctrine:migrations:migrate [] []
[2019-02-21 07:42:42] mautic.ERROR: [UPGRADE ERROR] Exit code 1; Mautic Migrations \ Migrating up to 20181011150000 from 20180220212444 \ ++ migrating 20180329185634 \ -> ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D Migration 20180329185634 failed during Execution. Error An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Exception\DriverException] An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Driver\Mysqli\MysqliException] Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ doctrine:migrations:migrate [--write-sql] [--dry-run] [--query-time] [--allow-no-migration] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] [] \ [] []
[2019-02-21 07:42:46] mautic.NOTICE: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command doctrine:migrations:migrate [] []
[2019-02-21 07:42:47] mautic.ERROR: [UPGRADE ERROR] Exit code 1; Mautic Migrations \ Migrating up to 20181011150000 from 20180220212444 \ ++ migrating 20180329185634 \ -> ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D Migration 20180329185634 failed during Execution. Error An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Exception\DriverException] An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Driver\Mysqli\MysqliException] Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ doctrine:migrations:migrate [--write-sql] [--dry-run] [--query-time] [--allow-no-migration] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] [] \ [] []
[2019-02-21 07:43:46] mautic.NOTICE: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists (uncaught exception) at /home/listed7/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command doctrine:migrations:migrate [] []
[2019-02-21 07:43:46] mautic.ERROR: [UPGRADE ERROR] Exit code 1; Mautic Migrations \ Migrating up to 20181011150000 from 20180220212444 \ ++ migrating 20180329185634 \ -> ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D Migration 20180329185634 failed during Execution. Error An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Exception\DriverException] An exception occurred while executing 'ALTER TABLE mauia_lead_event_log DROP FOREIGN KEY FK_8EFFBC7555458D': \ Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ [Doctrine\DBAL\Driver\Mysqli\MysqliException] Can't DROP FOREIGN KEY FK_8EFFBC7555458D; check that it exists \ doctrine:migrations:migrate [--write-sql] [--dry-run] [--query-time] [--allow-no-migration] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] [] \ [] []

@virgilwashere
Copy link

virgilwashere commented Sep 10, 2019

mautibot

mautic-cron-commands

I have an updated version of the script (https://github.com/virgilwashere/mautic-cron-commands) that supports Mautic 2.15.x

changes

  • 🎨 &pretty output mode
  • 💄 add screenshots of &pretty output
  • 📝 document parameters
  • ✨ add email and sms channels to mautic:campaigns:messages
  • 👌 add --no-interaction to commands that need it
  • ✨ add commands from some popular plugins
  • ✏️ fix mautic:emais:fetch
  • 💥 remove duplicate commands
  • 🚸 move the dangerous commands to the end of the list
  • 🛠️ HTML5 standards compliance
  • 📝 update documentation references

@josefcoribeiro
Copy link

Is this script working for 3.2.4 version? I am receiving an error when executing the one I had for 2.16.5

@josefcoribeiro
Copy link

I am receiving
Forbidden

You don't have permission to access this resource.
and it is working in 2.16.5

@nerddigitalgit
Copy link

This script can be used in shared web hostings which doesn't allow to execute CLI commands to run Mautic cron and maintenance tasks.

How to make it work

  1. Create a PHP file in the root folder of Mautic.
  2. Copy and paste the code of the script above.
  3. Change ILoveMauticReallyIDo in that script to some secret phrase so only you'll be able to run the commands.
  4. Run a command by accessing this URL with your browser http://[yourmautic.com]/commands.php?ILoveMauticReallyIDo. Change[yourmautic.com] to your domain or wherever your Mautic runs and ILoveMauticReallyIDo to your secret phrase form 3.

How to use it

When you execute the URL form 4., you should get the list of available commands with URL addresses. You can try to click on those to run the command manually or insert those URL addresses to a cron UI provided by your web hosting company.

Or use Cronfig.io

I prepared a cron service at https://cronfig.io if you don't want to deal with a PHP script. Plus it will give you logs in your Mautic administration and monitoring.

I created the file in the root of my mautic installation, updated the secret, and visited the page but I'm seeing a 403 error.
I gave the file full permissions (777) and that did not work.

Do you think this is a limitation of my hosting?

My issue is that I'm not able to update Mautic using the built in upgrade notification. I think my mautic is in between versions at the moment 2.6 and 3.2.

@nerddigitalgit
Copy link

I am receiving
Forbidden

You don't have permission to access this resource.
and it is working in 2.16.5

hey did you find a solution? are you still seeing the "permission denied" message?

I'm still stuck

@dapsdiary
Copy link

dapsdiary commented Jul 23, 2021

Yes .htaccess file needs to include command.php as allowed Sent from my iPhone. Please excuse any typos Best regards,

El 30 jun 2021, a las 13:48, nerddigital @.> escribió: @. commented on this gist. I am receiving Forbidden You don't have permission to access this resource. and it is working in 2.16.5 hey did you find a solution? are you still seeing the "permission denied" message? I'm still stuck — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Please do you mean one needs to copy the content in commands.php into .htaccess file?

@josefcoribeiro
Copy link

No.. edit the file and you have one row with the php files allowed to be executed... you have to add commands. That is all
Please I did not realize that my phone was in the signature so I will appreciate if you edit your message and delete it
Thank you

@dapsdiary
Copy link

No.. edit the file and you have one row with the php files allowed to be executed... you have to add commands. That is all
Please I did not realize that my phone was in the signature so I will appreciate if you edit your message and delete it
Thank you

Thank you for your prompt response. I have also edited my last comment.
I am a rookie please, just one last clarification, please, I'll be grateful.

Do you commands like this as found in the script:
'cache:clear',
'cache:clear --no-warmup',
'mautic:install:data',
'mautic:campaigns:trigger',
'mautic:campaigns:rebuild',
'mautic:social:monitoring',
'mautic:iplookup:download',
'mautic:emails:send',
'mautic:email:fetch',
'mautic:messages:send',
'mautic:integration:fetchleads -i Salesforce',
'mautic:integration:fetchleads --integration=Hubspot',
'mautic:segments:update',
'doctrine:migration:status',
'doctrine:migrations:migrate',
'doctrine:schema:update --dump-sql',
'doctrine:schema:update --force',
'mautic:maintenance:cleanup --days-old=365 --dry-run'
);
or
https://myurl.com/commands.php?secretphase

Kindly assist, I'll be grateful.

@josefcoribeiro
Copy link

josefcoribeiro commented Jul 23, 2021

Just "commands" added in .htaccess after upgrade_V3

Except those whitelisted bellow.

<FilesMatch "^(index|index_dev|filemanager|upgrade|upgrade_v3|commands)\.php$">
    Require all granted
</FilesMatch>

@dapsdiary
Copy link

Just "commands" added in .htaccess after upgrade_V3

Except those whitelisted bellow.

<FilesMatch "^(index|index_dev|filemanager|upgrade|upgrade_v3|commands)\.php$">
    Require all granted
</FilesMatch>

I got it. Thank you.

@Masho123
Copy link

Hello Brother and sisters

i am creating commands.php file but i access it thorogh my browser i receive this error
Untitled

Please help me to resolve this issue i have installed latest version of mautic and facing this error

Uh oh! I think I broke it. If I do it again, please report me to the system administrator!
500 Internal Server Error

mautic not give access to login to my administrator account and i receive this error

Let me know what to do to resolve this prompt

Best Regards
Muhammad Ashfaq

@dsp76
Copy link

dsp76 commented Apr 18, 2023

Hey Muhammad, please read the post above yours - but maybe you solved it meanwhile ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment