<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarai.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/dev-club/f/questions-answers/6471/issues-with-sugar-13-0-and-php-8-2-in-vagrant</link><description>Anyone else having issues getting Sugar 13.0 to work in a Vagrant using PHP 8.2? I keep getting &amp;quot; (Elasticsearch Queue Scheduler) failed in CRON run, Undefined constant &amp;quot;Sugarcrm\Sugarcrm\Elasticsearch\Adapter\CURLOPT_USERAGENT&amp;quot;&amp;quot; from the cron jobs but</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/thread/29102?ContentTypeID=1</link><pubDate>Fri, 26 May 2023 12:59:41 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:caed061a-a8fa-48f3-b22f-e9de694e0742</guid><dc:creator>Robert Thomas</dc:creator><description>&lt;p&gt;Not sure what to tell you, but I had to install those packages (&lt;span&gt;php-mysql php-zip php-xml php-bcmath&lt;/span&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/thread/29097?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 18:29:07 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:148a22ab-a366-4894-bf22-2251f6677916</guid><dc:creator>Rafael Fernandes</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/robertthomas330487"&gt;Robert Thomas&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;This is odd, I did test (and execute) a few jobs myself without issues, could you please share any details you have for us? I don&amp;#39;t see how that&amp;#39;d fail unless there are extra needs from your cloud backup.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a list of modules installed in the image:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;vagrant@vagrant:/vagrant$ php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
json
ldap
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xdebug
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Xdebug
Zend OPcache&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/thread/29096?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 15:18:01 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:6aa53ee4-1d16-4722-aa72-4592eb44a71a</guid><dc:creator>Robert Thomas</dc:creator><description>&lt;p&gt;I can confirm that the vagrant does work for Sugar 13.0. Although, the vagrant is still missing a few php packages (php-mysql php-zip php-xml php-bcmath) that are required for turning on scheduler.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/thread/29092?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 20:41:12 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:94a02e27-7c3a-4ba1-8931-d75b0e9dbf2a</guid><dc:creator>Robert Thomas</dc:creator><description>&lt;p&gt;I will try building a new local dev environment tomorrow to test.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/thread/29091?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 20:23:12 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:0cb3b09c-5638-417a-9848-041b906b7f83</guid><dc:creator>Rafael Fernandes</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/robertthomas330487"&gt;Robert Thomas&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve just released a new version of&amp;nbsp; sugarcrm/php82es84 &amp;nbsp;that contains the fixes required to install a Vanila instance of Sugar 13.0.&lt;/p&gt;
&lt;p&gt;To ensure you have gotten the latest available in the Vagrant Cloud, I recommend you remove your local copy (or force v1.1 to be downloaded in your Vagrantfile), to remove it, simply run&amp;nbsp;&lt;code&gt;vagrant box remove sugarcrm/php82es84.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You should see something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="batchfile"&gt;sh-3.2$ vagrant up
Bringing machine &amp;#39;default&amp;#39; up with &amp;#39;virtualbox&amp;#39; provider...
==&amp;gt; default: Box &amp;#39;sugarcrm/php82es84&amp;#39; could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: &amp;gt;= 0
==&amp;gt; default: Loading metadata for box &amp;#39;sugarcrm/php82es84&amp;#39;
    default: URL: https://vagrantcloud.com/sugarcrm/php82es84
==&amp;gt; default: Adding box &amp;#39;sugarcrm/php82es84&amp;#39; (v1.1) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/sugarcrm/boxes/php82es84/versions/1.1/providers/virtualbox.box
    default: Calculating and comparing box checksum...
==&amp;gt; default: Successfully added box &amp;#39;sugarcrm/php82es84&amp;#39; (v1.1) for &amp;#39;virtualbox&amp;#39;!
==&amp;gt; default: Importing base box &amp;#39;sugarcrm/php82es84&amp;#39;...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As you can see below, everything checks out and passed.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/500x375/__key/communityserver-discussions-components-files/54/Screenshot-2023_2D00_05_2D00_24-at-4.01.58-PM.png" /&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/thread/29080?ContentTypeID=1</link><pubDate>Tue, 23 May 2023 15:59:29 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:44ef72bf-de77-4950-987b-c26a8a3d44f6</guid><dc:creator>Rafael Fernandes</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/robertthomas330487"&gt;Robert Thomas&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;yeah it is a problem and I&amp;#39;m fixing it, most of the ubuntu packages in that image weren&amp;#39;t installed correctly back when I built it.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m working on a new version, and will let you and all know, when I&amp;#39;m done.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/thread/29079?ContentTypeID=1</link><pubDate>Tue, 23 May 2023 14:30:39 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:931a8da4-74ce-4abf-b838-eebb3ebcfdaf</guid><dc:creator>Robert Thomas</dc:creator><description>&lt;p&gt;Well it seems this is a major problem, since this has turned into the most viewed thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/thread/29045?ContentTypeID=1</link><pubDate>Wed, 17 May 2023 13:24:36 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:90c5b39f-5afb-482c-9487-b7a07e88e6a9</guid><dc:creator>Robert Thomas</dc:creator><description>&lt;p&gt;I will add my scripts to this reply to help you understand what is missing from images.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;We are getting off track here. So far, 13.0 is not working on&amp;nbsp;&lt;a href="https://app.vagrantup.com/sugarcrm/boxes/php82es84"&gt;sugarcrm/php82es84&lt;/a&gt;, which is the suggested vagrant image for 13.0.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#Install VirtualBox and Vagrant
copy Vagrantfile &amp;lt;SUGAR_DIRECTORY&amp;gt;/Vagrantfile
cd &amp;lt;SUGAR_DIRECTORY&amp;gt;
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 &amp;quot;deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main&amp;quot; | sudo tee /etc/apt/sources.list.d/elastic-7.x.list

echo &amp;quot;deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main&amp;quot; | 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

#enable ssl for apache using self signed certififcate
openssl req -x509 -newkey rsa:2048 -nodes -keyout /etc/ssl/private/server.key -out /etc/ssl/certs/server.crt
chown root:ssl-cert /etc/ssl/private/server.key
chmod g+r /etc/ssl/private/server.key

#edit ssl-params.conf with these settings
nano /etc/apache2/conf-available/ssl-params.conf

SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder On
# Disable preloading HSTS for now.  You can use the commented out header line that includes
# the &amp;quot;preload&amp;quot; directive if you understand the implications.
# Header always set Strict-Transport-Security &amp;quot;max-age=63072000; includeSubDomains; preload&amp;quot;
Header always set Strict-Transport-Security &amp;quot;max-age=63072000; includeSubDomains&amp;quot;
#CSP policy is too restrictive and causes things not to load so keep commented out.
#Header always set Content-Security-Policy &amp;quot;default-src &amp;#39;self&amp;#39;; script-src &amp;#39;self&amp;#39;&amp;quot;
Header always set X-Content-Type-Options nosniff
Header always set X-XSS-Protection &amp;quot;1; mode=block&amp;quot;
# Requires Apache &amp;gt;= 2.4
SSLCompression off
SSLUseStapling off
SSLStaplingCache &amp;quot;shmcb:logs/stapling-cache(150000)&amp;quot;
# Requires Apache &amp;gt;= 2.4.11
SSLSessionTickets Off

a2enmod ssl
cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/&amp;lt;Site-Name&amp;gt;.conf

#replace &amp;lt;Site-Name&amp;gt;.conf with these settings
&amp;lt;IfModule mod_ssl.c&amp;gt;
  Listen 8443
  &amp;lt;VirtualHost _default_:8443&amp;gt;
    ServerAdmin youremail.com
    DocumentRoot /var/www/html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    SSLEngine on

    SSLCertificateFile /etc/ssl/certs/server.crt
    SSLCertificateKeyFile /etc/ssl/private/server.key
    #SSLCertificateChainFile path-to-intermediate-cert.crt 

    &amp;lt;FilesMatch &amp;quot;\.(cgi|shtml|phtml|php)$&amp;quot;&amp;gt;
      SSLOptions +StdEnvVars
    &amp;lt;/FilesMatch&amp;gt;
    &amp;lt;Directory /usr/lib/cgi-bin&amp;gt;
      SSLOptions +StdEnvVars
    &amp;lt;/Directory&amp;gt;
  &amp;lt;/VirtualHost&amp;gt;
&amp;lt;/IfModule&amp;gt;

#add SSLCertificateFile and SSLCertificateKeyFile to default-ssl.conf

a2enconf ssl-params
a2ensite default-ssl
a2ensite &amp;lt;Site-Name&amp;gt;
apachectl configtest
systemctl restart apache2

#install php_mysql for scheduler to work correctly
apt install php-mysql php-zip php-xml php-bcmath

# up the max RAM to 1G from 512M
nano /etc/php/8.*/apache2/php.ini

#Prepare to extract backup file from Sugar
gunzip *.sugarondemand.com.*ent.*.tar.gz
tar -xf *.sugarondemand.com.*ent.*.tar

#Add DBA user
mysql -u root -p
CREATE USER &amp;#39;[Username]&amp;#39;@&amp;#39;%&amp;#39; IDENTIFIED BY &amp;#39;[Password]&amp;#39;;
GRANT ALL PRIVILEGES ON *.* TO &amp;#39;[Username]&amp;#39;@&amp;#39;%&amp;#39; WITH GRANT OPTION;

#Import database
mysqladmin -u root -p create sugarcrmdev

mysql -u root sugarcrmdev -p
CREATE USER &amp;#39;sugarcrmdev&amp;#39;@&amp;#39;localhost&amp;#39; IDENTIFIED BY &amp;#39;[Password]&amp;#39;;
GRANT ALL PRIVILEGES ON sugarcrmdev.* TO &amp;#39;sugarcrmdev&amp;#39;@&amp;#39;localhost&amp;#39;;

mysql -u root sugarcrmdev -p &amp;lt; *.sugarondemand.com.*ent.*/sugar*ent.sql
#Import database triggers
mysql -u root sugarcrmdev -p &amp;lt; *.sugarondemand.com.*ent.*/sugar*ent_triggers.sql

#Move all the site files into Apache
#mkdir /var/www/html/sugarcrmdev
cp -Rf *.sugarondemand.com.*ent.*/sugar*ent/* /var/www/html/sugar

#change admin password
mysql -u root sugarcrmdev -p 
UPDATE users SET user_hash = &amp;#39;$2y$10$ua6PicOvqyYMKgOR6gzFcub.Z5s40j6moWRH4oaO.Ef667lz.nb0m&amp;#39;, status = &amp;#39;Active&amp;#39; WHERE user_name = &amp;#39;admin&amp;#39;;
#log into that admin account using the password &amp;quot;Password123&amp;quot;

#make sure php versions match between Apache and system.
update-alternatives --config php

#recreate all indices for Elasticsearch to work
bin/sugarcrm search:silent_reindex_mp --clearData

#setup cron job for scheduler to run
crontab -e 
*    *    *    *    *     cd /var/www/html/sugar; /usr/bin/php -f cron.php &amp;gt; /dev/null 2&amp;gt;&amp;amp;1

#turn on Activity Stream Purge and Prune Database on 1st of Month jobs in Scheduler

#Go into the DB and switch all the HINT jobs in the scheduler table to Inactive to reduce junk log entries
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/thread/29044?ContentTypeID=1</link><pubDate>Wed, 17 May 2023 13:14:42 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:6997164c-d167-4195-b9de-ed7a1db1c8e7</guid><dc:creator>Rafael Fernandes</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/robertthomas330487"&gt;Robert Thomas&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Interesting, could you share what you change/run, so I can try to incorporate that in the core images going forward?&lt;/p&gt;
&lt;p&gt;As for your statement &amp;quot;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;If you find issues with the versions we release, let me know (as you are doing here) and I&amp;#39;ll make sure those images get fixed and released.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/thread/29038?ContentTypeID=1</link><pubDate>Tue, 16 May 2023 15:43:52 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:707dc26c-b292-40e9-89fd-cea05eef6f95</guid><dc:creator>Robert Thomas</dc:creator><description>&lt;p&gt;This is a cloud backup. Also, Rafael, as I stated, I tried&amp;nbsp;&lt;a href="https://app.vagrantup.com/sugarcrm/boxes/php82es84"&gt;sugarcrm/php82es84&lt;/a&gt;. 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.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Sugar 13.0 and PHP 8.2 in Vagrant</title><link>https://sugarclub.sugarai.com/thread/29037?ContentTypeID=1</link><pubDate>Tue, 16 May 2023 15:23:18 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:c32b0a43-d04d-447a-8cfe-d61770b22f90</guid><dc:creator>Rafael Fernandes</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/robertthomas330487"&gt;Robert Thomas&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Are you installing a fresh Sugar13 from our dev builds or is it a backup from your cloud?&lt;/p&gt;
&lt;p&gt;There&amp;#39;s no need to upgrade your vagrant image as they have what&amp;#39;s needed to run (see &lt;a href="/dev-club/developer-builds/w/program-information/829/sugar-13-0-0-q2-2023-development-platforms"&gt;Development Platforms&lt;/a&gt;.).&lt;/p&gt;
&lt;p&gt;If you want PHP8.2, go with &lt;a href="https://app.vagrantup.com/sugarcrm/boxes/php82es84"&gt;sugarcrm/php82es84&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please let me know which build you are using so I can try it on my end and if there&amp;#39;s something to be done in the image, I&amp;#39;ll fix and update it so you can use.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>