Issues with Sugar 13.0 and PHP 8.2 in Vagrant

Anyone else having issues getting Sugar 13.0 to work in a Vagrant using PHP 8.2? I keep getting " (Elasticsearch Queue Scheduler) failed in CRON run, Undefined constant "Sugarcrm\Sugarcrm\Elasticsearch\Adapter\CURLOPT_USERAGENT"" from the cron jobs but I also see "Undefined constant" in the php error logs. I have gotten it to work using PHP 8.0 but not 8.2, which is the version Sugar says 13.0 is compatible with. I am currently using Vagrant "sugarcrm/php80es716" but I have upgraded ElasticSearch to 8.7.1 and MySQL to 8.0.33 but I have been unable to get 13.0 to work on Vagrant "sugarcrm/php82es84"

Parents
  • Hi ,

    Are you installing a fresh Sugar13 from our dev builds or is it a backup from your cloud?

    There's no need to upgrade your vagrant image as they have what's needed to run (see Development Platforms.).

    If you want PHP8.2, go with sugarcrm/php82es84.

    Please let me know which build you are using so I can try it on my end and if there's something to be done in the image, I'll fix and update it so you can use.

    SugarCRM | Principal Developer Advocate

  • This is a cloud backup. Also, Rafael, as I stated, I tried sugarcrm/php82es84. The reason for upgrading the images is for a true development environment, it needs to match up with the Live environment. I have a list of commands I have to run on Vagrant images to get them where they need to be for development and testing purposes. So far the images I have used have always been missing SSL and certain php mods that are required to match the live environment. Also, the images are too small to hold a live backup, so I have to also extend the storage for the vagrant image to work. Currently, I have been unable to get 13.0 to work with PHP 8.2.

  • Hi ,

    Interesting, could you share what you change/run, so I can try to incorporate that in the core images going forward?

    As for your statement "it needs to match up with the Live environment, not sure if I agree with it, as those images are supposed to match our Development Platforms for a particular release.

    For example, upgrading to ES 8.7.1 and/or MySQL 8.0.33, you are running on a non-supported platform, you can do that but at your own risk, we did not certify Sugar on those.

    If you find issues with the versions we release, let me know (as you are doing here) and I'll make sure those images get fixed and released.

    SugarCRM | Principal Developer Advocate

  • I will add my scripts to this reply to help you understand what is missing from images. 

    Yes, I might have went a version or two beyond what is certified, but that is besides the point when it comes to the issue I am having. If I am developing on more up to date image, I will run into issues for future updates and be able to address them before they can affect Live.

    We are getting off track here. So far, 13.0 is not working on sugarcrm/php82es84, which is the suggested vagrant image for 13.0.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    #Install VirtualBox and Vagrant
    copy Vagrantfile <SUGAR_DIRECTORY>/Vagrantfile
    cd <SUGAR_DIRECTORY>
    vagrant plugin install vagrant-disksize
    vagrant plugin install vagrant-vbguest
    vagrant up
    wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
    echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
    echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
    apt update
    #add a new partition /dev/sda2 to add the extra free space
    fdisk /dev/sda
    pvcreate /dev/sda2
    vgextend vagrant-vg /dev/sda2
    lvextend -l +100%FREE /dev/vagrant-vg/root
    resize2fs /dev/vagrant-vg/root
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Well it seems this is a major problem, since this has turned into the most viewed thread.

Reply Children
  • Hi ,

    yeah it is a problem and I'm fixing it, most of the ubuntu packages in that image weren't installed correctly back when I built it.

    I'm working on a new version, and will let you and all know, when I'm done.

    SugarCRM | Principal Developer Advocate