{"id":37074,"date":"2019-04-15T17:44:46","date_gmt":"2019-04-15T14:44:46","guid":{"rendered":"https:\/\/tuthost.ua\/faq\/running-scripts\/"},"modified":"2024-07-19T22:08:14","modified_gmt":"2024-07-19T19:08:14","slug":"scripts","status":"publish","type":"ht_kb","link":"https:\/\/tuthost.ua\/en\/faq\/scripts\/","title":{"rendered":"Running scripts"},"content":{"rendered":"<h2>Running scripts<\/h2>\n<p>This section covers CGI scripts, program paths, viewing installed Perl modules, explaining permission settings, PHP scripts, and accessing phpMyAdmin.<\/p>\n<h3 id=\"cgi\">CGI scripts<\/h3>\n<p>All CGI scripts must be placed in your cgi-bin directory. The cgi-bin folder is in your public_html directory (e.g. public_html\/cgi-bin). If you want to run a CGI script in a subdomain, put the script in the cgi-bin directory of the subdomain.<\/p>\n<p>To learn more about directory structure, click <a href=\"https:\/\/tuthost.ua\/faq\/uploading\/#catalogs\">here<\/a>.<\/p>\n<h3>Loading CGI scripts<\/h3>\n<p>When using FTP, script files (such as .cgi and .pl) must be uploaded in ASCII mode. FTP, binary or &#8220;auto&#8221;. If &#8220;auto&#8221; is selected, make sure that the .cgi and .pl files are considered ASCII files by your FTP client. The scripts will not run in binary mode.<\/p>\n<p>Be sure to follow the instructions that come with the CGI script.<\/p>\n<p>To learn more about uploading files to your server, click <a href=\"https:\/\/tuthost.ua\/faq\/uploading\/#ftp\">here<\/a>.<\/p>\n<h3 id=\"paths\">Software Pathways<\/h3>\n<p>Paths that scripts usually use.<br \/>\nPath to pearl: \/usr\/bin\/pearl<br \/>\nPath to sendmail: \/usr\/sbin\/sendmail<\/p>\n<p>CGI URL: http:\/\/www.example.com\/cgi-bin\/script.cgi<br \/>\nCGI subdomain URL: http:\/\/subdomain.example.com\/cgi-bin\/script.cgi<\/p>\n<p>Path to cgi-bin: \/home\/username\/domains\/domain.com\/public_html\/cgi-bin<br \/>\nPath to cgi-bin (subdomain): \/home\/username\/domains\/domain.com\/public_html\/subdomain\/cgi-bin<\/p>\n<p><strong>Important<\/strong>: If these paths do not work, it is possible that your hoster has installed your account in a different directory than \/home. Contact him to get the right ways.<\/p>\n<h3 id=\"perl\">Viewing installed Perl modules<\/h3>\n<p><a href=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/1-8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23147 aligncenter\" src=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/1-8.png\" alt=\"\" width=\"120\" height=\"80\" title=\"\" srcset=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/1-8.png 120w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/1-8-75x50.png 75w\" sizes=\"auto, (max-width: 120px) 100vw, 120px\" \/><\/a><a href=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/2-10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23144 aligncenter\" src=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/2-10.png\" alt=\"\" width=\"142\" height=\"79\" title=\"\" srcset=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/2-10.png 142w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/2-10-125x70.png 125w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/2-10-75x42.png 75w\" sizes=\"auto, (max-width: 142px) 100vw, 142px\" \/><\/a>In the main menu of the Control Panel, click the System and Files icon, then the Perl Modules icon.<\/p>\n<p>The figure below shows an example of a Perl module list cutout. If a CGI script requires a particular perl module, check this list to make sure the module is installed on the server.<\/p>\n<p><a href=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/3-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-23148 size-full\" src=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/3-7.png\" alt=\"\" width=\"926\" height=\"122\" title=\"\" srcset=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/3-7.png 926w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/3-7-150x20.png 150w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/3-7-300x40.png 300w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/3-7-768x101.png 768w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/3-7-125x16.png 125w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/3-7-75x10.png 75w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/a><\/p>\n<h3 id=\"permissions\">Access rights<\/h3>\n<p>File permissions determine who can read, write and execute files, such as scripts. When the installation instructions ask you for the CHMOD file, you will be asked to set permissions for the file. File permissions can be changed with most popular FTP clients or through the control panel&#8217;s built-in<a href=\"https:\/\/tuthost.ua\/faq\/filemanager\/\"> file manager<\/a>.<\/p>\n<p>Some common permission levels for files:<\/p>\n<p><strong>600<\/strong> Makes the file inaccessible<br \/>\n<strong>644<\/strong> Readable to all (e.g., HTML documents)<br \/>\n<strong>666<\/strong> File can be read and changed (e.g. for HTML files modified by scripts)<br \/>\n<strong>755<\/strong> File can be read and executed by any user (e.g. for scripts)<br \/>\n<strong>777<\/strong> Written and performed by all (not recommended)<\/p>\n<p>Most scripts must be set to <strong>755<\/strong>. Refer to the script documentation for proper installation instructions.<\/p>\n<p>To learn more about file permissions, click <a href=\"https:\/\/www.linux.com\/learn\/understanding-linux-file-permissions\" rel=\"nofollow noopener\" target=\"_blank\">here<\/a>.<\/p>\n<h3 id=\"php\">PHP scripts<\/h3>\n<p>PHP scripts are fully supported on all servers running DirectAdmin Web Control Panel. PHP scripts can also be placed and executed in any folder in your public_html directory. Refer to the script documentation for the correct file resolution and installation procedure.<\/p>\n<h3 id=\"phpmyadmin\">Access to phpMyAdmin<\/h3>\n<p><a href=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/4-8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23150 aligncenter\" src=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/4-8.png\" alt=\"\" width=\"120\" height=\"80\" title=\"\" srcset=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/4-8.png 120w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/4-8-75x50.png 75w\" sizes=\"auto, (max-width: 120px) 100vw, 120px\" \/><\/a><a href=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/5-10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23149 aligncenter\" src=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/5-10.png\" alt=\"\" width=\"128\" height=\"96\" title=\"\" srcset=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/5-10.png 128w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/5-10-125x94.png 125w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/5-10-75x56.png 75w\" sizes=\"auto, (max-width: 128px) 100vw, 128px\" \/><\/a>To access phpMyAdmin, log in to the control panel and click on the &#8220;Accounts&#8221; icon, then the link &#8220;Manage MySQL&#8221;, then the link &#8220;phpMyAdmin&#8221; at the top of the table.<\/p>\n<p><a href=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/6-9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-23151 size-full\" src=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/6-9.png\" alt=\"\" width=\"962\" height=\"47\" title=\"\" srcset=\"https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/6-9.png 962w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/6-9-150x7.png 150w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/6-9-300x15.png 300w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/6-9-768x38.png 768w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/6-9-125x6.png 125w, https:\/\/tuthost.ua\/wp-content\/uploads\/2019\/04\/6-9-75x4.png 75w\" sizes=\"auto, (max-width: 962px) 100vw, 962px\" \/><\/a><\/p>\n<p>phpMyAdmin is a tool written in PHP that allows you to administer your MySQL databases. You can perform SQL operations, work with fields (add, edit, delete), work with tables (create, modify, delete), create additional databases and much more. Keep in mind that phpMyAdmin is intended for experienced users.<\/p>\n<p>You can find more information on how to use phpMyAdmin <a href=\"https:\/\/www.phpmyadmin.net\/\" rel=\"nofollow noopener\" target=\"_blank\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running scripts This section covers CGI scripts, program paths, viewing installed Perl modules, explaining permission settings, PHP scripts, and accessing phpMyAdmin. CGI scripts All CGI scripts must be placed in your cgi-bin directory. The cgi-bin folder is in your public_html directory (e.g. public_html\/cgi-bin). If you want to run a CGI script in a subdomain, put&#8230;<\/p>\n","protected":false},"author":4,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"inline_featured_image":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","ghostkit_customizer_options":"","ghostkit_custom_css":"","ghostkit_custom_js_head":"","ghostkit_custom_js_foot":"","ghostkit_typography":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"ht-kb-category":[10694],"ht-kb-tag":[],"class_list":["post-37074","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-control-panel-directadmin"],"taxonomy_info":{"ht_kb_category":[{"value":10694,"label":"Control Panel - Directadmin"}]},"featured_image_src_large":[],"author_info":{"display_name":"\u041e\u043b\u0435\u0433 \u041f\u043e\u043a\u043e\u0442\u0438\u043b\u043e","author_link":"https:\/\/tuthost.ua\/en\/author\/oleg-tuthost-com\/"},"comment_info":0,"_links":{"self":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/37074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/comments?post=37074"}],"version-history":[{"count":2,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/37074\/revisions"}],"predecessor-version":[{"id":52511,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/37074\/revisions\/52511"}],"wp:attachment":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/media?parent=37074"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb-category?post=37074"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=37074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}