﻿<?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 DiscountASP.NET</description>
    <link>https://support.discountasp.net/kb/c350/php.aspx</link>
    <pubDate>Wed, 10 Jun 2026 04:36:49 GMT</pubDate>
    <generator>SmarterTrack Enterprise 100.0.9553</generator>
    <atom:link href="https://support.discountasp.net/RSS.ashx?catid=350&amp;type=newestkbarticles" rel="self" type="application/rss+xml" />
    <item>
      <title>Reviewing and updating PHP settings</title>
      <link>https://support.discountasp.net/kb/a1644/reviewing-and-updating-php-settings.aspx</link>
      <pubDate>Tue, 14 May 2019 18:35:24 GMT</pubDate>
      <guid isPermaLink="false">kbarticle1644</guid>
      <description>&lt;div&gt;
&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;PHP settings are reviewed and updated by uploading the two corresponding files to a hosted site.&amp;nbsp; To view the current&amp;nbsp;PHP settings, a phpinfo script.&amp;nbsp; To make changes to those settings, a user.ini settings file.&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&lt;strong style="box-sizing: border-box;"&gt;phpinfo&lt;/strong&gt;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;phpinfo is used to display the current PHP configuration for the site / server.&amp;nbsp;&amp;nbsp;&lt;a href="https://www.php.net/manual/en/function.phpinfo.php" style="color: rgb(0, 136, 204); box-sizing: border-box; text-decoration-line: none;"&gt;Specific parameters can be passed to customize the output&lt;/a&gt;&amp;nbsp;or&amp;nbsp;to display all&amp;nbsp;information&amp;nbsp;the following syntax can be used:&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;
&lt;pre class="prettyprint" style="box-sizing: border-box; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, 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
phpinfo();
?&amp;gt;&lt;/pre&gt;

&lt;div style="box-sizing: border-box;"&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 style="box-sizing: border-box;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box;"&gt;&lt;strong style="box-sizing: border-box;"&gt;user.ini&lt;/strong&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;A site's&amp;nbsp;PHP settings can be adjusted&amp;nbsp;by creating a&amp;nbsp;user.ini file, adding the appropriate syntax (see Sample), then uploading that&amp;nbsp;file to the document root of the site via FTP.&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&lt;strong style="box-sizing: border-box;"&gt;Sample&lt;/strong&gt;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&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 style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&lt;img alt="" height="166" src="/AvatarHandler.ashx?fid=2833000&amp;amp;key=3831330179" width="934" /&gt;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;For PHP 7.0, 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 style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, Helvetica, Arial, Verdana, sans-serif; font-size: 14px;"&gt;
&lt;pre class="prettyprint" style="box-sizing: border-box; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; margin-top: 0px; margin-bottom: 20px; line-height: 1.42857; word-break: break-all; border-radius: 4px;"&gt;
post_max_size = 60M
upload_max_filesize = 60M
&lt;/pre&gt;

&lt;div style="box-sizing: border-box;"&gt;Once the user.ini has been&amp;nbsp;uploaded, to see the setting updates reflected on the site, first recycle the application pool at DiscountASP Control Panel &amp;gt; IIS Tools &amp;gt; Recycle (&amp;quot;Recycle App Pool&amp;quot; if IIS 7).&lt;/div&gt;

&lt;div style="box-sizing: border-box;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box;"&gt;&lt;img alt="" height="166" src="/AvatarHandler.ashx?fid=2833001&amp;amp;key=3930286871" width="934" /&gt;&lt;/div&gt;

&lt;div style="box-sizing: border-box;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box;"&gt;Once recycled, the new Local Value should be reflected when reviewing a phpinfo script.&lt;/div&gt;

&lt;div style="box-sizing: border-box;"&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="box-sizing: border-box;"&gt;For an&amp;nbsp;example phpinfo script and user.ini file, download &lt;a href="/AvatarHandler.ashx?fid=2893849&amp;amp;key=1068942513"&gt;phpSettings.zip&lt;/a&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Send mail using Mail.php / PEAR</title>
      <link>https://support.discountasp.net/kb/a1515/send-mail-using-mail_php-pear.aspx</link>
      <pubDate>Tue, 19 Jun 2018 17:14:12 GMT</pubDate>
      <guid isPermaLink="false">kbarticle1515</guid>
      <description>&lt;div&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;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;Download PEAR.zip&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;a href="/AvatarHandler.ashx?kbattchid=459" class="fr-file"&gt;daspPear.zip&lt;/a&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Inside the .zip is the PEAR directory, an example user.ini and a test script zsend.php. &amp;nbsp;The PEAR directory contains a web.config to prevent browser access to the subdirectory. &amp;nbsp;And please note that both the user.ini and the test script have to be configured before use.&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;Update and upload&amp;nbsp;user.ini and PEAR directory&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&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, you can use the example file included in daspPEAR.zip.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;The &lt;strong&gt;Server Path&amp;nbsp;&lt;/strong&gt;is found in the &lt;a href="https://my.discountasp.net/account-info.aspx"&gt;&lt;strong&gt;Account Info / Edit&lt;/strong&gt;&lt;/a&gt; section of the &lt;strong&gt;DiscountASP Control Panel&lt;/strong&gt;.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;img alt="" height="350" src="/AvatarHandler.ashx?fid=2539423&amp;key=1300693811" width="627" class="fr-fic fr-dii"&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;If using the example user.ini, only the &amp;quot;username&amp;quot; in the path needs to be updated to match the server path in the &lt;strong&gt;Account Info / Edit&lt;/strong&gt; section:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;include_path=&amp;quot;.;e:\web\username\htdocs\pear\&amp;quot;&lt;/pre&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;After updating the user.ini, upload it and PEAR to the document root of your site and Mail.php is ready for use.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;img alt="" height="433" src="/AvatarHandler.ashx?fid=2539447&amp;key=696104453" width="655" class="fr-fic fr-dii"&gt;&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;Testing Mail.php&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;zsend.php may be used to test whether Mail.php has been properly set up. &amp;nbsp;Open the file in a text editor and update the settings highlighted in red below.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&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="color:#FF0000;"&gt;postmaster@domain.com&lt;/span&gt;&amp;quot;;
$to = &amp;quot;&lt;span style="color:#FF0000;"&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;sm##.internetmailserver.net&lt;/span&gt;&amp;quot;;
$username = &amp;quot;&lt;span style="color:#FF0000;"&gt;postmaster@domain.com&lt;/span&gt;&amp;quot;;
$password = &amp;quot;&lt;span style="color:#FF0000;"&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&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Once updated, 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, the path to PEAR in the user.ini and/or the zsend.php settings should be reviewed.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;To prevent abuse, zsend.php should be deleted from the site after testing.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
    </item>
  </channel>
</rss>