﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="https://www.w3.org/2005/Atom">
  <channel>
    <title>Newest KB Articles in php</title>
    <description>Recent additions to the knowledge base from Winhost</description>
    <link>https://support.winhost.com/kb/c262/php.aspx</link>
    <pubDate>Tue, 09 Jun 2026 16:38:46 GMT</pubDate>
    <generator>SmarterTrack Enterprise 100.0.9553</generator>
    <atom:link href="https://support.winhost.com/RSS.ashx?catid=262&amp;type=newestkbarticles" rel="self" type="application/rss+xml" />
    <item>
      <title>phpMyAdmin configuration storage settings</title>
      <link>https://support.winhost.com/kb/a1674/phpmyadmin-configuration-storage-settings.aspx</link>
      <pubDate>Wed, 09 Sep 2020 21:44:28 GMT</pubDate>
      <guid isPermaLink="false">kbarticle1674</guid>
      <description>&lt;div&gt;phpMyAdmin settings are stored in a MySQL database to retain them between browser sessions. &amp;nbsp;Setting up the storage requires minor updates to a MySQL database and the phpMyAdmin confic.inc.php file.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;MySQL CREATE TABLE&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;While not required, if not on a Basic plan it would be best to add a new database to store the phpMyAdmin settings rather than storing them on an existing database. &amp;nbsp;And note if using phpMyAdmin to make the connection to the new database, you may need to (temporarily) change the server setting within the config.inc.php beforehand.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;If there is some familiarity with MySQL queries, the CREATE TABLE query can be found within /phpMyAdmin/sql/create_tables.sql (open the file in a text editor). &amp;nbsp;However, the file includes a CREATE DATABASE command that has to be omitted. &amp;nbsp;To run the query by hand, copy the syntax starting on line 39 to the bottom of the file (line 355). &amp;nbsp;For reference, and readability, that would mean the first and last CREATE TABLE are&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;pre class="prettyprint"&gt;CREATE TABLE IF NOT EXISTS `pma__bookmark` (

---

CREATE TABLE IF NOT EXISTS `pma__export_templates` (&lt;/pre&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Alternatively, download and extract the updated create_tables.sql here: &amp;nbsp;&lt;a class="fr-file" href="/AvatarHandler.ashx?kbattchid=77" target="_blank"&gt;create_tables.zip&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Then IMPORT that file to the database or open it in a text editor and copy and paste the full syntax into a new query window.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;config.php.inc&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;After the tables have been created, a number of lines have to be uncommented and four values have to be updated in the config.php.inc. &amp;nbsp;Look for the "phpMyAdmin configuration storage settings" section of the file, then uncomment all the "User" and "Storage" lines as in the example below, save for "controlport". &amp;nbsp;Because the database is using the default MySQL port, it's unnecessary to uncomment the line.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;In addition to uncommenting the lines, from the example below, update the databaseServer, databaseUsername, databasePassword, and databaseName with the MySQL database where the above query was run to complete the update.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;pre class="prettyprint"&gt;/**
 * phpMyAdmin configuration storage settings.
 */

/* User used to manipulate with storage */
$cfg['Servers'][$i]['controlhost'] = 'databaseServer';
// $cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'databaseUsername';
$cfg['Servers'][$i]['controlpass'] = 'databasePassword';

/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'databaseName';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';&lt;/pre&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Reviewing and updating PHP settings</title>
      <link>https://support.winhost.com/kb/a1633/reviewing-and-updating-php-settings.aspx</link>
      <pubDate>Thu, 04 Apr 2019 21:34:32 GMT</pubDate>
      <guid isPermaLink="false">kbarticle1633</guid>
      <description>&lt;div&gt;PHP settings are reviewed and updated by uploading the two corresponding files to a hosted site. &amp;nbsp;To view the current PHP settings, a phpinfo script. &amp;nbsp;To make changes to those settings, a user.ini / .user.ini settings file.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;phpinfo&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;phpinfo is used to display the current PHP configuration for the site / server. &amp;nbsp;&lt;a href="https://www.php.net/manual/en/function.phpinfo.php"&gt;Specific parameters can be passed to customize the output&lt;/a&gt; or to display all information the following syntax can be used:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;&amp;lt;?php
phpinfo();
?&amp;gt;&lt;/pre&gt;&lt;div&gt;The syntax would be added to a PHP file, uploaded to the site and viewed in a browser. &amp;nbsp;An example script can also be found in the .zip in the sample section below.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;user.ini / .user.ini&lt;/strong&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;A site&amp;#39;s PHP settings can be adjusted by creating a user.ini or .user.ini file, adding the appropriate syntax, then uploading that file to the document root of the site via FTP. &amp;nbsp;The file name depends on the version of PHP being used, which can be reviewed at Winhost Control Panel &amp;gt; Sites &amp;gt; the applicable domain name &amp;gt; PHP Version.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;img alt="" height="361" src="/AvatarHandler.ashx?fid=2827449&amp;key=839195799" width="928" class="fr-fic fr-dii"&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;If the PHP version is 5.3 ,5.6 or 7.0 the file name is: &amp;nbsp;user.ini&lt;/div&gt;&lt;div&gt;For any other PHP version the file name is: &amp;nbsp;.user.ini&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;Sample&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;An example of a common update is the post_max_size and upload_max_filesize settings, often changed to allow plugin and theme uploads through WordPress.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;img alt="" height="166" src="/AvatarHandler.ashx?fid=2827435&amp;key=2825531608" width="934" class="fr-fic fr-dii"&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;For PHP 7.2, the settings default to 8 MB and 2 MB, respectively, which can lead to some upload errors within WordPress. &amp;nbsp;To increase those settings, for example to 60 MB, create a new text document with the following syntax:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;post_max_size = 60M
upload_max_filesize = 60M&lt;/pre&gt;&lt;div&gt;For PHP 7.2, the file would be saved as .user.ini, then uploaded to the document root of the site. &amp;nbsp;Once uploaded, to see the setting updates reflected on the site, first recycle the application pool at Winhost Control Panel &amp;gt; Sites &amp;gt; the applicable domain name &amp;gt; Recycle App Pool &amp;gt; Recycle App Pool.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;img alt="" height="166" src="/AvatarHandler.ashx?fid=2827450&amp;key=3930286871" width="934" class="fr-fic fr-dii"&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Once recycled, the new Local Value should be reflected when reviewing a phpinfo script.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;For an example phpinfo script and both a user.ini and .user.ini file, download &lt;a href="/AvatarHandler.ashx?fid=2828209&amp;key=854176769"&gt;PHPsettings.zip&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Send mail using Mail.php / PEAR</title>
      <link>https://support.winhost.com/kb/a1517/send-mail-using-mail_php-pear.aspx</link>
      <pubDate>Fri, 22 Jun 2018 16:52:17 GMT</pubDate>
      <guid isPermaLink="false">kbarticle1517</guid>
      <description>&lt;div&gt;&lt;span style='font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;To send mail using Mail.php, PEAR and a .user.ini, defining the path to PEAR, need to be uploaded to the site.&amp;nbsp; With package and setup instructions below.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&lt;strong style="box-sizing: border-box;"&gt;Download PEAR.zip&lt;/strong&gt;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&lt;br&gt;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&lt;strong style="box-sizing: border-box;"&gt;&lt;a href="/AvatarHandler.ashx?kbattchid=458" class="fr-file"&gt;winPear.zip&lt;/a&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&amp;nbsp;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;Inside the .zip is the PEAR directory, which contains a web.config to prevent browser access, a test script zsend.php, and both a .user.ini and user.ini. &amp;nbsp;Editing and uploading the .user.ini or user.ini depends on the version of PHP set in the Winhost Control Panel. &amp;nbsp;And if not sure which is applicable, uploading both won&amp;#39;t cause any issues. &amp;nbsp;For the purposes of the article, the .user.ini is referenced.&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&amp;nbsp;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&amp;nbsp;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&lt;strong style="box-sizing: border-box;"&gt;Update and upload .user.ini and PEAR directory&lt;/strong&gt;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&amp;nbsp;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;If the site has an existing .user.ini, it will need to be updated with the server path to the PEAR directory. &amp;nbsp;If the site does not have a .user.ini, the example file included in PEAR.zip may be used after replacing &amp;quot;FTPusername&amp;quot; with the FTP username for your site account.&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&amp;nbsp;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;For reference, the &lt;strong style="box-sizing: border-box;"&gt;Path to root&amp;nbsp;&lt;/strong&gt;is found in the &lt;strong&gt;Site Info&amp;nbsp;&lt;/strong&gt;pane of the Winhost Control Panel.&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&amp;nbsp;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&lt;img alt="" height="448" src="/AvatarHandler.ashx?fid=2542190&amp;key=3634055206" width="452" class="fr-fic fr-dii"&gt;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&amp;nbsp;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;Upload the /PEAR directory and the updated .user.ini to the document root of the site to use Mail.php.&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&amp;nbsp;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&amp;nbsp;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&lt;strong style="box-sizing: border-box;"&gt;Testing Mail.php&lt;/strong&gt;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&amp;nbsp;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;zsend.php may be used to test Mail.php. &amp;nbsp;First update the settings in the script highlighted in red below.&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&amp;nbsp;&lt;/div&gt;&lt;div style='box-sizing: border-box; font-family: "Segoe UI", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px;'&gt;&lt;pre class="prettyprint" style='box-sizing: border-box; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 13px; margin-top: 0px; margin-bottom: 20px; line-height: 1.42857; word-break: break-all; border-radius: 4px;'&gt;&amp;lt;?php
ini_set(&amp;#39;display_errors&amp;#39;, 1);
ini_set(&amp;#39;display_startup_errors&amp;#39;, 1);
error_reporting(E_ALL);
require_once &amp;quot;Mail.php&amp;quot;;
$from = &amp;quot;&lt;span style="box-sizing: border-box; color: rgb(255, 0, 0);"&gt;postmaster@domain.com&lt;/span&gt;&amp;quot;;
$to = &amp;quot;&lt;span style="box-sizing: border-box; color: rgb(255, 0, 0);"&gt;postmaster@domain.com&lt;/span&gt;&amp;quot;;
$subject = &amp;quot;Mail.php test email&amp;quot;;
$body = &amp;quot;Test email sent using Mail.php.&amp;quot;;
$host = &amp;quot;&lt;span style="color:#FF0000;"&gt;m##.internetmailserver.net&lt;/span&gt;&amp;quot;;
$username = &amp;quot;&lt;span style="box-sizing: border-box; color: rgb(255, 0, 0);"&gt;postmaster@domain.com&lt;/span&gt;&amp;quot;;
$password = &amp;quot;&lt;span style="box-sizing: border-box; color: rgb(255, 0, 0);"&gt;password&lt;/span&gt;&amp;quot;;
$headers = array (&amp;#39;Date&amp;#39; =&amp;gt; date(&amp;#39;r&amp;#39;),
  &amp;#39;From&amp;#39; =&amp;gt; $from,
  &amp;#39;To&amp;#39; =&amp;gt; $to,
  &amp;#39;Subject&amp;#39; =&amp;gt; $subject,
  &amp;#39;Message-ID&amp;#39; =&amp;gt; &amp;#39;&amp;lt;&amp;#39; . time() . md5($from . $to) . &amp;#39;@&lt;span style="color: rgb(255, 0, 0);"&gt;domain.com&lt;/span&gt;&amp;gt;&amp;#39;);
$smtp = Mail::factory(&amp;#39;smtp&amp;#39;,
  array (&amp;#39;localhost&amp;#39; =&amp;gt; $host,
  &amp;#39;host&amp;#39; =&amp;gt; $host,
  &amp;#39;auth&amp;#39; =&amp;gt; true,
  &amp;#39;username&amp;#39; =&amp;gt; $username,
  &amp;#39;password&amp;#39; =&amp;gt; $password));
$mail = $smtp-&amp;gt;send($to, $headers, $body);
echo &amp;quot;Mail.php test&amp;quot;
?&amp;gt;&lt;/pre&gt;&lt;div style="box-sizing: border-box;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="box-sizing: border-box;"&gt;After updating, save the changes and upload the script to the site. &amp;nbsp;View the page in a browser and you should see &amp;quot;Mail.php test&amp;quot; returned. &amp;nbsp;If the email is not received, review the path to PEAR in the .user.ini and/or the zsend.php settings.&lt;/div&gt;&lt;div style="box-sizing: border-box;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="box-sizing: border-box;"&gt;To prevent abuse, zsend.php should be deleted from the site after testing.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
    </item>
  </channel>
</rss>