# Social Monitoring

**URL:** <https://forum.mautic.org/t/social-monitoring/5064>\
**Category:** Product Support\
**Created:** [August 26, 2016, 11:54am UTC](https://forum.mautic.org/t/social-monitoring/5064 "2016-08-26T11:54:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![mblcote](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mblcote](https://forum.mautic.org/u/mblcote)\
**Post date:** [August 26, 2016, 11:54am UTC](https://forum.mautic.org/t/social-monitoring/5064/1 "2016-08-26T11:54:24Z")

</div>

Hello,  
  
  
  
I am sorry for the amateur question but I am new to Mautic. I have successfully installed Mautic and the Twitter Plugin (or so I think as I was successfully able to validate). I am looking to utilize the Social Monitoring Function to get new leads. Am I correct that the Social Monitoring function will monitor all #'s and mentions on twitter? Or will it only monitor the #'s and mentioned from my current followers?  
  
  
  
I have set up both a mention and a #. Since I have set these up, there have been #'s on twitter that are not populating my leads. Should these be updated real time or can I expect some delay in them showing up in the leads?  
  
  
  
Thanks for the help.

---

<div class="post-metadata">

**Author:** ![mblcote](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mblcote](https://forum.mautic.org/u/mblcote)\
**Post date:** [August 26, 2016, 11:54am UTC](https://forum.mautic.org/t/social-monitoring/5064/2 "2016-08-26T11:54:24Z")

</div>

Hello,

I am sorry for the amateur question but I am new to Mautic. I have successfully installed Mautic and the Twitter Plugin (or so I think as I was successfully able to validate). I am looking to utilize the Social Monitoring Function to get new leads. Am I correct that the Social Monitoring function will monitor all #'s and mentions on twitter? Or will it only monitor the #'s and mentioned from my current followers?

I have set up both a mention and a #. Since I have set these up, there have been #'s on twitter that are not populating my leads. Should these be updated real time or can I expect some delay in them showing up in the leads?

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![mblcote](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mblcote](https://forum.mautic.org/u/mblcote)\
**Post date:** [August 27, 2016, 11:40am UTC](https://forum.mautic.org/t/social-monitoring/5064/3 "2016-08-27T11:40:27Z")

</div>

How do I check this / where do I turn it on?

thanks for the help

---

<div class="post-metadata">

**Author:** ![mblcote](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mblcote](https://forum.mautic.org/u/mblcote)\
**Post date:** [August 29, 2016, 11:36am UTC](https://forum.mautic.org/t/social-monitoring/5064/4 "2016-08-29T11:36:15Z")

</div>

Hello,

Okay I have set up the cron jobs in my cpanel for social monitoring as follows to run every 30 minutes. Still nothing appears to be happening…

This is what I have put in the command line for the cron job. Is this correct?

home2/folder/public\_html/nameofsite/marketing/app/console mautic:social:monitoring

---

<div class="post-metadata">

**Author:** ![mblcote](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mblcote](https://forum.mautic.org/u/mblcote)\
**Post date:** [August 29, 2016, 4:05pm UTC](https://forum.mautic.org/t/social-monitoring/5064/5 "2016-08-29T16:05:10Z")

</div>

I have tried this but it is still not working. I am using shared hosting with bluehost.

This is what I have used

php /home2/folder/public\_html/nameofsite/marketing/app/console mautic:social:monitoring

I have it set to run every 30 minutes but still nothing is being populated under “Social Monitoring”

Anything else I should be checking?

PS - this is also showing up in the error log in the /app folder

29-Aug-2016 11:00:02] PHP Parse error: syntax error, unexpected T\_STRING, expecting T\_CONSTANT\_ENCAPSED\_STRING or ‘(’ in /home2/folder/public\_html/nameofsite/marketing/app/console on line 20

---

<div class="post-metadata">

**Author:** ![mblcote](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mblcote](https://forum.mautic.org/u/mblcote)\
**Post date:** [August 29, 2016, 5:35pm UTC](https://forum.mautic.org/t/social-monitoring/5064/6 "2016-08-29T17:35:33Z")

</div>

5.2.17  
I just updated to:  
5.6.24  
also, I have added the following

php-cli /home2/folder/public\_html/nameofsite/marketing/app/console mautic:social:monitoring -f

---

<div class="post-metadata">

**Author:** ![mblcote](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mblcote](https://forum.mautic.org/u/mblcote)\
**Post date:** [August 29, 2016, 9:33pm UTC](https://forum.mautic.org/t/social-monitoring/5064/7 "2016-08-29T21:33:14Z")

</div>

This is still not working since I have upgraded to PHP 5.6.24 with Bluehost Shared Hosting

Still no contacts or leads being added…

This is the error showing in the log

[29-Aug-2016 17:45:02] PHP Parse error: syntax error, unexpected T\_STRING, expecting T\_CONSTANT\_ENCAPSED\_STRING or ‘(’ in /home2/folder/public\_html/nameofsite/marketing/app/console on line 20

Line 20 is this:

use SymfonyBundleFrameworkBundleConsoleApplication;

I am running PHP 5.6.24 which exceeds the minimum requirements from what I can see

---

<div class="post-metadata">

**Author:** ![mblcote](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mblcote](https://forum.mautic.org/u/mblcote)\
**Post date:** [August 30, 2016, 3:51pm UTC](https://forum.mautic.org/t/social-monitoring/5064/8 "2016-08-30T15:51:23Z")

</div>

Here is a summary to simplify things:

I am using Bluehost CPanel on a Shard Hosting Account. I am running PHP 5.6.24 which exceeds the minimum requirements listed by Mautic.

Social Media Monitoring is not working. In the error log I am getting the following:

[29-Aug-2016 17:45:02] PHP Parse error: syntax error, unexpected T\_STRING, expecting T\_CONSTANT\_ENCAPSED\_STRING or ‘(’ in /home2/folder/public\_html/nameofsite/marketing/app/console on line 20

Line 20 is this:  
use SymfonyBundleFrameworkBundleConsoleApplication;

I am running the following cron jobs every 15 minutes

php public\_html/nameofsite/marketing/app/console mautic:social:monitoring  
php public\_html/nameofsite/marketing/app/console social:monitor:twitter:hashtags  
php public\_html/nameofsite/marketing/app/console social:monitor:twitter:mentions  
php public\_html/nameofsite/marketing/app/console mautic:leadlists:update  
php public\_html/nameofsite/marketing/app/console mautic:campaigns:update  
php public\_html/nameofsite/marketing/app/console mautic:campaigns:trigger  
php public\_html/nameofsite/marketing/app/console mautic:email:process

I have tried changing to php-cli but then nothing seems to happen.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![mblcote](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mblcote](https://forum.mautic.org/u/mblcote)\
**Post date:** [August 30, 2016, 5:36pm UTC](https://forum.mautic.org/t/social-monitoring/5064/9 "2016-08-30T17:36:42Z")

</div>

The output is 5.2 is what I am being told and that is the default. My server is running 5.6.24…

---

<div class="post-metadata">

**Author:** ![mblcote](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mblcote](https://forum.mautic.org/u/mblcote)\
**Post date:** [September 1, 2016, 12:54pm UTC](https://forum.mautic.org/t/social-monitoring/5064/10 "2016-09-01T12:54:40Z")

</div>

See attached image. Can you confirm which version I should be using?

Also, is there any chance that something would need to be changed in .htaccess?

![](http://www.positividy.com/php/PHPinfo.png)

---

<div class="post-metadata">

**Author:** ![mblcote](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mblcote](https://forum.mautic.org/u/mblcote)\
**Post date:** [September 1, 2016, 5:41pm UTC](https://forum.mautic.org/t/social-monitoring/5064/11 "2016-09-01T17:41:06Z")

</div>

I think I have made some progress. The following commands result in the output listed below but do not create any contacts within mautic. Any ideas?

List of Cron Jobs

/usr/php/54/usr/bin/php public\_html/nameofsite/marketing/app/console mautic:social:monitoring  
/usr/php/54/usr/bin/php public\_html/nameofsite/marketing/app/console mautic:leadlists:update  
/usr/php/54/usr/bin/php public\_html/nameofsite/marketing/app/console mautic:campaigns:update  
/usr/php/54/usr/bin/php public\_html/nameofsite/marketing/app/console mautic:campaigns:trigger  
/usr/php/54/usr/bin/php public\_html/nameofsite/marketing/app/console mautic:email:proces  
/usr/php/54/usr/bin/php public\_html/nameofsite/marketing/app/console social:monitor:twitter:hashtags  
/usr/php/54/usr/bin/php public\_html/nameofsite/marketing/app/console social:monitor:twitter:mentions

Results

Mautic version 2.1.1 - app/prod

Usage:  
command [options] [arguments]

Options:  
-h, --help Display this help message  
-q, --quiet Do not output any message  
-V, --version Display this application version  
–ansi Force ANSI output  
–no-ansi Disable ANSI output  
-n, --no-interaction Do not ask any interactive question  
-s, --shell Launch the shell.  
–process-isolation Launch commands from shell as a separate process.  
-e, --env=ENV The Environment name. [default: “prod”]  
–no-debug Switches off debug mode.  
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:  
help Displays help for a command  
list Lists commands  
assets  
assets:install Installs bundles web assets under a public web directory  
bazinga  
bazinga:oauth-server:clean Clean expired tokens  
cache  
cache:clear Clears the cache  
cache:warmup Warms up an empty cache  
config  
config:debug Dumps the current configuration for an extension  
config:dump-reference Dumps the default configuration for an extension  
container  
container:debug Displays current services for an application  
debug  
debug:config Dumps the current configuration for an extension  
debug:container Displays current services for an application  
debug:event-dispatcher Displays configured listeners for an application  
debug:router Displays current routes for an application  
debug:swiftmailer Displays current mailers for an application  
debug:translation Displays translation messages information  
debug:twig Shows a list of twig functions, filters, globals and tests  
doctrine  
doctrine:cache:clear Flush a given cache  
doctrine:cache:clear-collection-region Clear a second-level cache collection region.  
doctrine:cache:clear-entity-region Clear a second-level cache entity region.  
doctrine:cache:clear-metadata Clears all metadata cache for an entity manager  
doctrine:cache:clear-query Clears all query cache for an entity manager

---

<div class="post-metadata">

**Author:** ![rikk03](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@rikk03](https://forum.mautic.org/u/rikk03)\
**Post date:** [October 19, 2016, 12:59pm UTC](https://forum.mautic.org/t/social-monitoring/5064/12 "2016-10-19T12:59:27Z")

</div>

Hello,

You had the command right - almost

You need to turn on a setting in your php.ini file. By default it is switched off by bluehost. Problem with bluehost is that they offer no support for cron jobs so its tricky to even find the path to php (which is not what is widely stated in bluehost forums). If the setting in php.ini is not switched on all Mautic crons will fail.

It says in the notes that the default setting is ON but then it was switch off … strange. It should be

register\_argc\_argv = On

If that doesnt work i think your path to php is wrong. PHP-cli is not necessary, they do not have PHP5.6 cli available anyhow and PHP5.4 is old hat.

I found this works /bin/php56s -q works so

/bin/php56s -q /home2/folder/public\_html/nameofsite/marketing/app/console mautic:social:monitoring

Also check to see if you have duplicates of the following in your php.ini

extension=magickwand.so  
extension=mailparse.so  
extension=oauth.so  
extension=oci8.so  
extension=uploadprogress.so  
zend\_extension=/usr/php/56/usr/lib64/php/modules/ioncube\_loader\_lin.so  
zend\_extension=/usr/php/56/usr/lib64/php/modules/ixed.lin  
zend\_extension=/usr/php/56/usr/lib64/php/modules/ZendGuardLoader.so  
zend\_extension=/usr/php/56/usr/lib64/php/modules/opcache.so

If you have duplicates comment out one copy. I suspect all the extra work is deliberate by bluehost to stop us installing great tools like mautic on shared hosting increasing server overhead.

Ensure you are using the PHP 5.6.24 fastcgi (its so much faster) id guess that its twice as fast.

---

<div class="post-metadata">

**Author:** ![rikk03](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@rikk03](https://forum.mautic.org/u/rikk03)\
**Post date:** [January 25, 2017, 4:05am UTC](https://forum.mautic.org/t/social-monitoring/5064/13 "2017-01-25T04:05:48Z")

</div>

Bluehost experience, new issue.

After running social campaigns successfully for 3 months I have hit a brick wall. the “lead” database has reached 6 GB, consequently it no longer works effectively, throwing SQL errors - the error that made me realize I had a problem is as follows

There was an error creating the new column to the contact table: An exception occurred while executing ‘ALTER TABLE leads ADD cp VARCHAR(255) DEFAULT NULL’: SQLSTATE[HY000]: General error: 1034 Incorrect key file for table ‘leads’; try to repair it.

After some stackoverflow research I determined the cause was lack of resources and after speaking to support @ bluehost I determined what rules had been breached.

Max size for any single database size is 2 GB.

Thankfully we have a cron job to assist with this problem

/bin/php56s -q /home2/promotf3/public\_html/bi/app/console mautic:maintenance:cleanup --days-old=60 --dry-run

I had previously set this to 365 days, - clearly this was insufficient.

This command will tell us the effect of the command, a test if you will, if sufficient projected savings run without the --dry-run to reduce the size of the database. Obviously if you want to retain the data, backup first. Note however that this command wont clear all the data so over time it will still accumulate. Hopefully by then the Mautic team will have introduced a more comprehensive database cron job clean.

My suggestion is just don’t run 10 social monitoring campaigns at once - accumulating all the data like I was doing!

---

<div class="post-metadata">

**Author:** ![rikk03](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@rikk03](https://forum.mautic.org/u/rikk03)\
**Post date:** [January 25, 2017, 8:01am UTC](https://forum.mautic.org/t/social-monitoring/5064/14 "2017-01-25T08:01:17Z")

</div>

Another Bluehost thread

[https://www.mautic.org/community/index.php//1155-bluehost-bulk-sending-woes/0](https://www.mautic.org/community/index.php//1155-bluehost-bulk-sending-woes/0)
