# Changing segment results in 500 Internal Server Error

**URL:** <https://forum.mautic.org/t/changing-segment-results-in-500-internal-server-error/28634>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [July 17, 2023, 5:47pm UTC](https://forum.mautic.org/t/changing-segment-results-in-500-internal-server-error/28634 "2023-07-17T17:47:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lancehaverkamp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lancehaverkamp/32/9627_2.png) [@lancehaverkamp](https://forum.mautic.org/u/lancehaverkamp)\
**Post date:** [July 17, 2023, 5:47pm UTC](https://forum.mautic.org/t/changing-segment-results-in-500-internal-server-error/28634/1 "2023-07-17T17:47:44Z")

</div>

**Your software**  
My Mautic version is: v4.4.8  
My PHP version is: 7.4.33  
My Database type and version is: MySQL 8.0.33-cll-lve

**Your problem**  
My problem is: Getting error messages trying to change contacts’ segment. It’s happening both in bulk changes & individually, both in the dashboard and via [integrately.com](http://integrately.com).

These errors are showing in the log:  
[2023-07-17 00:05:10] mautic.ERROR: CAMPAIGN: An exception occurred while executing ‘REPLACE INTO mauzo\_campaign\_lead\_event\_failed\_log( `log_id`, `date_added`, `reason`) SELECT id, :dateAdded as date\_added, :message as reason from mauzo\_campaign\_lead\_event\_log WHERE is\_scheduled = 1 AND lead\_id = :contactId AND campaign\_id = :campaignId AND rotation = :rotation’: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':dateAdded as date\_added, :message as reason from mauzo\_campaign\_lead\_event\_log ’ at line 2 {“hostname”:“[fiber12.dnsiaas.com](http://fiber12.dnsiaas.com)”,“pid”:1742480}

Steps I have tried to fix the problem:  
Nothing…Way over my head.

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [July 18, 2023, 6:14am UTC](https://forum.mautic.org/t/changing-segment-results-in-500-internal-server-error/28634/2 "2023-07-18T06:14:28Z")

</div>

hi there

can you past a copy of your campaign ( I am assuming you are trying to do this through a campaign?).

Do y ou maybe have a jump even inside the campaign?

---

<div class="post-metadata">

**Author:** ![lancehaverkamp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lancehaverkamp/32/9627_2.png) [@lancehaverkamp](https://forum.mautic.org/u/lancehaverkamp)\
**Post date:** [July 18, 2023, 4:02pm UTC](https://forum.mautic.org/t/changing-segment-results-in-500-internal-server-error/28634/4 "2023-07-18T16:02:52Z")

</div>

How do I post a copy of a campaign here?

It doesn’t matter whether I’m using a campaign or the dashboard. Some contacts are not being moved to another segment, and some contacts can’t be removed from a segment that they’re already in.

This is an almost new installation, I only have 10 contacts.

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [July 18, 2023, 4:37pm UTC](https://forum.mautic.org/t/changing-segment-results-in-500-internal-server-error/28634/5 "2023-07-18T16:37:04Z")

</div>

You can do a screenshot.  
May I ask if you added the contacts to the segment manually?

Also when looking at the campaign results what do you see?
