<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Modifying mysqli.reconnect Value in Expedition Articles</title>
    <link>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/ta-p/219223</link>
    <description>&lt;P&gt;Expedition uses PHP to perform the backend actions. Some of those require interactions with&amp;nbsp;&lt;A href="https://mariadb.org/" target="_self"&gt;MariaDB&lt;/A&gt; databases and&amp;nbsp;use mysqli as a driver to connect to these databases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to ensure that connections to the database are alive, we want to modify one of the PHP System parameters that allows reconnections to the database once those are lost.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Open a terminal to Expedition and edit the following files:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;1. php.ini for Apache&lt;/H2&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;Edit the php.ini file for Apache with the following command&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;sudo nano /etc/php/7.0/apache2/php.ini&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;change (you can use the Search feature with ^W)&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;mysqli.reconnect = &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Off&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;to&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;mysqli.reconnect = &lt;FONT color="#339966"&gt;&lt;STRONG&gt;On&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;Write the changes with ^O and exit nano with ^X&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;2. php.ini for CLI&lt;/H2&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;Edit the php.ini file for Apache with the following command&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;sudo nano /etc/php/7.0/cli/php.ini&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;change (you can use the Search feature with ^W)&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;mysqli.reconnect = &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Off&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;to&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;mysqli.reconnect = &lt;FONT color="#339966"&gt;&lt;STRONG&gt;On&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;Write the changes with ^O and exit nano with ^X&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;3. Apply the changes&lt;/H2&gt;
&lt;P style="padding-left: 30px;"&gt;Once the changes are done, apply them by&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;sudo service apache2 restart&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Oct 2019 15:40:53 GMT</pubDate>
    <dc:creator>dgildelaig</dc:creator>
    <dc:date>2019-10-07T15:40:53Z</dc:date>
    <item>
      <title>Modifying mysqli.reconnect Value</title>
      <link>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/ta-p/219223</link>
      <description>&lt;P&gt;Expedition uses PHP to perform the backend actions. Some of those require interactions with&amp;nbsp;&lt;A href="https://mariadb.org/" target="_self"&gt;MariaDB&lt;/A&gt; databases and&amp;nbsp;use mysqli as a driver to connect to these databases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to ensure that connections to the database are alive, we want to modify one of the PHP System parameters that allows reconnections to the database once those are lost.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Open a terminal to Expedition and edit the following files:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;1. php.ini for Apache&lt;/H2&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;Edit the php.ini file for Apache with the following command&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;sudo nano /etc/php/7.0/apache2/php.ini&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;change (you can use the Search feature with ^W)&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;mysqli.reconnect = &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Off&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;to&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;mysqli.reconnect = &lt;FONT color="#339966"&gt;&lt;STRONG&gt;On&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;Write the changes with ^O and exit nano with ^X&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;2. php.ini for CLI&lt;/H2&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;Edit the php.ini file for Apache with the following command&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;sudo nano /etc/php/7.0/cli/php.ini&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;change (you can use the Search feature with ^W)&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;mysqli.reconnect = &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Off&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;to&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;mysqli.reconnect = &lt;FONT color="#339966"&gt;&lt;STRONG&gt;On&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;Write the changes with ^O and exit nano with ^X&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;3. Apply the changes&lt;/H2&gt;
&lt;P style="padding-left: 30px;"&gt;Once the changes are done, apply them by&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&lt;FONT face="courier new,courier"&gt;sudo service apache2 restart&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 15:40:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/ta-p/219223</guid>
      <dc:creator>dgildelaig</dc:creator>
      <dc:date>2019-10-07T15:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying mysqli.reconnect value</title>
      <link>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/tac-p/223251#M41</link>
      <description>&lt;P&gt;Did you modify the file&lt;/P&gt;
&lt;P&gt;/etc/php/7.0/apache2/php.ini&lt;/P&gt;
&lt;P&gt;or could it be that you only modified&lt;/P&gt;
&lt;P&gt;/etc/php/7.0/cli/php.ini?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Some information about the process at&lt;BR /&gt;&lt;A href="https://live.paloaltonetworks.com/t5/Expedition-Articles/Modifying-mysqli-reconnect-value/ta-p/219223" target="_self"&gt;https://live.paloaltonetworks.com/t5/Expedition-Articles/Modifying-mysqli-reconnect-value/ta-p/219223&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 10:35:34 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/tac-p/223251#M41</guid>
      <dc:creator>dgildelaig</dc:creator>
      <dc:date>2018-07-23T10:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying mysqli.reconnect value</title>
      <link>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/tac-p/237766#M96</link>
      <description>&lt;P&gt;I have modifed this file and saved it yet it still shows red when I load Expedition.&amp;nbsp; This is my only remaining red X on the introduction page.&amp;nbsp; I'm on version 1.0.107.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2018 12:54:51 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/tac-p/237766#M96</guid>
      <dc:creator>bagherib</dc:creator>
      <dc:date>2018-10-30T12:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying mysqli.reconnect value</title>
      <link>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/tac-p/238914#M101</link>
      <description>&lt;P&gt;Have you restarted apache?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;sudo systemctl restart apache2&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Nov 2018 17:00:00 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/tac-p/238914#M101</guid>
      <dc:creator>alestevez</dc:creator>
      <dc:date>2018-11-07T17:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying mysqli.reconnect value</title>
      <link>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/tac-p/238950#M102</link>
      <description>&lt;P&gt;I ended up going back to my snapshot right after I upgraded to 1.0.107.&amp;nbsp; Then I went back to edit the failes with Nano and this time I went to the "Off" and backspaced three times and typed "On".&amp;nbsp; Saved it and exited and restared the entire appliance and this time I have 100% green.&amp;nbsp; &amp;nbsp;Not sure what happened.&amp;nbsp; Before when I edited it showed "On" but was not working.&amp;nbsp; I did it again with the process above and it worked.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Bob&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 20:05:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/tac-p/238950#M102</guid>
      <dc:creator>bagherib</dc:creator>
      <dc:date>2018-11-07T20:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying mysqli.reconnect Value</title>
      <link>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/tac-p/293829#M190</link>
      <description>&lt;P&gt;Hello World,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;The 'one liner' below - bold text - worked well for me and was a quick and easy way to update both files in one easy swoop. This is using the substitution function 's' in sed (stream editor) with a global replace parameter 'g'. Technically, this is two commands (one for each file) separated by a semicolon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;The&amp;nbsp;&lt;SPAN&gt;^W command in nano was causing issues for me as I had my VM in a browser, and ^W would close my browser tab instead of do a search in nano. Don't forget to restart Apache afterwards! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;sed -i 's/mysqli.reconnect = Off/mysqli.reconnect = On/g' /etc/php/7.0/apache2/php.ini; sed -i 's/mysqli.reconnect = Off/mysqli.reconnect = On/g' /etc/php/7.0/cli/php.ini&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 01:21:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/expedition-articles/modifying-mysqli-reconnect-value/tac-p/293829#M190</guid>
      <dc:creator>jbenoit</dc:creator>
      <dc:date>2019-10-23T01:21:44Z</dc:date>
    </item>
  </channel>
</rss>

