Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-expand-tabs-free domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/websitedevait/public_html/wp-includes/functions.php on line 6170

Warning: Cannot modify header information - headers already sent by (output started at /home/websitedevait/public_html/wp-includes/functions.php:6170) in /home/websitedevait/public_html/wp-includes/feed-rss2.php on line 8
PHP Scripts | Advanced Internet Technologies https://website-dev.ait.tools Empowering Your Digital Future with Cutting-Edge Internet Solutions Tue, 19 Sep 2023 12:43:19 +0000 en-US hourly 1 https://wordpress.org/?v=7.0 https://website-dev.ait.tools/wp-content/uploads/2022/06/aitlogo-1.png PHP Scripts | Advanced Internet Technologies https://website-dev.ait.tools 32 32 Why am I receiving the following error using MySQL or DBManager? Access denied for user: ‘main_user@ https://website-dev.ait.tools/blog/why-am-i-receiving-the-following-error-using-mysql-or-dbmanager-access-denied-for-user-main_user-3/ https://website-dev.ait.tools/blog/why-am-i-receiving-the-following-error-using-mysql-or-dbmanager-access-denied-for-user-main_user-3/#respond Tue, 19 Sep 2023 12:43:06 +0000 https://website-dev.ait.tools/?p=215344 There are several reasons for this error. Some include the following:

  1. You have placed a password into user@localhost and the proper files were not edited with that new password. The following files would need to be edited in order to resolve this issue:`/.my.cnf`
  2. `/usr/local/mysql/var/my.cnf`
  3. `/usr/local/etc/httpd/conf/dbmanager.conf`
  4. It is also possible that the MySQL daemon will need to be restarted. To have this done, you will need to contact AIT Customer Service at https://order.aitcom.net
]]>
https://website-dev.ait.tools/blog/why-am-i-receiving-the-following-error-using-mysql-or-dbmanager-access-denied-for-user-main_user-3/feed/ 0
Do Server Side Includes (SSI) work on AIT’s Web Servers? https://website-dev.ait.tools/blog/do-server-side-includes-ssi-work-on-aits-web-servers-6/ https://website-dev.ait.tools/blog/do-server-side-includes-ssi-work-on-aits-web-servers-6/#respond Tue, 12 Sep 2023 14:08:12 +0000 https://website-dev.ait.tools/?p=214759 Yes, AIT’s Fully Managed Linux and Windows servers can be configured to work with SSI (Server Side Includes). You can use the below HTML code to show the current date on your server if SSI are enabled on your server. By default, files named .shtml on Linux or .asp on Windows will be parsed. These file extensions can be changed based upon the web server configurations.

]]>
https://website-dev.ait.tools/blog/do-server-side-includes-ssi-work-on-aits-web-servers-6/feed/ 0
Do Server Side Includes (SSI) work on AIT’s Web Servers? https://website-dev.ait.tools/blog/do-server-side-includes-ssi-work-on-aits-web-servers-5/ https://website-dev.ait.tools/blog/do-server-side-includes-ssi-work-on-aits-web-servers-5/#respond Tue, 12 Sep 2023 14:07:20 +0000 https://website-dev.ait.tools/?p=214751 Yes, AIT’s Fully Managed Linux and Windows servers can be configured to work with SSI (Server Side Includes). You can use the below HTML code to show the current date on your server if SSI are enabled on your server. By default, files named .shtml on Linux or .asp on Windows will be parsed. These file extensions can be changed based upon the web server configurations.

Echo the date in a browser:

  1. <!–#echo var=”DATE_LOCAL” –>
  2. You can modify the date time by doing a timefmt before the the line calling the date.
  3. <!–#config timefmt=” %I %p %Z” –>%I Hour as decimal number, using a 12-hour clock%p puts either a.m. or p.m according to the give time value.%Z Puts time tone, name or abbreviation ie EST%b Abbreviated month name %B full month name

Include a file:<!–#include virtual=”/directory/navbar.txt –>

This will include the text of the file in the web page. (Good for things you want on every page.)

Executing CGI or Linux command with SSI:

<!–#exec cmd=”pwd” –>

Puts the present working directory location into the web page.

<!–#exec cgi=”programname.cgi” –>

Runs the program named “programname.cgi”.

<!–#printenv –>

  • This prints out the environmental variables with their responses.
]]>
https://website-dev.ait.tools/blog/do-server-side-includes-ssi-work-on-aits-web-servers-5/feed/ 0
What is PHP Fmail or fmail.php? https://website-dev.ait.tools/blog/what-is-php-fmail-or-fmail-php-2/ https://website-dev.ait.tools/blog/what-is-php-fmail-or-fmail-php-2/#respond Tue, 12 Sep 2023 13:55:42 +0000 https://website-dev.ait.tools/?p=214750 Virtual Servers are setup to use sendmail, which is a component used to send email from your server.  AIT has provided a script designed to process any forms that you write for your site.  No knowledge of PHP is necessary to implement a working form on your website.

To use fmail.php, follow the steps below:

  • Click here to view fmail.php.txt
  • Save this file to your local machine as fmail.php
  • Edit fmail.php for your return email address and to suit your input form and “thank you” page.
  • Upload fmail.php to your Virtual Server
  • Create a HTML form that allows for the input of a subject and a message.
  • Create a HTML page to act as a “thank you” page to those who use your form.
  • See the details of these bullets below

AIT’s Linux servers are all configured with this feature. Simply add the following  5 lines to your form to activate this feature.

<form action=”fmail.php” method=”POST”>
<input type=”hidden” name=”subject” value=”Name of Form – Order Form”>
<input type=”hidden” name=”thank_url” value=”//www.your-domain.com/thankyou.htm”>
<input type=”text” name=”sender” value=”E-Mail Address of User Submitting the     Form”></form>
Note: The e-mail address of the “recipient” is specified  within the fmail.php script.

A web site wouldn’t be complete without some simple method of sending comments  or requesting information. A small form and simple CGI can be designed to facilitate  such a task. The comments form and CGI source are presented in two sections below.

HTML Source for the Comments Form

The HTML source below represents a simple comments form. This form can be customized  for your Virtual Server by simply changing the occurrences of the email address  (shown in bold) to the address that you would like to use in the form. It may be  necessary to add an e-mail alias or e-mail mailbox if you use an e-mail address  that does not currently exist on your Virtual Server.

<html>
<head>
<title>Send Comments / Request Information</title>
</head>
<body>
<h3>Send Comments / Request Information</h3>
<hr>
<p>Feel free to send us your comments, suggestions, and/or questions.We value your input and desire to make these pages as useful as possible.Please leave an E-mail address so we can reply to you.</p>
<p>If your web client supports the “mailto” URL, you can use your<A HREF=”mailto:email-address@your-domain.com.”>local mail app</a>to compose and send a mail message. Otherwise, you can usethe form below.</p><p>For those using browsers that do not support forms such as this,send mail to: <i>email-address@your-domain.com</i></p>
<hr>
<form action=”fmail.php” method=”POST”>
<input type=”hidden” name=”subject” value=”Name of Form”>
<input type=”hidden” name=”thank_url” value=”//www.your-domain.com/thankyou.htm”>
<p>
<font size=”+1″>Your Full Name:<</font><br>
<input name=”name” type=”text” size=50>
</p>
<p><font size=”+1″>Your E-mail address:</font><br>
<input name=”sender” type=”text” size=50>
</p>
<p>
<font size=”+1″>Your comments, suggestions, and/or questions:</font><br>
<textarea wrap=physical name=”comments” rows=8 cols=50></textarea>
</p>
<p>
<input type=”submit” value=”Send comments”>
<input type=”reset” value=”Clear”>
</p>
</form>
<hr>
</body>
</html>

The form shown above represents the minimum amount of information that a comments  form should contain – namely “name, email, subject, and comments”. Other  information can be added to the form above. This information will be sent  to the e-mail address specified by the “recipient” variable within the  editable portion of the fmail.php script.

]]>
https://website-dev.ait.tools/blog/what-is-php-fmail-or-fmail-php-2/feed/ 0
How do I create a javascript form validator? https://website-dev.ait.tools/blog/how-do-i-create-a-javascript-form-validator-3/ https://website-dev.ait.tools/blog/how-do-i-create-a-javascript-form-validator-3/#respond Tue, 12 Sep 2023 13:55:04 +0000 https://website-dev.ait.tools/?p=214749 If you would like the validator script, click here

If you would like to view the sample code, click here

]]>
https://website-dev.ait.tools/blog/how-do-i-create-a-javascript-form-validator-3/feed/ 0
How do I create a time/date script using javascript? https://website-dev.ait.tools/blog/how-do-i-create-a-time-date-script-using-javascript-3/ https://website-dev.ait.tools/blog/how-do-i-create-a-time-date-script-using-javascript-3/#respond Tue, 12 Sep 2023 13:54:19 +0000 https://website-dev.ait.tools/?p=214748 If you would like the scripts, click here to view the page.  This is a javascript that will display time and date in several formats.  You can modify it as necessary to use the time/date format that you wish.  Below is an example of the output.

]]>
https://website-dev.ait.tools/blog/how-do-i-create-a-time-date-script-using-javascript-3/feed/ 0
What are the default scripts in the cgi-bin of my Linux server? https://website-dev.ait.tools/blog/what-are-the-default-scripts-in-the-cgi-bin-of-my-linux-server-2/ https://website-dev.ait.tools/blog/what-are-the-default-scripts-in-the-cgi-bin-of-my-linux-server-2/#respond Tue, 12 Sep 2023 13:53:50 +0000 https://website-dev.ait.tools/?p=214747 AIT will provide you with five (5) simple scripts that can get your interactive internet experience started. These 5 files are listed with explanations/links to what they are.

  • fmail.pl: A simple form processing script provided to you to process online forms. No editing of the script is needed. There are only 4 lines of HTML code that need to be used
  • cgi-lib.pl: A simple set of commonly used perl libraries
  • Count.cgi: A simple compiled counter script. The HTML code is located here.
  • phf: A former “hacker” tool, AIT has manipulated the classic phf file to stop hackers from attacking your site.
  • whois.cgi: A script that can be especially valuable to resellers. This queries the Shared Registry System (SRS) to find domain name availability.

AIT also provides Do-It-Yourself Script Library that you can use.  These scripts are provided as-is and do not carry any warranty.

]]>
https://website-dev.ait.tools/blog/what-are-the-default-scripts-in-the-cgi-bin-of-my-linux-server-2/feed/ 0
What are common paths to programs for Perl and PHP scripts? https://website-dev.ait.tools/blog/what-are-common-paths-to-programs-for-perl-and-php-scripts-2/ https://website-dev.ait.tools/blog/what-are-common-paths-to-programs-for-perl-and-php-scripts-2/#respond Tue, 12 Sep 2023 13:43:30 +0000 https://website-dev.ait.tools/?p=214744 Most CGI, Perl or PHP scripts need to know the location of files to run properly.  Sometimes they even need to know where they are located themselves. Here are some common paths and tips about paths for Perl and PHP scripts on AIT’s Fully Managed Linux hosting accounts.

  1. Absolute Path refers to the complete route to a location on the server itself. Standard Absolute Paths are usually something like ‘/www/htdocs/’, which is the path to your web files, or ‘/www/cgi-bin/’, which is the path to your cgi-bin, where scripts are usually located.
  2. Most times an absolute path will be asked for when the script needs to find the directory of certain files (READ THE DOCUMENTATION TO BE SURE!).
  3. URL path refers to something’s location via the WWW. Standard URL paths are something like ‘//www.example.com/’, which is the path to your web site/files, or ‘//www.example.com/cgi-bin/’, which is the path to your cgi-bin via the web.
  4. Most times an absolute path will be asked for to handle HTML directions and coding.
  5. A commonly requested path (also required for Perl scripts) is the path to Perl, it is:
    • ‘/usr/bin/perl’-or-‘/bin/perl’
  6. Another commonly requested path is the path to the sendmail program (for mail interfaces), it is:
    • ‘/bin/sendmail’
  7. Lastly, a commonly request path is to the date program (for date and time tracking), it is:
    • ‘/bin/date’
]]>
https://website-dev.ait.tools/blog/what-are-common-paths-to-programs-for-perl-and-php-scripts-2/feed/ 0
How can I change the amount of memory that PHP uses? https://website-dev.ait.tools/blog/how-can-i-change-the-amount-of-memory-that-php-uses-2/ https://website-dev.ait.tools/blog/how-can-i-change-the-amount-of-memory-that-php-uses-2/#respond Tue, 12 Sep 2023 13:42:20 +0000 https://website-dev.ait.tools/?p=214743 The amount of memory that PHP uses is controlled by the php.ini file. The php.ini file is located in /usr/local/lib directory. In this file, if you want to change the alloted memory for script execution, you need to find a line that looks like the following:

memory_limit = 16M

This is change in megabytes, notice the M. Remember, that you ALWAYS have to specify M, and NOT MB, or you will cause the ini file not to be read properly, and have only 16 bytes if you have 16MB specified in that line.

Save the file and upload it back to the server. Ensure you make a backup copy before you upload it.

]]>
https://website-dev.ait.tools/blog/how-can-i-change-the-amount-of-memory-that-php-uses-2/feed/ 0
Can I edit my php.ini file? https://website-dev.ait.tools/blog/can-i-edit-my-php-ini-file-2/ https://website-dev.ait.tools/blog/can-i-edit-my-php-ini-file-2/#respond Tue, 12 Sep 2023 13:41:24 +0000 https://website-dev.ait.tools/?p=214737 If you are on AIT’s Fully Managed Linux accounts, the answer is yes. The file is located in the /usr/local/lib directory.

The php support on our servers is compiled into the Apache (HTTP) daemon. Thus, the changes made to php.ini will be read in. This file is normally edited by customers who are looking to increase the amount of memory (RAM) that PHP is allocated for a given application, such as a file upload script or web based email for attachment size.

To edit the php.ini file, do the following:

  1. FTP into the server and go to /usr/local/lib directory.
  2. Make a backup of the php.ini file on your server (i.e. php.ini.bak).
  3. Download the php.ini file in ASCII mode.
  4. Edit the file using notepad, via or a normal text editor as necessary.
  5. Upload the php.ini file back to the server in the /usr/local/lib directory.
  6. View the PHP code that you have that requires the php.ini changes to validate that it worked. Changes in the majority of AIT’s Fully Managed Linux hosting accounts are immediate.
  7. Restart Apache (httpd) via the SMT 6 interface, or open a support ticket requesting Apache be restarted for your account.
]]>
https://website-dev.ait.tools/blog/can-i-edit-my-php-ini-file-2/feed/ 0